/* ==========================================================================
   Keto & Karaoke — Fantasy Football League Site
   Neon karaoke-night design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Poppins:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Neon palette */
  --pink: #ff2fb0;
  --pink-glow: #ff6fd8;
  --purple: #9b30ff;
  --purple-glow: #c084ff;
  --cyan: #29fff1;
  --yellow: #ffe83d;
  --green: #39ff88;

  --bg-0: #0a0518;
  --bg-1: #120a24;
  --bg-2: #1a0f34;
  --bg-card: #180d2e;
  --line: rgba(255, 255, 255, 0.08);
  --line-bright: rgba(255, 255, 255, 0.16);

  --text-0: #f5f0ff;
  --text-1: #cabfe8;
  --text-2: #8f81b8;

  --font-display: 'Bungee', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.5);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(60vw 40vh at 15% -5%, rgba(155, 48, 255, 0.35), transparent 60%),
    radial-gradient(50vw 40vh at 100% 10%, rgba(255, 47, 176, 0.25), transparent 60%),
    radial-gradient(40vw 30vh at 50% 100%, rgba(41, 255, 241, 0.12), transparent 60%),
    var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

::selection {
  background: var(--pink);
  color: var(--bg-0);
}

/* Scrollbar flourish */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--pink), var(--purple));
  border-radius: 10px;
}

/* ---------- Neon text helpers ---------- */

.neon-pink {
  color: var(--pink-glow);
  text-shadow:
    0 0 6px var(--pink),
    0 0 18px var(--pink),
    0 0 42px rgba(255, 47, 176, 0.6);
}

.neon-cyan {
  color: var(--cyan);
  text-shadow:
    0 0 6px var(--cyan),
    0 0 18px rgba(41, 255, 241, 0.8),
    0 0 42px rgba(41, 255, 241, 0.4);
}

.neon-yellow {
  color: var(--yellow);
  text-shadow:
    0 0 6px var(--yellow),
    0 0 16px rgba(255, 232, 61, 0.7);
}

.flicker {
  animation: flicker 6s infinite;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; }
  20%, 22%, 55% { opacity: 0.72; }
}

/* ---------- Top nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 5, 24, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green), 0 0 18px var(--green);
  animation: pulse 1.6s infinite;
  flex: none;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.86rem;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-1);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--bg-0);
  background: var(--cyan);
}

/* ---------- Marquee ticker ---------- */

.ticker {
  background: linear-gradient(90deg, var(--purple), var(--pink));
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.ticker-track {
  display: inline-flex;
  animation: scroll-left 32s linear infinite;
  padding: 9px 0;
}

.ticker-track span {
  padding: 0 2.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.ticker-track span::before {
  content: '🎤';
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 64px;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line-bright);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 1.02;
  margin: 0 0 20px;
}

.hero p.tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-1);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(90deg, var(--pink), var(--purple));
  color: #fff;
  box-shadow: 0 8px 30px rgba(255, 47, 176, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text-0);
  border: 1px solid var(--line-bright);
}

.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* Disco glow blob behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  max-width: 140vw;
  background: radial-gradient(circle, rgba(255,47,176,0.22), transparent 65%);
  filter: blur(10px);
  z-index: -1;
}

/* ---------- Callout of the week ---------- */

.callout-banner {
  margin: 40px auto 0;
  max-width: 760px;
  padding: 22px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(24,13,46,0.9), rgba(18,10,36,0.9));
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.callout-banner::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--pink), var(--yellow), var(--cyan), var(--pink));
  background-size: 300% 300%;
  z-index: -1;
  animation: callout-border 6s ease infinite;
}

@keyframes callout-border {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.callout-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
  white-space: nowrap;
}

.callout-line {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text-0);
}

@media (max-width: 640px) {
  .callout-banner { border-radius: var(--radius); }
}

/* ---------- Avatars ---------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: #fff;
  flex: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.name-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---------- Nav active link ---------- */

.nav-links a.active {
  color: var(--bg-0);
  background: var(--cyan);
}

/* ---------- Section shell ---------- */

section.panel {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 0;
}

.section-head .updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-2);
}

.section-sub {
  color: var(--text-1);
  max-width: 640px;
  margin: -20px 0 32px;
}

/* ---------- Cards ---------- */

.card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

/* ---------- Standings table ---------- */

.standings-card { overflow-x: auto; padding: 6px; }

table.standings {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.92rem;
}

table.standings th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-bright);
}

table.standings td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

table.standings tbody tr:hover { background: rgba(255,255,255,0.03); }
table.standings tbody tr:last-child td { border-bottom: none; }

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.06);
}

.rank-pill.top { background: linear-gradient(135deg, var(--yellow), var(--pink)); color: var(--bg-0); }

.streak {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 999px;
}

.streak.win { color: var(--green); background: rgba(57,255,136,0.12); }
.streak.loss { color: var(--pink-glow); background: rgba(255,47,176,0.12); }

