/* =====================================
   GAME DETAIL PAGE STYLES
===================================== */

.game-header {
  height: 350px;
  overflow: hidden;
  position: relative;
  margin-bottom: 3rem;
}

.game-header-image {
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.game-header-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
}

.game-header-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.game-header-content {
  color: var(--text-main);
}

.game-header-content h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: bold;
}

.game-genre {
  margin: 0;
  color: var(--primary);
  font-size: 1rem;
  text-transform: uppercase;
  font-weight: 600;
}

/* Game Info Section */
.game-info-section {
  padding: 2rem 0 3rem 0;
}

.game-info-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
}

.game-info-main h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.game-info-main > p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.game-specs {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-muted);
  font-weight: 600;
}

.spec-value {
  color: var(--primary);
  font-weight: bold;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  width: 100%;
  text-align: center;
  display: block;
}

/* Stats Panel */
.game-stats-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.game-stats-panel h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-align: center;
}

.stat-box {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.stat-box:last-child {
  margin-bottom: 0;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Leaderboard Section */
.leaderboard-section {
  background: rgba(0, 240, 255, 0.05);
  padding: 3rem 0;
}

.leaderboard-section h2 {
  margin-bottom: 2rem;
  text-align: center;
}

.leaderboard-table {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead {
  background: rgba(0, 240, 255, 0.1);
  border-bottom: 2px solid var(--border-light);
}

.leaderboard-table th {
  padding: 1rem;
  text-align: left;
  color: var(--primary);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.leaderboard-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.leaderboard-table tr:hover {
  background: rgba(0, 240, 255, 0.05);
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.rank-cell {
  text-align: center;
}

.rank-badge {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.1rem;
}

.player-name {
  font-weight: 600;
}

.rating {
  color: var(--primary);
}

.win-loss {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.playtime {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.leaderboard-section .btn {
  display: block;
  margin: 0 auto;
}

/* Tournaments Section */
.tournaments-section {
  padding: 3rem 0;
}

.tournaments-section h2 {
  margin-bottom: 2rem;
}

.game-competition-section {
  padding: 2.2rem 0 1.4rem;
}

.game-competition-grid {
  align-items: start;
}

.game-competition-grid .card h2 {
  margin-bottom: 1rem;
}

.section-head-inline {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-head-inline h2 {
  margin: 0;
}

.tournament-category {
  margin-bottom: 2rem;
}

.tournament-category h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.tournament-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tournament-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.25rem;
  transition: transform 0.3s, border-color 0.3s;
}

.tournament-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.tournament-card--live {
  border-color: #ff1493;
  background: rgba(255, 20, 147, 0.05);
  border-width: 2px;
}

.tournament-card--past {
  opacity: 0.85;
}

.tournament-title {
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.tournament-details {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tournament-details span {
  flex: 1;
}

.request-row {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-small {
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
  display: block;
  text-align: center;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 20, 147, 0.05));
  padding: 3rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.quick-links-card {
  margin-top: 1rem;
}

.quick-links-card h3 {
  margin: 0 0 0.8rem 0;
  color: var(--text-main);
}

.quick-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.game-links-section {
  padding: 1rem 0 3rem 0;
}

.link-list {
  margin: 0;
  padding-left: 1.2rem;
}

.link-list li {
  margin-bottom: 0.65rem;
}

.link-list a {
  color: var(--primary);
  text-decoration: none;
}

.link-list a:hover {
  text-decoration: underline;
}

.arena-list-section {
  padding: 1rem 0 3rem 0;
}

/* Responsive */
@media (max-width: 968px) {
  .game-header-content h1 {
    font-size: 2rem;
  }

  .game-info-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .game-stats-panel {
    position: static;
  }

  .tournament-cards {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 600px) {
  .game-header {
    height: 250px;
    margin-bottom: 2rem;
  }

  .game-header-content h1 {
    font-size: 1.5rem;
  }

  .game-genre {
    font-size: 0.9rem;
  }

  .game-info-grid {
    grid-template-columns: 1fr;
  }

  .game-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .spec-item {
    flex-direction: column;
    border-bottom: none;
  }

  .stat-box {
    background: transparent;
    border: none;
  }

  .leaderboard-table {
    font-size: 0.9rem;
  }

  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem;
  }

  .tournament-cards {
    grid-template-columns: 1fr;
  }

  .tournament-details {
    flex-direction: column;
    gap: 0.25rem;
  }
}
