/* Tournament Page Styles */
:root {
  /* Colors */
  --slate-900: #0d131c;
  --slate-800: #161d29;
  --slate-750: #1a2030;
  --slate-700: #1e2840;
  --slate-600: #2a3550;
  --slate-500: #475569;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;

  --gold-300: #fde68a;
  --gold-400: #facc15;
  --gold-500: #f59e0b;
  --brand-red: #e63946;
  --brand-red-dark: #b91c2c;
  --green-500: #22c55e;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  /* Border Radius */
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;

  /* Shadows */
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.25), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.15);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--slate-900);
  color: white;
  line-height: 1.5;
}

/* Layout */
.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: var(--space-3);
}

@media (min-width: 640px) {
  .container {
    padding: var(--space-6);
  }
}

/* Tournament Frame */
.tournament-frame {
  background: linear-gradient(120deg, var(--brand-red), var(--gold-500) 55%, var(--brand-red));
  padding: 1px;
  border-radius: var(--radius-3xl);
  box-shadow: var(--shadow-2xl);
  margin-bottom: var(--space-8);
}

.tournament-inner {
  background-color: var(--slate-800);
  border-radius: calc(var(--radius-3xl) - 2px);
  padding: var(--space-6);
}

/* Tournament Header */
.tournament-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

@media (min-width: 640px) {
  .tournament-header {
    gap: var(--space-3);
    margin-bottom: var(--space-6);
  }
}

.tournament-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.01em;
}

@media (min-width: 640px) {
  .tournament-title {
    font-size: 1.875rem;
  }
}

/* Live Badge */
.live-badge {
  background-color: var(--green-500);
  color: white;
  padding: var(--space-1) var(--space-2);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
  display: flex;
  align-items: center;
}

@media (min-width: 640px) {
  .live-badge {
    font-size: 0.875rem;
  }
}

.live-dot {
  width: 0.375rem;
  height: 0.375rem;
  background-color: white;
  border-radius: 50%;
  margin-right: var(--space-1);
  animation: pulse 2s infinite;
}

@media (min-width: 640px) {
  .live-dot {
    width: 0.5rem;
    height: 0.5rem;
    margin-right: var(--space-2);
  }
}

/* Tournament Card */
.tournament-card {
  background-color: var(--slate-700);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  margin-bottom: var(--space-8);
  border: 1px solid var(--slate-600);
  box-shadow: var(--shadow-xl);
}

.tournament-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 1024px) {
  .tournament-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* Tournament Image */
.tournament-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background-color: var(--slate-900);
}

.tournament-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Tournament Details */
.tournament-details {
  padding: var(--space-4);
  background: linear-gradient(160deg, var(--slate-750), var(--slate-700));
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .tournament-details {
    padding: var(--space-4);
  }
}

/* Prize hero */
.prize-hero {
  text-align: center;
  padding: var(--space-2);
  margin-bottom: var(--space-2);
  background: linear-gradient(160deg, rgba(250, 204, 21, 0.14), rgba(230, 57, 70, 0.08));
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: var(--radius-xl);
}

@media (min-width: 640px) {
  .prize-hero {
    padding: var(--space-3);
    margin-bottom: var(--space-3);
  }
}

.prize-hero-label {
  color: var(--slate-300);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-1);
}

.prize-hero-value {
  font-size: 1.625rem;
  font-weight: 900;
  color: var(--gold-400);
  text-shadow: 0 0 24px rgba(250, 204, 21, 0.45), 0 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.1;
}

@media (min-width: 640px) {
  .prize-hero-value {
    font-size: 1.875rem;
  }
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

@media (min-width: 640px) {
  .info-grid {
    gap: var(--space-3);
    margin-bottom: var(--space-3);
  }
}

.info-box {
  background-color: var(--slate-600);
  border-radius: var(--radius-lg);
  padding: var(--space-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
  .info-box {
    padding: var(--space-3);
  }
}

.info-label {
  color: var(--slate-300);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

@media (min-width: 640px) {
  .info-label {
    font-size: 0.8125rem;
    margin-bottom: var(--space-2);
  }
}

.info-value {
  font-size: 1.125rem;
  font-weight: bold;
}

.info-value--white {
  color: white;
}

.info-value--small {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Countdown */
.countdown-caption {
  text-align: center;
  color: var(--slate-300);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.countdown-box {
  background: linear-gradient(160deg, var(--slate-600), var(--slate-700));
  border: 1px solid var(--brand-red);
  border-radius: var(--radius-lg);
  padding: var(--space-1);
  text-align: center;
  min-width: 48px;
  box-shadow: 0 0 14px rgba(230, 57, 70, 0.25);
}

@media (min-width: 640px) {
  .countdown-box {
    padding: var(--space-2) var(--space-3);
    min-width: 60px;
  }
}

.countdown-value {
  font-size: 1.125rem;
  font-weight: 900;
  color: white;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .countdown-value {
    font-size: 1.375rem;
  }
}

.countdown-label {
  font-size: 0.6875rem;
  color: var(--slate-300);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.countdown-separator {
  color: var(--slate-400);
  font-size: 1.125rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .countdown-separator {
    font-size: 1.5rem;
  }
}

/* Games Section */
.games-section {
  margin-bottom: var(--space-4);
  scroll-margin-top: 90px;
}

.games-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.games-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.games-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: var(--brand-red);
  border-radius: 2px;
  margin-right: var(--space-2);
  vertical-align: -0.15em;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .games-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.game-card {
  display: block;
  background-color: var(--slate-700);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--slate-600);
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-red);
}

.game-image,
.game-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
}

.game-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--slate-600);
}

.game-card-name {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--slate-300);
  text-align: center;
  padding: var(--space-1) var(--space-2);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-8) 0;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-300);
  margin-bottom: var(--space-2);
}

.empty-description {
  color: var(--slate-400);
  font-size: 0.875rem;
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
