/* world-cup/_wc.css — shared styles for hub + country pages */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #060606; color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
html[dir="rtl"] body { text-align: right; }
a { color: inherit; }

.nav {
  padding: 1rem 1.5rem; border-bottom: 1px solid #222;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: rgba(6,6,6,0.95); backdrop-filter: blur(10px);
  z-index: 100; gap: 0.8rem; flex-wrap: wrap;
}
.nav .logo { font-weight: 900; font-size: 1.2rem; letter-spacing: -0.02em; color: #fff; text-decoration: none; }
.nav .logo .accent { color: #D4AF37; }
.nav .links { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav .links a { color: #aaa; text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.nav .links a:hover { color: #D4AF37; }
.nav .links a.active { color: #D4AF37; }
.lang-switch { display: flex; background: rgba(255,255,255,0.04); border: 1px solid #1f1f1f; border-radius: 999px; padding: 2px; }
.lang-btn { background: transparent; border: 0; color: rgba(255,255,255,0.55); padding: 0.3rem 0.55rem; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; cursor: pointer; text-decoration: none; }
.lang-btn.active { background: #D4AF37; color: #000; }

/* Hero */
.hero {
  padding: 3rem 1.5rem 2rem; text-align: center;
  background: radial-gradient(ellipse at top, rgba(212,175,55,0.1) 0%, transparent 60%);
}
.hero .kicker {
  display: inline-block; padding: 0.3rem 0.9rem;
  background: rgba(212,175,55,0.15); color: #D4AF37;
  border: 1px solid rgba(212,175,55,0.3); border-radius: 999px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900;
  letter-spacing: -0.03em; margin-bottom: 1rem; line-height: 1.05;
  background: linear-gradient(135deg, #fff 0%, #d4af37 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle { color: #aaa; max-width: 700px; margin: 0 auto; font-size: 1.05rem; }

/* Countdown */
.countdown {
  max-width: 900px; margin: 2rem auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
  padding: 0 1rem;
}
.countdown .unit {
  background: linear-gradient(180deg, #161616 0%, #0a0a0a 100%);
  border: 1px solid #222; border-radius: 14px;
  padding: 1.3rem 0.6rem; text-align: center;
}
.countdown .unit .num {
  font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 900;
  color: #D4AF37; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown .unit .label {
  font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 0.5rem; font-weight: 700;
}
.countdown.live .unit .num { color: #ff4d4d; }
.countdown .live-msg {
  grid-column: 1/-1; text-align: center; color: #ff4d4d; font-weight: 800;
  font-size: 1.1rem; padding: 0.5rem;
}

/* Sections */
section {
  max-width: 1200px; margin: 3rem auto; padding: 0 1.5rem;
}
section h2 {
  font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 800;
  margin-bottom: 1.5rem; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 0.6rem;
}
section h2 .badge {
  font-size: 0.7rem; background: #D4AF37; color: #000;
  padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 800; letter-spacing: 0.05em;
}
section h3 {
  font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 0.5rem;
}

/* Cards / grids */
.card {
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border: 1px solid #222; border-radius: 14px; padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: #D4AF37; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

/* Match card */
.match-card {
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border: 1px solid #222; border-radius: 12px;
  padding: 1.2rem; position: relative;
}
.match-card .meta {
  font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.6rem; display: flex; justify-content: space-between; align-items: center;
}
.match-card .meta .status { color: #D4AF37; font-weight: 700; }
.match-card .meta .status.live { color: #ff4d4d; }
.match-card .teams {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem; align-items: center; margin: 0.8rem 0;
}
.match-card .team { text-align: center; }
.match-card .team .flag { font-size: 2rem; line-height: 1; }
.match-card .team .name { font-weight: 700; margin-top: 0.4rem; font-size: 0.95rem; }
.match-card .vs { font-size: 1.2rem; font-weight: 900; color: #555; }
.match-card .score { font-size: 1.5rem; font-weight: 900; color: #D4AF37; font-variant-numeric: tabular-nums; }
.match-card .venue { font-size: 0.8rem; color: #777; text-align: center; margin-top: 0.6rem; }
.match-card .when { font-size: 0.85rem; color: #aaa; text-align: center; margin-top: 0.2rem; font-weight: 600; }

/* Group card */
.group-card {
  background: linear-gradient(180deg, #0f0f0f 0%, #080808 100%);
  border: 1px solid #1d1d1d; border-radius: 10px;
  padding: 0.9rem;
}
.group-card.highlight-maroc { border-color: rgba(193,39,45,0.5); box-shadow: 0 0 24px rgba(193,39,45,0.15); }
.group-card.highlight-portugal { border-color: rgba(0,102,0,0.5); box-shadow: 0 0 24px rgba(0,102,0,0.15); }
.group-card .name {
  font-weight: 800; font-size: 0.9rem; color: #D4AF37;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #222; padding-bottom: 0.4rem; margin-bottom: 0.4rem;
}
.group-card .name .star { font-size: 0.7rem; color: #fff; background: rgba(193,39,45,0.3); padding: 0.1rem 0.4rem; border-radius: 4px; }
.group-card .name .star.portugal { background: rgba(0,102,0,0.3); }
.group-card ul { list-style: none; }
.group-card li {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0; font-size: 0.88rem;
}
.group-card li.bold { font-weight: 800; color: #fff; }

/* Live news ticker */
.live-ticker {
  background: linear-gradient(90deg, #1a0606 0%, #060606 50%);
  border-top: 1px solid #311; border-bottom: 1px solid #311;
  padding: 0.7rem 0; overflow: hidden; position: relative;
}
.live-ticker .label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #ff2121; color: #fff; padding: 0.2rem 0.7rem;
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
  border-radius: 4px; margin: 0 1rem; vertical-align: middle;
}
.live-ticker .label::before {
  content: ''; width: 8px; height: 8px; background: #fff; border-radius: 50%;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.live-ticker .scroll {
  display: inline-block; white-space: nowrap;
  animation: marquee 60s linear infinite;
  font-size: 0.9rem;
}
.live-ticker .scroll a { color: #fff; text-decoration: none; margin: 0 2rem; }
.live-ticker .scroll a:hover { color: #D4AF37; }
.live-ticker .scroll .sep { color: #555; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Poll */
.poll {
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border: 1px solid #222; border-radius: 14px; padding: 1.5rem;
  margin: 2rem 0;
}
.poll h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.poll-options { display: flex; flex-direction: column; gap: 0.4rem; }
.poll-option {
  background: rgba(255,255,255,0.04); border: 1px solid #222; border-radius: 8px;
  padding: 0.8rem 1rem; cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.poll-option:hover { border-color: #D4AF37; background: rgba(212,175,55,0.05); }
.poll-option.voted { cursor: default; pointer-events: none; }
.poll-option .bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(212,175,55,0.15); width: 0%; transition: width 0.6s ease;
  z-index: 0;
}
.poll-option .label, .poll-option .pct { position: relative; z-index: 1; }
.poll-option .pct { float: right; font-weight: 800; color: #D4AF37; }
.poll-total { font-size: 0.8rem; color: #777; margin-top: 1rem; text-align: right; }

/* Comments */
.comments {
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border: 1px solid #222; border-radius: 14px; padding: 1.5rem;
  margin: 2rem 0;
}
.comments h2 { margin-bottom: 1rem; font-size: 1.4rem; display: flex; align-items: center; gap: 0.5rem;}
.comments .count { background: #D4AF37; color: #000; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; }
.comments .signin-prompt {
  text-align: center; padding: 1.5rem; color: #aaa;
  border: 1px dashed #333; border-radius: 8px; margin-bottom: 1rem;
}
.comments .signin-prompt button {
  background: #D4AF37; color: #000; border: 0; padding: 0.6rem 1.2rem;
  border-radius: 999px; font-weight: 800; cursor: pointer; margin-top: 0.8rem;
}
.comments .composer { margin-bottom: 1.5rem; }
.comments .composer textarea {
  width: 100%; min-height: 80px; padding: 0.8rem;
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px;
  color: #f5f5f5; font-size: 0.95rem; font-family: inherit; resize: vertical;
}
.comments .composer .actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.6rem; }
.comments .composer .user { font-size: 0.85rem; color: #aaa; }
.comments .composer button.send {
  background: #D4AF37; color: #000; border: 0; padding: 0.5rem 1rem;
  border-radius: 999px; font-weight: 800; cursor: pointer;
}
.comments .composer button.send:disabled { opacity: 0.4; cursor: not-allowed; }
.comment {
  border-top: 1px solid #1d1d1d; padding: 1rem 0;
}
.comment .head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.comment .avatar { width: 32px; height: 32px; border-radius: 50%; background: #333; }
.comment .author { font-weight: 700; font-size: 0.9rem; }
.comment .when { font-size: 0.75rem; color: #777; }
.comment .body { font-size: 0.95rem; color: #ddd; }

/* Tabs */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab {
  background: transparent; border: 1px solid #2a2a2a; color: #aaa;
  padding: 0.5rem 1rem; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 0.85rem; transition: all 0.2s;
}
.tab.active { background: #D4AF37; color: #000; border-color: #D4AF37; }
.tab:hover:not(.active) { color: #fff; border-color: #555; }

/* News card grid */
.news-card {
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border: 1px solid #1d1d1d; border-radius: 10px;
  padding: 0.9rem; text-decoration: none; color: inherit; display: block;
  transition: all 0.2s;
}
.news-card:hover { border-color: #D4AF37; transform: translateY(-2px); }
.news-card .news-meta {
  font-size: 0.7rem; color: #777; display: flex; gap: 0.5rem; align-items: center;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem;
}
.news-card .news-meta .kind {
  background: rgba(212,175,55,0.15); color: #D4AF37;
  padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 700;
}
.news-card .news-meta .kind.cr7 { background: rgba(212,175,55,0.2); }
.news-card .news-meta .kind.wc { background: rgba(0,153,255,0.15); color: #4eb3ff; }
.news-card .news-meta .kind.maroc { background: rgba(193,39,45,0.15); color: #ff6b6b; }
.news-card .news-meta .kind.portugal { background: rgba(0,102,0,0.15); color: #4caf50; }
.news-card .news-title {
  font-weight: 700; font-size: 0.95rem; line-height: 1.35;
}

/* Stadiums */
.stadium-card {
  background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
  border: 1px solid #222; border-radius: 10px; padding: 1rem;
}
.stadium-card .city { color: #D4AF37; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stadium-card .name { font-weight: 800; margin: 0.3rem 0; }
.stadium-card .cap { color: #888; font-size: 0.85rem; }
.stadium-card .matches { font-size: 0.8rem; color: #999; margin-top: 0.5rem; }

/* Footer */
.footer {
  border-top: 1px solid #222; padding: 2rem 1.5rem; text-align: center;
  font-size: 0.85rem; color: #777; margin-top: 4rem;
}
.footer p { max-width: 800px; margin: 0 auto 0.5rem; }
.footer a { color: #aaa; text-decoration: underline; }

/* RTL adjustments for Arabic */
html[dir="rtl"] .nav .links { direction: rtl; }
html[dir="rtl"] .countdown { direction: ltr; } /* numbers stay LTR */
html[dir="rtl"] .live-ticker .scroll { animation-direction: reverse; }

/* Small screens */
@media (max-width: 640px) {
  .nav { padding: 0.8rem 1rem; }
  .countdown { grid-template-columns: repeat(4, 1fr); gap: 0.3rem; padding: 0 0.5rem; }
  .countdown .unit { padding: 1rem 0.3rem; }
  section { margin: 2rem auto; padding: 0 1rem; }
}
