:root {
  --bg: #07111f;
  --panel: #0d1b2d;
  --panel-soft: #12243a;
  --text: #f4f7fb;
  --muted: #9fb0c5;
  --primary: #31e981;
  --primary-dark: #19bd65;
  --accent: #63a5ff;
  --gold: #ffd76a;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.10);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius: 20px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

button, input {
  font: inherit;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #05120b;
  background: linear-gradient(135deg, var(--primary), #b8ff65);
  border-radius: 12px;
  font-weight: 900;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav > a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

nav > a:hover {
  color: var(--text);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.7rem;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 17px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #8eff8e);
  color: #06140b;
  box-shadow: 0 10px 30px rgba(49, 233, 129, 0.20);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}

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

.btn-large {
  padding: 14px 22px;
}

.hero {
  min-height: 760px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(49, 233, 129, 0.12), transparent 30%),
    linear-gradient(180deg, #07111f 0%, #091727 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  font-weight: 800;
}

.hero h1 {
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  line-height: 1.02;
  max-width: 780px;
  margin: 18px 0 24px;
}

.hero h1 span {
  color: var(--primary);
}

.hero-copy > p {
  color: var(--muted);
  max-width: 650px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
}

.trust-row {
  display: flex;
  gap: 36px;
  margin-top: 42px;
}

.trust-row div {
  display: grid;
}

.trust-row strong {
  font-size: 1.25rem;
}

.trust-row span {
  color: var(--muted);
  font-size: 0.78rem;
}

.featured-card {
  background: linear-gradient(180deg, rgba(18, 36, 58, 0.95), rgba(10, 24, 40, 0.96));
  border: 1px solid rgba(255, 215, 106, 0.25);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), transparent 40%);
}

.featured-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.featured-top small {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 1px;
}

.featured-top h2 {
  font-size: 1.15rem;
  margin-top: 4px;
}

.crown {
  color: var(--gold);
  font-size: 2rem;
}

.status {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 800;
}

.status.live {
  color: #05140a;
  background: var(--primary);
}

.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  margin: 36px 0;
}

.team {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
}

.crest {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  font-weight: 800;
}

.score {
  text-align: center;
  display: grid;
}

.score strong {
  font-size: 1.75rem;
}

.score small {
  color: var(--muted);
}

.pick-box {
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
}

.pick-box span {
  color: var(--muted);
  font-size: 0.8rem;
}

.pick-box strong {
  margin-top: 3px;
}

.meter-row {
  margin-top: 18px;
}

.meter-row > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.meter-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.meter {
  height: 9px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.meter i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--primary), #d5ff6c);
  border-radius: inherit;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 18px;
}

.section {
  padding: 100px 0;
}

.section-dark {
  background: #091625;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.section-heading.centered {
  justify-content: center;
  text-align: center;
}

.section-heading h2,
.results-grid h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-top: 8px;
}

.filter-button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
}

.filter-button.active {
  color: #06140b;
  background: var(--primary);
  border-color: var(--primary);
}

