:root {
  --bg-main: #05050a;
  --bg-alt: #0a0a14;
  --surface: rgba(18, 18, 34, 0.72);
  --surface-hover: rgba(28, 26, 52, 0.88);
  --border: rgba(157, 123, 218, 0.22);
  --border-strong: rgba(157, 123, 218, 0.55);

  /* Paleta inspirada en el logo de Novaris */
  --purple: #9d7bd8;
  --violet: #7c5cff;
  --indigo: #5b72d6;
  --silver: #e2e6f3;
  --text-main: #f3f5fc;
  --text-muted: #9da4c0;

  --win: #34d399;
  --loss: #f87171;
  --gold: #fbbf24;

  --radius: 16px;
  --transition: 0.25s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Rajdhani", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-name, .stat-number {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.04em;
}

#cosmic-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 20% 15%, rgba(124, 92, 255, 0.14), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(91, 114, 214, 0.14), transparent 50%),
              var(--bg-main);
}

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 10, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(157, 123, 216, 0.5));
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 800;
}

.brand-name span {
  color: var(--purple);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1.05rem;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-main);
}

.btn-nav {
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: #fff !important;
  box-shadow: 0 0 18px rgba(124, 92, 255, 0.35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--silver);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--indigo));
  color: #fff;
  box-shadow: 0 6px 24px rgba(124, 92, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--silver);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: rgba(157, 123, 216, 0.14);
  transform: translateY(-2px);
}

.full-width {
  width: 100%;
}

/* Hero */
.hero {
  padding: 88px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  align-items: center;
  gap: 48px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(157, 123, 216, 0.12);
  border: 1px solid var(--border);
  color: var(--silver);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 12px var(--purple);
  animation: pulse 1.8s infinite;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff, var(--purple), var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-desc strong {
  color: var(--silver);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-aura {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157, 123, 216, 0.38), rgba(91, 114, 214, 0.16) 55%, transparent 72%);
  filter: blur(22px);
  animation: auraPulse 4s ease-in-out infinite;
}

.hero-logo {
  position: relative;
  width: min(340px, 85%);
  height: auto;
  filter: drop-shadow(0 0 28px rgba(139, 118, 224, 0.55));
  animation: float 5s ease-in-out infinite;
}

/* Secciones */
.section {
  padding: 88px 0;
}

.section-alt {
  background: rgba(10, 10, 20, 0.72);
  border-top: 1px solid rgba(157, 123, 216, 0.1);
  border-bottom: 1px solid rgba(157, 123, 216, 0.1);
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  color: var(--purple);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.08rem;
}

/* Roster */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.player-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.player-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 36px rgba(91, 114, 214, 0.22);
}

.captain-card {
  border-color: rgba(157, 123, 216, 0.55);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.12), var(--surface) 45%);
}

.captain-badge {
  position: absolute;
  top: -13px;
  right: 20px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--indigo));
  color: #fff;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.45);
}

.player-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.player-avatar {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Orbitron", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(157, 123, 216, 0.28), rgba(91, 114, 214, 0.28));
  border: 1px solid var(--border-strong);
  color: var(--silver);
}

.player-header h3 {
  font-size: 1.25rem;
}

.player-role {
  color: var(--purple);
  font-weight: 600;
  font-size: 0.95rem;
}

.player-meta {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.player-meta strong {
  color: var(--silver);
}

.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.stat-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.bar {
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), var(--indigo));
}

.btn-camera {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(157, 123, 216, 0.1);
  color: var(--silver);
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.player-card:hover .btn-camera {
  background: linear-gradient(135deg, var(--purple), var(--indigo));
  color: #fff;
}

/* Partidos */
.next-match-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(91, 114, 214, 0.12));
  border: 1px solid var(--border-strong);
  margin-bottom: 32px;
}

.match-tourney {
  display: block;
  color: var(--purple);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.match-teams {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
}

.team-side img {
  height: 38px;
}

.rival-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 800;
}

.vs-pill {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  color: var(--purple);
}

.countdown {
  display: flex;
  gap: 12px;
}

.time-box {
  min-width: 66px;
  padding: 10px 8px;
  text-align: center;
  border-radius: 10px;
  background: rgba(5, 5, 10, 0.7);
  border: 1px solid var(--border);
}

.time-box span {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--silver);
}

.time-box small {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: "Orbitron", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--indigo));
  color: #fff;
  border-color: transparent;
}

.matches-list {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.matches-list.active {
  display: flex;
}

.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
}

.match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.match-format,
.result-badge {
  padding: 2px 10px;
  border-radius: 6px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.match-format {
  background: rgba(157, 123, 216, 0.14);
  color: var(--silver);
}

.result-badge.win {
  background: rgba(52, 211, 153, 0.16);
  color: var(--win);
}

.result-badge.loss {
  background: rgba(248, 113, 113, 0.16);
  color: var(--loss);
}

.match-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.team-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}

.team-inline.right {
  justify-content: flex-end;
}

.team-inline img {
  height: 28px;
}

.match-time,
.match-score {
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
  color: var(--purple);
  font-size: 0.98rem;
}

/* Estadísticas y Palmarés */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.stat-card {
  text-align: center;
  padding: 28px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--silver);
  margin-bottom: 6px;
}

.stat-title {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1rem;
}

.trophies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trophy-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trophy-rank {
  min-width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
}

.trophy-rank.gold {
  background: rgba(251, 191, 36, 0.16);
  color: var(--gold);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.trophy-rank.silver {
  background: rgba(226, 230, 243, 0.12);
  color: var(--silver);
  border: 1px solid rgba(226, 230, 243, 0.35);
}

.trophy-card h4 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.trophy-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Scrims */
.scrims-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 42px;
  align-items: start;
}

.scrims-info h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 8px 0 16px;
}

.scrims-info p {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-bottom: 22px;
}

.scrim-rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--silver);
  font-weight: 600;
}

.scrim-rules li::before {
  content: "✦ ";
  color: var(--purple);
}

.scrim-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--silver);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(5, 5, 12, 0.85);
  color: var(--text-main);
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
}

/* Footer */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: rgba(5, 5, 10, 0.92);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  height: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--silver);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 8, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.open {
  display: grid;
}

.modal-box {
  position: relative;
  width: min(480px, 100%);
  background: #0d0d1a;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-header h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.modal-header p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}

.cam-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cam-item span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.cam-item strong {
  font-family: "Orbitron", sans-serif;
  color: var(--silver);
  font-size: 0.95rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  padding: 14px 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Animaciones */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes auraPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .roster-grid,
  .trophies-grid,
  .scrims-wrapper {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-visual {
    order: -1;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(8, 8, 18, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .match-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .team-inline,
  .team-inline.right {
    justify-content: center;
  }
}