/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: #0a0a0a;
  color: #e8dfc8;
  font-family: 'Georgia', 'Times New Roman', serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ─── Background pattern ──────────────────────────────── */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(184,151,42,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(184,151,42,0.04) 0%, transparent 60%),
    repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(184,151,42,0.015) 40px, rgba(184,151,42,0.015) 41px),
    repeating-linear-gradient(-45deg, transparent, transparent 40px, rgba(184,151,42,0.015) 40px, rgba(184,151,42,0.015) 41px);
}

/* ─── LANGUAGE SELECT PAGE ────────────────────────────── */
.lang-select-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  z-index: 1;
}

.top-ornament, .bottom-ornament {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, 90vw);
  z-index: 2;
}
.top-ornament { top: 24px; }
.top-ornament svg, .bottom-ornament svg { width: 100%; height: auto; }
.bottom-ornament { bottom: 24px; }

.main-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 760px;
}

/* Emblem */
.club-emblem {
  margin-bottom: 28px;
  animation: floatY 4s ease-in-out infinite;
}
.club-emblem svg {
  width: 100px;
  height: 100px;
  filter: drop-shadow(0 0 18px rgba(184,151,42,0.35));
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* Titles */
.main-title {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  color: #B8972A;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 0 30px rgba(184,151,42,0.3);
}
.main-subtitle {
  font-size: clamp(0.7rem, 2vw, 0.85rem);
  letter-spacing: 0.15em;
  color: rgba(184,151,42,0.6);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 28px;
}

/* Gold divider */
.gold-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 44px;
}
.gold-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #B8972A, transparent);
}

/* Language grid */
.lang-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

/* Language card */
.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: 1px solid rgba(184,151,42,0.25);
  border-radius: 4px;
  padding: 22px 20px 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 130px;
  position: relative;
  overflow: hidden;
}
.lang-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184,151,42,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lang-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, #B8972A, transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.lang-card:hover { border-color: rgba(184,151,42,0.65); transform: translateY(-4px); box-shadow: 0 8px 32px rgba(184,151,42,0.15); }
.lang-card:hover::before { opacity: 1; }
.lang-card:hover::after  { transform: scaleX(1); }

.flag-container {
  width: 68px;
  height: 51px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 1px rgba(184,151,42,0.2);
  transition: box-shadow 0.3s ease;
}
.flag-container svg { width: 100%; height: 100%; display: block; }
.lang-card:hover .flag-container { box-shadow: 0 4px 20px rgba(0,0,0,0.7), 0 0 0 1px rgba(184,151,42,0.5); }

.lang-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(184,151,42,0.8);
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.lang-card:hover .lang-label { color: #B8972A; }

/* ─── RULES PAGE ──────────────────────────────────────── */
.rules-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* Header */
.rules-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184,151,42,0.2);
}
.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(184,151,42,0.3);
  border-radius: 3px;
  color: rgba(184,151,42,0.8);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Georgia', serif;
  text-decoration: none;
}
.back-btn:hover { border-color: #B8972A; color: #B8972A; background: rgba(184,151,42,0.06); }
.back-btn svg { display: block; }

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mini-emblem { width: 28px; height: 28px; }
.header-title {
  font-size: clamp(0.75rem, 2vw, 0.95rem);
  letter-spacing: 0.22em;
  color: #B8972A;
  text-transform: uppercase;
  font-weight: 400;
}
.lang-badge {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(184,151,42,0.55);
  border: 1px solid rgba(184,151,42,0.2);
  padding: 5px 12px;
  border-radius: 2px;
  text-transform: uppercase;
}

/* Top ornament in rules */
.rules-top-ornament {
  padding: 12px 40px 0;
  opacity: 0.7;
}
.rules-top-ornament svg { width: 100%; height: 12px; }

/* Main content */
.rules-main {
  flex: 1;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
}
.rules-intro { text-align: center; margin-bottom: 48px; }
.rules-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: rgba(184,151,42,0.5);
  font-style: italic;
  line-height: 1.6;
}

/* Sections */
.sections-container { display: flex; flex-direction: column; gap: 44px; }

.rule-section {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
.rule-section:nth-child(1) { animation-delay: 0.05s; }
.rule-section:nth-child(2) { animation-delay: 0.1s; }
.rule-section:nth-child(3) { animation-delay: 0.15s; }
.rule-section:nth-child(4) { animation-delay: 0.2s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.section-number {
  width: 32px; height: 32px;
  border: 1px solid rgba(184,151,42,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: #B8972A;
  flex-shrink: 0;
}
.section-title {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: 0.2em;
  color: #B8972A;
  font-weight: 400;
  text-transform: uppercase;
}
.section-divider { margin-bottom: 20px; padding-left: 48px; }
.section-divider svg { width: 100%; height: 6px; }

/* Rule list */
.rule-list { list-style: none; display: flex; flex-direction: column; gap: 14px; padding-left: 8px; }
.rule-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 18px;
  border-left: 1px solid rgba(184,151,42,0.15);
  transition: border-color 0.2s, background 0.2s;
}
.rule-item:hover { border-left-color: rgba(184,151,42,0.5); background: rgba(184,151,42,0.03); }
.rule-bullet { color: rgba(184,151,42,0.5); font-size: 0.55rem; flex-shrink: 0; margin-top: 5px; }
.rule-text { font-size: clamp(0.82rem, 2vw, 0.9rem); line-height: 1.75; color: rgba(232,223,200,0.85); letter-spacing: 0.01em; }

/* Footer */
.rules-footer { padding: 24px 32px 32px; display: flex; justify-content: center; }
.footer-ornament { width: 100%; max-width: 320px; }
.footer-ornament svg { width: 100%; height: 20px; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  .rules-header  { padding: 12px 16px; }
  .rules-main    { padding: 28px 16px 48px; }
  .lang-card     { width: 110px; padding: 18px 14px 14px; }
  .flag-container { width: 58px; height: 44px; }
  .rule-item     { padding: 10px 12px; }
  .section-divider { padding-left: 0; }
  .header-title  { display: none; }
}