.prediction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.prediction-card {
  background: linear-gradient(180deg, var(--panel), #0a1728);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: 0.2s ease;
}

.prediction-card:hover {
  transform: translateY(-4px);
  border-color: rgba(49, 233, 129, 0.35);
}

.prediction-card.crowned {
  border-color: rgba(255, 215, 106, 0.35);
}

.league {
  color: var(--muted);
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
}

.prediction-card h3 {
  margin: 18px 0 22px;
}

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

.prediction-main > div:first-child {
  display: grid;
}

.prediction-main small {
  color: var(--muted);
}

.confidence {
  min-width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  border: 5px solid rgba(255,255,255,0.08);
}

.confidence.high {
  color: var(--primary);
}

.confidence.premium {
  color: var(--gold);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.steps article {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.steps article > span {
  color: var(--primary);
  font-weight: 800;
}

.steps h3 {
  margin: 18px 0 8px;
}

.steps p {
  color: var(--muted);
  font-size: 0.9rem;
}

.results-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.section-text {
  color: var(--muted);
  max-width: 520px;
  margin-top: 18px;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stats-panel > div {
  background: var(--panel);
  padding: 28px;
  display: grid;
}

.stats-panel strong {
  font-size: 2rem;
  color: var(--primary);
}

.stats-panel span {
  color: var(--muted);
}

.stats-panel p {
  grid-column: 1 / -1;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 14px 28px;
}

.pricing-section {
  background:
    radial-gradient(circle at center, rgba(49,233,129,0.08), transparent 34%),
    #07111f;
}

.pricing-card {
  width: min(760px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  background: linear-gradient(145deg, #10233a, #0b1929);
  border: 1px solid rgba(49, 233, 129, 0.28);
  border-radius: 26px;
  padding: 36px;
  box-shadow: var(--shadow);
}

.plan-name {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 1px;
}

.price {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 12px 0;
}

.price strong {
  font-size: 3rem;
  line-height: 1;
}

.price span,
.pricing-card p,
.pricing-card li {
  color: var(--muted);
}

.pricing-card ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.pricing-card li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 900;
  margin-right: 10px;
}

.pricing-card .btn {
  grid-column: 1 / -1;
}

footer {
  padding: 56px 0 28px;
  border-top: 1px solid var(--border);
  background: #050c16;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-grid p {
  color: var(--muted);
  margin-top: 14px;
}

.footer-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
}

.legal {
  display: flex;
  justify-content: space-between;
  color: #71839a;
  font-size: 0.76rem;
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(7px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  background: #0d1b2d;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal-card > p {
  color: var(--muted);
  margin: 8px 0 22px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal form {
  display: grid;
  gap: 14px;
}

.modal label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

.modal input {
  width: 100%;
  background: rgba(255,255,255,0.055);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 13px;
  outline: none;
}

.modal input:focus {
  border-color: var(--primary);
}

.form-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--primary);
  font-size: 0.85rem;
}

@media (max-width: 940px) {
  .hero {
    padding: 100px 0 70px;
  }

  .hero-grid,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .prediction-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .menu-button {
    display: block;
  }

  nav {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    background: #0d1b2d;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
  }

  nav.open {
    display: flex;
  }

  nav > a {
    padding: 8px 4px;
  }
}

@media (max-width: 650px) {
  .section {
    padding: 72px 0;
  }

  .hero h1 {
    font-size: 2.65rem;
  }

  .hero-actions,
  .trust-row,
  .footer-grid,
  .legal {
    flex-direction: column;
  }

  .trust-row {
    gap: 16px;
  }

  .prediction-grid,
  .steps,
  .pricing-card,
  .stats-panel {
    grid-template-columns: 1fr;
  }

  .pricing-card .btn,
  .stats-panel p {
    grid-column: auto;
  }

  .teams {
    gap: 10px;
  }

  .crest {
    width: 58px;
    height: 58px;
    font-size: 0.8rem;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}


/* CROWN PICKSPORTS V2 — escudos de equipos */
.crest {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
}

.crest img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.match-teams {
  min-height: 96px;
  margin: 18px 0 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.mini-team {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.mini-team img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  padding: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
}

.mini-team strong {
  max-width: 110px;
  font-size: 0.88rem;
  line-height: 1.2;
}

.versus {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

@media (max-width: 420px) {
  .mini-team img {
    width: 48px;
    height: 48px;
  }

  .mini-team strong {
    font-size: 0.78rem;
  }
}

/* Autenticación real con Netlify Identity */
.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--primary);
  background: rgba(49, 233, 129, 0.08);
  border: 1px solid rgba(49, 233, 129, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.member-panel {
  position: relative;
  z-index: 10;
  background: rgba(49, 233, 129, 0.10);
  border-bottom: 1px solid rgba(49, 233, 129, 0.22);
}

.member-panel-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.member-panel-inner > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.member-panel-inner span {
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-panel-inner b {
  color: var(--text);
}

.member-status {
  flex: 0 0 auto;
  color: #06140b !important;
  background: var(--primary);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.7rem !important;
  font-weight: 900;
  letter-spacing: 0.7px;
}

.auth-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: min(420px, calc(100% - 40px));
  padding: 15px 18px;
  color: #06140b;
  background: var(--primary);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.auth-toast.error {
  color: #fff;
  background: var(--danger);
}

.auth-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-warning {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  padding: 14px;
  color: #fff;
  background: var(--danger);
  border-radius: 12px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 940px) {
  .auth-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-actions {
    grid-template-columns: 1fr;
  }

  .user-chip {
    max-width: 100%;
    text-align: center;
  }

  .member-panel-inner > div {
    display: grid;
    gap: 0;
  }
}

@media (max-width: 560px) {
  .member-panel-inner {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .member-panel-inner span {
    white-space: normal;
  }
}