.team-name { font-weight: 700; }
.team-manager { color: var(--text-2); font-size: 0.82rem; }

/* ---------- Matchups ---------- */

.matchup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.matchup-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.matchup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.matchup-row .name { font-weight: 600; font-size: 0.94rem; }
.matchup-row .score { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; }

.matchup-status {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: var(--text-2);
}

.matchup-status.live {
  color: var(--bg-0);
  background: var(--green);
  border-color: transparent;
  box-shadow: 0 0 12px rgba(57,255,136,0.6);
}

/* ---------- Power rankings ---------- */

.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-card {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
}

.rank-card .num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--purple-glow);
  text-align: center;
}

.rank-card .blurb { color: var(--text-1); font-size: 0.9rem; margin-top: 4px; }

.movement { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; }
.movement.up { color: var(--green); }
.movement.down { color: var(--pink-glow); }
.movement.flat { color: var(--text-2); }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

.gallery-item .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 10px 7px;
  font-size: 0.76rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-item:hover .cap { opacity: 1; }

.gallery-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.9rem;
  border: 1px dashed var(--line-bright);
  border-radius: var(--radius);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 2, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(90vw, 1000px);
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lightbox-cap {
  position: absolute;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  color: var(--text-1);
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 1.6rem;
  color: var(--text-0);
  cursor: pointer;
  background: none;
  border: none;
}

/* ---------- Trophy case ---------- */

.trophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.trophy-card {
  padding: 22px;
  text-align: center;
}

.trophy-card .medal { font-size: 2rem; margin-bottom: 8px; }
.trophy-card .season { font-family: var(--font-mono); color: var(--text-2); font-size: 0.78rem; }
.trophy-card .team { font-family: var(--font-display); font-size: 1.15rem; margin: 6px 0 4px; }
.trophy-card .manager { color: var(--text-1); font-size: 0.86rem; }

.subhead {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  color: var(--text-2);
  margin: 36px 0 16px;
}

.list-card { padding: 6px; }

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.list-row:last-child { border-bottom: none; }
.list-row .label { color: var(--text-1); }
.list-row .val { font-weight: 700; color: var(--yellow); }

/* ---------- Daily log ---------- */

.daily-log-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.signin-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signin-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 12px 18px;
  color: var(--text-0);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.signin-form input[type="email"]:focus {
  outline: none;
  border-color: var(--cyan);
}

.signin-note {
  margin: 10px 2px 0;
  font-size: 0.78rem;
  color: var(--text-2);
}

.composer-who {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cyan);
  margin-bottom: 10px;
}

#post-body {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text-0);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

#post-body:focus { outline: none; border-color: var(--cyan); }

.composer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.file-btn {
  cursor: pointer;
  font-size: 0.86rem;
  padding: 11px 18px;
}

.photo-name {
  font-size: 0.78rem;
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-log-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.log-post {
  padding: 18px 20px;
  display: flex;
  gap: 14px;
}

.log-post .avatar {
  width: 38px;
  height: 38px;
  font-size: 0.85rem;
  margin-top: 2px;
}

.log-post-body { flex: 1; min-width: 0; }

.log-post-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.log-post-head .who { font-weight: 700; font-size: 0.92rem; }
.log-post-head .team-tag { font-size: 0.76rem; color: var(--text-2); }
.log-post-head .when {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-2);
  margin-left: auto;
}

.log-post-text {
  font-size: 0.92rem;
  color: var(--text-1);
  white-space: pre-wrap;
  word-break: break-word;
}

.log-post-photo {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  max-height: 360px;
  width: auto;
  cursor: pointer;
}

/* ---------- Bonus: jukebox + trash talk ---------- */

.bonus-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

@media (max-width: 860px) {
  .bonus-grid { grid-template-columns: 1fr; }
}

.jukebox-list {
  display: flex;
  flex-direction: column;
}

.jukebox-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.jukebox-row:last-child { border-bottom: none; }

.jukebox-row .icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex; align-items: center; justify-content: center;
  flex: none;
  font-size: 0.95rem;
}

.jukebox-row .team { font-weight: 700; font-size: 0.88rem; }
.jukebox-row .song { color: var(--text-1); font-size: 0.82rem; }

.trash-card {
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  justify-content: center;
}

#trash-output {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  min-height: 70px;
  display: flex;
  align-items: center;
  color: var(--cyan);
}

/* ---------- Footer ---------- */

footer {
  padding: 48px 0 64px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}

footer .hearts { margin-top: 6px; }

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive nav ---------- */

@media (max-width: 720px) {
  .nav .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; }
  .nav-links { width: 100%; justify-content: flex-start; gap: 2px; }
  .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
  .rank-card { grid-template-columns: 36px 1fr; }
  .rank-card .movement { grid-column: 2; justify-self: start; }
}
