/* Local Game Time — black theme: white writing, lime-green (#a3e635) and
   orange accents, gold stars. Sporty and fun, built for players. */
:root {
  color-scheme: dark;
  --accent: #a3e635;        /* lime green — secondary / small text on black */
  --accent-dark: #a3e635;   /* green emphasis text (bright, for dark bg) */
  --orange: #f97316;        /* energy accent — CTAs, highlights, chips */
  --orange-bright: #fb923c; /* orange text on black */
  --gold: #fbbf24;          /* star ratings */
  --ink: #f5f7f2;           /* main writing — off-white */
  --muted: #a3e635;         /* secondary / small text uses the lime green */
  --line: #2b302b;          /* subtle borders on black */
  --card-bg: #16181c;       /* slightly lighter dark shade for cards */
  --page-bg: #000000;
  --error: #f87171;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.45;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  max-width: 860px; margin: 0 auto; padding: 14px 16px 6px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.brand-name { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: .2px; }
.brand-tag { display: block; color: var(--muted); font-size: .85rem; }
.header-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lang-toggle { display: flex; align-items: center; gap: 6px; padding-top: 4px; }
.lang-btn {
  background: none; border: none; cursor: pointer; font: inherit; font-size: .9rem;
  color: var(--ink); padding: 2px 4px;
}
.lang-btn.active { color: var(--accent); font-weight: 700; text-decoration: underline; }
.lang-sep { color: var(--line); }
.country-toggle { display: flex; align-items: center; gap: 6px; padding-top: 4px; }
.country-btn {
  background: none; border: none; cursor: pointer; font: inherit; font-size: .9rem;
  color: var(--ink); padding: 2px 4px;
}
.country-btn.active { color: var(--orange-bright); font-weight: 700; text-decoration: underline; }

/* Hero banner — rotating sport photos over a green-gradient fallback */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(190px, 34vw, 250px);
  background: linear-gradient(135deg, #1a2e05 0%, #3f6212 48%, #65a30d 100%);
  border-bottom: 3px solid var(--orange);
}
.hero-slides, .hero-slide, .hero-shade { position: absolute; inset: 0; }
.hero-slide {
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  animation: heroFade 24s linear infinite;
}
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; }
@keyframes heroFade {
  0% { opacity: 0; } 5% { opacity: 1; } 25% { opacity: 1; }
  30% { opacity: 0; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; }
  .hero-slide:first-child { opacity: 1; }
}
.hero-shade {
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.28) 55%, rgba(0,0,0,.38) 100%);
}
.hero-inner {
  position: relative; z-index: 1; height: 100%; width: 100%;
  align-items: flex-end; padding: 16px;
}
.hero .brand-name {
  color: #fff; font-size: 1.75rem; letter-spacing: .3px;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.brand-logo {
  display: block; height: clamp(64px, 14vw, 96px); width: auto;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 4px 18px rgba(0,0,0,.5); margin-bottom: 8px;
}
.hero .brand-tag {
  color: var(--accent); font-size: .98rem; font-weight: 700;
  text-shadow: 0 1px 10px rgba(0,0,0,.65);
}
.hero .lang-btn { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.hero .lang-btn.active { color: var(--accent); }
.hero .lang-sep { color: rgba(255,255,255,.45); }
.hero .country-btn { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.hero .country-btn.active { color: var(--orange-bright); }
.venue-hint { color: var(--muted); font-size: .85rem; margin: 0 0 12px; }

.tabs {
  max-width: 860px; margin: 0 auto; padding: 6px 16px 0;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.tab {
  background: none; border: 1px solid transparent; border-bottom: none;
  padding: 9px 12px; font: inherit; font-size: .95rem; cursor: pointer;
  border-radius: 10px 10px 0 0; color: var(--ink);
}
.tab.active { border-color: var(--line); background: var(--card-bg); font-weight: 700; color: var(--accent); }

main { max-width: 860px; margin: 0 auto; padding: 16px; }
.view { display: none; }
.view.active { display: block; }

.card {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.card h2 { margin-top: 0; font-size: 1.2rem; font-weight: 800; }
.section-title { font-size: 1.2rem; font-weight: 800; margin: 20px 0 10px; color: var(--orange-bright); }

/* Forms */
label { display: block; margin-bottom: 12px; font-size: .92rem; }
label > span { display: block; color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
input, select, textarea {
  width: 100%; padding: 10px; font: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 10px; background: #1e2126; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.btn {
  display: inline-block; border: 1px solid var(--accent); background: transparent; color: var(--accent);
  padding: 10px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn.primary {
  background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 800;
  box-shadow: 0 4px 16px rgba(249, 115, 22, .35);
}
.btn.primary:hover { background: #ea580c; transform: translateY(-1px); }
.btn.primary:active { background: #ea580c; transform: translateY(0); }
.btn.small { padding: 6px 10px; font-size: .88rem; }
.btn.danger { border-color: var(--error); color: var(--error); }
.admin-actions { white-space: nowrap; }
.admin-actions .btn { margin-inline-end: 6px; }
.form-error { color: var(--error); font-size: .9rem; }
.form-ok { color: var(--accent); font-size: .95rem; font-weight: 600; }
details.post-card summary { cursor: pointer; font-weight: 800; font-size: 1.08rem; color: var(--orange-bright); }
details.post-card form { margin-top: 14px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.filters label { margin-bottom: 0; }
@media (max-width: 520px) { .filters { grid-template-columns: 1fr; } }

/* Game cards */
.game-card { padding: 0; overflow: hidden; }
.game-media { position: relative; background: #10130c; }
.game-media img { display: block; width: 100%; height: 170px; object-fit: cover; }
.game-media .media-placeholder {
  height: 170px; display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; color: var(--accent);
  background: linear-gradient(135deg, #1c2a10, #2c4413);
}
.game-body { padding: 14px 16px 16px; }
.game-title { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; }
.game-meta { color: var(--muted); font-size: .85rem; margin: 2px 0; }
.game-meta strong { color: var(--ink); }
.chip {
  display: inline-block; background: rgba(249, 115, 22, .16); color: var(--orange-bright);
  border: 1px solid rgba(249, 115, 22, .5); border-radius: 999px; padding: 2px 10px;
  font-size: .8rem; font-weight: 700; margin-inline-end: 6px;
}
.spots { font-weight: 800; color: var(--orange-bright); }
.spots.full { color: var(--error); }
.joined-names { font-size: .9rem; }
.join-row { display: flex; gap: 8px; margin-top: 10px; }
.join-row input { flex: 1; }
.dir-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.dir-link:hover { text-decoration: underline; }
.game-note { font-size: .93rem; margin-top: 8px; white-space: pre-wrap; }

/* Ad slots */
.ad-slot {
  border: 2px dashed rgba(163, 230, 53, .4); border-radius: 14px; padding: 22px 16px; margin-bottom: 16px;
  text-align: center; color: var(--muted); background: rgba(163, 230, 53, .05); cursor: pointer; font-size: .95rem;
}
.ad-slot:hover { border-color: var(--accent); }

/* Paid ads on the board */
.ad-card {
  border: 1px solid rgba(249, 115, 22, .65); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(249, 115, 22, .16), rgba(249, 115, 22, .05));
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.ad-card.ad-spotlight {
  border-color: rgba(163, 230, 53, .55);
  background: linear-gradient(135deg, rgba(163, 230, 53, .14), rgba(163, 230, 53, .04));
}
.ad-label {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #000; background: var(--accent);
  border-radius: 999px; padding: 2px 8px; margin-bottom: 8px;
}
.ad-line { margin: 0 0 2px; }
.ad-venue { font-weight: 800; color: var(--orange-bright); }
.ad-biz { font-weight: 800; font-size: 1.05rem; color: var(--ink); }
a.ad-biz { color: var(--orange-bright); text-decoration: none; }
a.ad-biz:hover { text-decoration: underline; }
.ad-text { margin: 0; font-size: .95rem; }

/* Empty states */
.empty {
  border: 1px dashed var(--line); border-radius: 14px; padding: 28px 16px;
  text-align: center; color: var(--muted); margin-bottom: 16px;
}

/* Players */
.player-card { display: flex; flex-direction: column; gap: 4px; }
.player-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.player-name { font-weight: 800; font-size: 1.05rem; }
.stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.stars .num { color: var(--ink); font-size: .85rem; letter-spacing: 0; }
.trait-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: .88rem; }
.trait-grid .t-label { color: var(--muted); }
@media (max-width: 520px) { .trait-grid { grid-template-columns: 1fr; } }
.rate-trait { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rate-trait .t-label { color: var(--muted); font-size: .88rem; }
.star-input { display: inline-flex; gap: 2px; direction: ltr; }
.star-input button {
  background: none; border: none; font-size: 1.35rem; line-height: 1; cursor: pointer;
  color: #3f4750; padding: 2px;
}
.star-input button.on { color: var(--gold); }

/* Advertise */
.offer-banner {
  background: rgba(249, 115, 22, .14); border: 1px solid rgba(249, 115, 22, .55); color: #fdba74;
  border-radius: 10px; padding: 10px 12px; font-weight: 700; margin: 12px 0;
}
.placement { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.placement h3 { margin: 0 0 4px; font-size: 1rem; }
.placement .price { color: var(--orange-bright); font-weight: 800; font-size: 1.05rem; }
.placement p { margin: 4px 0 0; font-size: .92rem; }

/* Buy-an-ad wizard */
.buy-step-title { margin: 0 0 12px; font-size: 1rem; color: var(--orange-bright); }
.buy-price { font-size: 1.3rem; font-weight: 800; color: var(--orange-bright); margin: 4px 0 12px; }
.buy-nav { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.buy-summary {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  margin: 0 0 12px; background: rgba(255, 255, 255, .03);
}
.buy-summary p { margin: 2px 0; }
.buy-total { font-weight: 800; font-size: 1.1rem; color: var(--orange-bright); }
.buy-done-title { font-size: 1.1rem; font-weight: 800; }

/* Footer — black bar (blends with the page), light-green writing */
.site-footer {
  background: #000; color: var(--accent); text-align: center;
  padding: 18px 16px 22px; margin-top: 26px;
  border-top: 1px solid var(--line);
}
.footer-name { font-weight: 800; font-size: 1.05rem; }
.footer-tag, .footer-model { font-size: .85rem; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line); padding: 7px 6px; text-align: start; vertical-align: top;
}
.admin-wrap { overflow-x: auto; }
