:root {
  --ink: #0b0f1a;
  --cream: #f5efe6;
  --cream-75: rgba(245, 239, 230, 0.75);
  --cream-60: rgba(245, 239, 230, 0.6);
  --cobalt: #2d62ff;
  --cobalt-2: #1d3b99;
  --ember: #ff6b35;
  --card: rgba(15, 20, 36, 0.85);
  --stroke: rgba(255, 255, 255, 0.1);
}

* {
  font-family: "Space Grotesk", system-ui, sans-serif;
}

body {
  background: radial-gradient(circle at top, #121a33, var(--ink));
}

.bg-ink {
  background-color: var(--ink);
}

.text-cream {
  color: var(--cream);
}

.text-cream-75 {
  color: var(--cream-75);
}

.text-cream-60 {
  color: var(--cream-60);
}

.text-ink {
  color: var(--ink);
}

.hero-section {
  min-height: 90vh;
}

.navbar .nav-link {
  color: var(--cream);
  font-weight: 500;
}

.navbar .btn-primary {
  border-radius: 999px;
}

.navbar .navbar-brand span {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-card {
  background: var(--card);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.feature-card,
.stack-card,
.cta-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(16px);
}

.flow-section {
  background: linear-gradient(135deg, rgba(45, 98, 255, 0.15), transparent);
}

.cta-card {
  background: linear-gradient(120deg, rgba(45, 98, 255, 0.25), rgba(255, 107, 53, 0.2));
}

.btn-primary {
  background: linear-gradient(120deg, #8f6d3f, #c09a6a);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(120deg, #c09a6a, #8f6d3f);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.6);
}

.badge.text-bg-light {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

.matchup {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.score {
  font-size: 1.5rem;
  font-weight: 700;
}

.shadow-glow {
  box-shadow: 0 12px 30px rgba(45, 98, 255, 0.45);
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}

.flow-step span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(45, 98, 255, 0.3);
  font-weight: 600;
}

.brand-logo {
  width: 136px;
  height: 136px;
  object-fit: contain;
}

.logo-light {
  display: none;
}

@media (prefers-color-scheme: light) {
  .logo-dark {
    display: none;
  }
  .logo-light {
    display: inline-block;
  }
}

@media (max-width: 991px) {
  .hero-section {
    min-height: auto;
  }
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.auth-card {
  width: min(520px, 100%);
  background: rgba(12, 16, 30, 0.9);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.auth-card .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cream);
}

.auth-card .form-control::placeholder {
  color: rgba(245, 239, 230, 0.6);
}

.auth-card .nav-pills .nav-link {
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  margin-right: 8px;
}

.auth-card .nav-pills .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.dashboard-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}

.dashboard-body {
  background: #f2f3f5;
  color: #10131a;
}

.dashboard-body .text-cream {
  color: #10131a;
}

.dashboard-body .text-cream-75 {
  color: #4b5563;
}

.dashboard-body .text-cream-60 {
  color: #6b7280;
}

.sidebar {
  background: #0f1426;
  border-right: 1px solid var(--stroke);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar .nav-link {
  color: var(--cream-75);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 6px;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
}

.content {
  padding: 32px 36px 48px;
  background: #f2f3f5;
}

.stat-card,
.panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px 24px;
}

.panel {
  padding: 24px;
}

.dashboard-body .btn-outline-light {
  color: #1f2937;
  border-color: #cbd5e1;
  background: #ffffff;
}

.dashboard-body .btn-outline-light:hover {
  color: #111827;
  background: #e5e7eb;
  border-color: #94a3b8;
}

.table.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: #f3f4f6;
  --bs-table-hover-bg: #eaecef;
  --bs-table-color: #111827;
  border-color: #e5e7eb;
}

.teams-table .team-col {
  width: 20%;
  min-width: 20%;
}

.drawer-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
  padding-bottom: 8px;
}

.drawer-content.is-open {
  opacity: 1;
  transform: translateY(0);
}

.drawer-handle {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.drawer-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.drawer-toggle-btn:hover {
  background: #f3f4f6;
  border-color: #94a3b8;
}

.drawer-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.drawer-icon svg {
  width: 18px;
  height: 18px;
}

.drawer-toggle-btn.is-collapsed .drawer-icon {
  transform: rotate(180deg);
}

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

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

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

.drawer-panel {
  height: 100%;
}

.stat-card {
  border-radius: 18px;
  padding: 18px 20px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 18px 28px rgba(15, 23, 42, 0.18);
}

.stat-blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-green {
  background: linear-gradient(135deg, #10b981, #059669);
}

.stat-orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-pink {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  opacity: 0.95;
}

.stat-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stat-icon {
  font-size: 0.8rem;
  opacity: 0.8;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-sub {
  font-size: 0.85rem;
  opacity: 0.9;
}

.stat-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.stat-progress span {
  display: block;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
}

.competitor-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
}

.competitor-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}

.competitor-photo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.competitor-name {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-avatar {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  object-fit: cover;
}

.match-name {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  flex: 1;
  min-width: 0;
}

.bracket-panel {
  background: #f5f7fb;
  color: #1f2937;
  border: 1px solid #dbe3ef;
}

.bracket-panel h3 {
  color: #1f2937;
}

.fg-canvas {
  position: relative;
  overflow-x: auto;
  padding-bottom: 24px;
}

.fg-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  stroke: #5b6478;
  stroke-width: 2px;
  fill: none;
}

.fg-round-title {
  position: absolute;
  top: 8px;
  width: 220px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  z-index: 3;
}

.fg-match {
  position: absolute;
  z-index: 4;
  background: #f5f7fb;
}

.fg-match-header {
  background: #86b7fe7d;
  color: #1f2937;
  font-size: 0.78rem;
  text-align: center;
  padding: 6px 8px;
  border-radius: 8px 8px 0 0;
  border: 1px solid #d6deea;
  font-weight: bold;
}

.fg-match-body {
  border: 1px solid #d6deea;
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #ffffff;
}

.fg-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0;
  border-radius: 12px;
  background: #d7e6ff70;
  color: #1f2937;
  font-weight: 600;
  overflow: hidden;
  min-height: 34px;
}

.fg-match.is-bye .fg-player {
  background: #e6ebf3;
  color: #4b5563;
}

.fg-player.is-winner {
  background: #22c55e;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(13, 148, 80, 0.6);
}

.fg-player-photo {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}
.fg-champion {
  background: transparent;
}

.fg-champ {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 16px;
  border-radius: 12px;
  background: #ffb47a;
  color: #1f2937;
  font-weight: 700;
  border: 1px solid #f1a362;
}

.matches-table {
  table-layout: fixed;
  width: 100%;
}

.matches-table th,
.matches-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 8px 10px;
  font-size: 0.92rem;
}

.matches-table .col-match,
.matches-table td.col-match,
.matches-table .col-location,
.matches-table td.col-location {
  white-space: normal;
}

.matches-table .col-match {
  width: 30%;
}

.matches-table .col-location {
  width: 16%;
}

.matches-table th.text-end,
.matches-table td.text-end {
  width: 16%;
}

@media (max-width: 1400px) {
  .competitor-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .competitor-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .competitor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.status-ok {
  background: rgba(52, 168, 83, 0.25);
  color: #a6f3c6;
}

.status-live {
  background: rgba(66, 133, 244, 0.3);
  color: #c2d7ff;
}

.status-ready {
  background: rgba(250, 173, 20, 0.25);
  color: #ffe6a7;
}

@media (max-width: 991px) {
  .dashboard-wrap {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .content {
    padding: 24px;
  }
}
