:root {
  /* Primary Colors - Dark Blue Theme */
  --primary-dark: #1a1f4d;
  --primary: #242873;
  --primary-light: #2e3291;
  --primary-lighter: #3e3fd0;

  /* Background Colors */
  --bg-dark: #1a1f4d;
  --bg-main: #242873;
  --bg-card: #2e3291;
  --bg-light: #3e3fd0;

  /* Accent Colors */
  --accent-yellow: #f7b928;
  --accent-yellow-light: #ffc940;
  --accent-yellow-dark: #e6a00b;

  /* Text Colors */
  --text-white: #ffffff;
  --text-light: #e0eaff;
  --text-muted: #a4bcfd;
  --text-dark: #1c1e50;

  /* Status Colors */
  --status-live: #ef4444;
  --status-finished: #3b82f6;
  --status-upcoming: #f7b928;
  --status-success: #10b981;

  /* Button Colors */
  --btn-primary: #3e3fd0;
  --btn-primary-hover: #4f4feb;
  --btn-yellow: #f7b928;
  --btn-yellow-hover: #ffc940;
  --btn-dark: #1a1f4d;
  --btn-dark-hover: #242873;
  --btn-success: #10b981;
  --btn-success-hover: #0da271;
  --btn-danger: #ef4444;
  --btn-danger-hover: #dc2626;
}

/* Base Styles */
html,
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-dark);
}

/* Top Navigation */
.top-nav {
  background-color: var(--bg-dark);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-white);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-brand i {
  color: var(--accent-yellow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}

.nav-link:hover {
  color: var(--accent-yellow);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--accent-yellow);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link i {
  font-size: 1.25rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-balance {
  background-color: rgba(62, 63, 208, 0.3);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.balance-amount {
  color: var(--accent-yellow);
}

.add-credits {
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.add-credits:hover {
  background-color: var(--accent-yellow-light);
  transform: scale(1.1);
}

.user-profile {
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.user-profile:hover {
  color: var(--accent-yellow);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  background: transparent;
}

/* Hero Section */
.hero-section {
  background-color: var(--bg-main);
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 1rem;
}

.hero-title .highlight {
  color: var(--accent-yellow);
  position: relative;
}

.hero-title .highlight::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent-yellow);
  border-radius: 9999px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-yellow {
  background-color: var(--btn-yellow);
  color: var(--text-dark);
}

.btn-yellow:hover {
  background-color: var(--btn-yellow-hover);
  transform: translateY(-2px);
}

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

.btn-dark:hover {
  background-color: var(--btn-dark-hover);
  transform: translateY(-2px);
}

.btn-icon {
  margin-left: 0.5rem;
}

/* Featured Tournaments Section */
.featured-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  background: transparent;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
}

.view-all {
  color: var(--accent-yellow);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 500;
}

.view-all:hover {
  text-decoration: underline;
}

/* Tournament Cards */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

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

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

.tournament-card {
  background-color: var(--bg-dark);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}

.tournament-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.tournament-image {
  width: 100%;
  height: 180px;
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem 0.75rem 0 0;
}

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

.tournament-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-main), var(--bg-card));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.tournament-placeholder i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-yellow);
}

.tournament-placeholder span {
  font-size: 0.875rem;
  font-weight: 500;
}

.tournament-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  height: 100%;
}

.tournament-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.tournament-game {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tournament-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  background-color: transparent;
}

.tournament-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  background-color: rgba(46, 50, 145, 0.3);
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
}

.prize-pool {
  color: var(--accent-yellow);
  font-weight: 600;
}

.teams-count,
.tournament-date {
  color: var(--text-muted);
}

.tournament-status {
  margin-top: 0.375rem;
  margin-bottom: 0.75rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-live {
  background-color: var(--status-live);
  color: var(--text-white);
  animation: pulse 2s infinite;
}

.status-finished {
  background-color: var(--status-finished);
  color: var(--text-white);
}

.status-upcoming {
  background-color: var(--status-upcoming);
  color: var(--text-dark);
}

.user-bet {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  background-color: rgba(62, 63, 208, 0.15);
  padding: 0.5rem;
  border-radius: 0.375rem;
  border-left: 3px solid var(--accent-yellow);
}

.bet-amount {
  color: var(--accent-yellow);
  font-weight: 600;
}

.bet-team {
  color: var(--text-white);
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background-color: var(--btn-primary);
  color: var(--text-white);
  border-radius: 0.25rem;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.btn-edit:hover {
  background-color: var(--btn-primary-hover);
  transform: scale(1.05);
}

.tournament-action {
  margin-top: auto;
  width: 100%;
  padding: 0;
}

.btn-place-bet,
.btn-view-winnings,
.btn-view-results,
.btn-view-details {
  width: 100%;
  padding: 0.625rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
  margin: 0;
}

.btn-place-bet {
  background-color: var(--btn-primary);
  color: var(--text-white);
}

.btn-place-bet:hover {
  background-color: var(--btn-primary-hover);
}

.btn-view-winnings {
  background-color: var(--btn-success);
  color: var(--text-white);
}

.btn-view-winnings:hover {
  background-color: var(--btn-success-hover);
}

.btn-view-results {
  background-color: var(--btn-danger);
  color: var(--text-white);
}

.btn-view-results:hover {
  background-color: var(--btn-danger-hover);
}

.btn-view-details {
  background-color: var(--btn-primary);
  color: var(--text-white);
}

.btn-view-details:hover {
  background-color: var(--btn-primary-hover);
}

.create-tournament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--btn-primary);
  color: var(--text-white);
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
  margin: 2rem auto;
  max-width: 300px;
  transition: all 0.2s ease;
}

.create-tournament:hover {
  background-color: var(--btn-primary-hover);
  transform: translateY(-2px);
}

.create-tournament i {
  font-size: 1.25rem;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .top-nav {
    padding: 0.75rem 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero-section {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-brand span {
    display: none;
  }

  .user-balance span {
    display: none;
  }

  .nav-user {
    gap: 0.5rem;
  }
}
