* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: white;
  min-height: 100vh;
}

/* Tennis Betting Modal - Modern Card Design */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(10, 14, 39, 0.95) 0%, rgba(26, 30, 58, 0.95) 100%);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-container {
  background: rgba(26, 30, 58, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 20px;
  max-width: 600px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.15);
  background: rgba(10, 14, 39, 0.5);
}

.modal-header h2 {
  color: #00ff88;
  margin: 0;
  text-align: center;
  flex: 1;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
}

.modal-content {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.context-info {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  color: #fff;
  text-align: center;
  font-size: 1.1rem;
}

.betting-form-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-weight: 600;
  color: #00ff88;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Player Selection Cards */
.player-cards-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.player-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.player-card:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-3px);
}

.player-card.selected {
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.25);
}

.player-card .player-icon {
  font-size: 3rem;
}

.player-card .player-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.player-card .player-odds {
  font-size: 1.1rem;
  font-weight: bold;
  color: #00ff88;
}

.vs-badge {
  background: rgba(0, 255, 136, 0.15);
  border: 1px solid rgba(0, 255, 136, 0.3);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #00ff88;
  font-size: 0.9rem;
}

/* Amount Buttons */
.amount-buttons-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.amount-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  min-width: 70px;
}

.amount-btn:hover {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
}

.amount-btn.selected {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  color: #00ff88;
}

.custom-amount-input {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 16px;
  color: white;
  font-size: 1rem;
  width: 100%;
  max-width: 200px;
  text-align: center;
  transition: all 0.3s ease;
}

.custom-amount-input:focus {
  outline: none;
  border-color: #00ff88;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* Floating Bet Summary Footer */
.bet-summary-footer {
  background: rgba(10, 14, 39, 0.95);
  border-top: 1px solid rgba(0, 255, 136, 0.2);
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bet-summary-text {
  text-align: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.bet-summary-text .highlight {
  color: #00ff88;
  font-weight: 600;
}

.place-bet-btn {
  background: linear-gradient(135deg, #00ff88 0%, #00cc88 100%);
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #0a0e27;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.place-bet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.place-bet-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-select {
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  color: white;
  font-size: 1rem;
  backdrop-filter: blur(5px);
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

@media (max-width: 768px) {
  .player-cards-container {
    flex-direction: column;
    gap: 12px;
  }

  .player-card {
    max-width: 100%;
    width: 100%;
  }

  .vs-badge {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .amount-buttons-container {
    gap: 8px;
  }

  .amount-btn {
    padding: 10px 16px;
    min-width: 60px;
    font-size: 0.9rem;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  color: white;
  min-height: 100vh;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  background: linear-gradient(45deg, #00ff00, #00cc88);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tour-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
}

.tour-select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 10px 15px;
  color: white;
  font-size: 1rem;
  backdrop-filter: blur(5px);
  min-width: 200px;
}

.tour-select:focus {
  outline: none;
  border-color: #00ff00;
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.refresh-btn {
  background: linear-gradient(45deg, #00ff00, #00cc88);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 0, 0.4);
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 1.2rem;
  color: #00ff00;
}

.spinner {
  border: 4px solid rgba(0, 255, 0, 0.1);
  border-left: 4px solid #00ff00;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.tournament-info {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 20px;
  margin-bottom: 30px;
  text-align: center;
}

.tournament-name {
  font-size: 1.8rem;
  font-weight: bold;
  color: #00ff00;
  margin-bottom: 20px;
}

.tournament-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.detail-label {
  font-size: 0.9rem;
  color: #999;
}

.detail-value {
  font-size: 1.1rem;
  color: white;
  font-weight: bold;
}

.matches-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.matches-header {
  background: linear-gradient(45deg, #00ff00, #00cc88);
  color: #000;
  padding: 15px 20px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  border-radius: 15px;
  margin-bottom: 20px;
}

.matches-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.match-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00ff00, #00cc88, #0099ff);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.match-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 255, 0, 0.15);
  border-color: rgba(0, 255, 0, 0.3);
}

.match-card:hover::before {
  opacity: 1;
}

.match-card.match-completed {
  border-color: rgba(0, 255, 136, 0.3);
}

.match-card.match-completed::before {
  opacity: 1;
  background: linear-gradient(90deg, #00ff88, #00cc66);
}

.player.winner {
  background: rgba(0, 255, 136, 0.15);
  border-radius: 12px;
  padding: 15px;
  border: 2px solid rgba(0, 255, 136, 0.5);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.player.winner .player-name {
  color: #00ff88;
  font-weight: bold;
}

.player.loser {
  opacity: 0.6;
}

.player.loser .player-name {
  color: #888;
}

.winner-badge {
  background: linear-gradient(135deg, #00ff88, #00cc66);
  color: #000;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(0, 255, 136, 0.4);
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.match-round {
  background: rgba(0, 255, 0, 0.2);
  color: #00ff00;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: bold;
}

.match-status {
  color: #999;
  font-size: 0.9rem;
}

.players-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.player-name {
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  color: white;
}

.player-ranking {
  font-size: 0.9rem;
  color: #00ff00;
  font-weight: bold;
}

.player-country {
  font-size: 0.8rem;
  color: #999;
}

.vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin: 0 15px;
}

.vs-text {
  font-size: 1.2rem;
  font-weight: bold;
  opacity: 0.7;
}

.score-display {
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  color: #00ff00;
}

.match-bet-btn {
  width: 100%;
  background: linear-gradient(45deg, #00ff00, #00cc88);
  color: #000;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-bet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 0, 0.4);
}

.live-match {
  border: 2px solid #ff4444;
  background: rgba(255, 68, 68, 0.05);
}

.live-match .match-round {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
}

.live-badge {
  background: linear-gradient(45deg, #ff4444, #ff6666);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  margin-left: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 1.1rem;
}

.back-button {
  text-align: center;
  margin-top: 50px;
}

.back-button a {
  color: #00ff00;
  font-size: 1.2rem;
  text-decoration: none;
  padding: 15px 30px;
  border: 2px solid #00ff00;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: inline-block;
}

.back-button a:hover {
  background: rgba(0, 255, 0, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 0, 0.3);
}

@media (max-width: 900px) {
  .matches-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .match-card {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .tournament-details {
    grid-template-columns: 1fr 1fr;
  }

  .matches-container {
    padding: 0 10px;
  }

  .matches-header {
    font-size: 1.1rem;
    padding: 12px 15px;
  }

  .tour-controls {
    flex-direction: column;
    gap: 15px;
  }

  .players-container {
    flex-direction: column;
    gap: 15px;
  }

  .vs-divider {
    transform: rotate(90deg);
    margin: 10px 0;
  }
}

/* Live Game Pulsing Indicator */
.game-item.live-game {
  border: 2px solid rgba(255, 0, 0, 0.6);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
  }
  100% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
  }
}

.game-status.live {
  background: rgba(255, 0, 0, 0.2);
  color: #ff0000;
  animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Mobile: comprehensive optimizations */
@media (max-width: 768px) {
  .main-content {
    padding: 0 15px;
  }

  .main-content h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }

  .tournament-controls {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
  }

  .tournament-select {
    min-width: auto;
    width: 100%;
    font-size: 0.9rem;
    padding: 12px 15px;
  }

  .refresh-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
  }

  .selected-tournament {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .loading {
    font-size: 1rem;
    padding: 30px 20px;
  }

  .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px auto;
  }

  /* Game containers mobile optimization */
  #tennis-game-containers {
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 0 auto;
    padding: 0 10px;
    max-width: 100%;
  }

  .game-item {
    padding: 20px 15px;
    border-radius: 15px;
    margin-bottom: 15px;
  }

  .game-status {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .teams {
    gap: 10px;
    margin: 15px 0;
  }

  .team {
    gap: 8px;
  }

  .team-logo {
    width: 35px;
    height: 35px;
  }

  .team-name {
    font-size: 0.9rem;
    font-weight: bold;
  }

  .team-score {
    font-size: 1.1rem;
  }

  .vs-divider {
    margin: 0 5px;
  }

  .vs-text {
    font-size: 0.8rem;
    padding: 4px 8px;
  }

  .game-info {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
  }

  .info-item {
    padding: 8px 12px;
  }

  .info-label {
    font-size: 0.7rem;
  }

  .info-value {
    font-size: 0.8rem;
  }

  .create-bet-btn {
    font-size: 0.9rem;
    padding: 12px 20px;
    margin-top: 15px;
  }

  .no-games {
    padding: 30px 20px;
    margin: 20px 10px;
  }

  .no-games h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .no-games p {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .sports-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 20px 15px;
  }

  .sports-btn {
    width: 100%;
    height: 70px;
    border-radius: 12px;
  }

  .sports-btn img {
    width: 40px;
    height: 40px;
  }

  .back-button {
    margin-top: 20px;
    padding: 0 15px;
  }

  .back-button a {
    padding: 12px 20px;
    font-size: 0.9rem;
    border-radius: 25px;
    display: inline-block;
    text-align: center;
    width: auto;
  }

  /* Modal mobile optimization */
  .modal-container {
    width: 95%;
    max-width: 95%;
    margin: 10px;
    max-height: 90vh;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-content {
    padding: 15px;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .form-select, .form-input {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
}

/* Touch target optimization */
@media (hover: none) and (pointer: coarse) {
  .create-bet-btn, .back-button a {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ========================================
   TOURNAMENT BRACKET STYLES
   Bold, Stylish, Engaging Design
======================================== */

.bracket-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px;
}

.bracket-round {
  background: linear-gradient(135deg, rgba(20, 25, 50, 0.9) 0%, rgba(30, 40, 70, 0.8) 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 136, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.bracket-round-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 25px;
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.1) 0%, transparent 100%);
  border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.bracket-round-header.finals-header {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 180, 0, 0.1) 50%, transparent 100%);
  border-bottom-color: rgba(255, 215, 0, 0.4);
}

.bracket-round-header.semi-header {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.2) 0%, rgba(150, 150, 150, 0.1) 50%, transparent 100%);
  border-bottom-color: rgba(192, 192, 192, 0.3);
}

.round-icon {
  font-size: 2rem;
  margin-right: 15px;
}

.round-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #00ff88;
  flex: 1;
}

.finals-header .round-title {
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.semi-header .round-title {
  color: #c0c0c0;
}

.match-count {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.bracket-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  padding: 25px;
}

.bracket-match {
  background: linear-gradient(145deg, rgba(30, 35, 60, 0.95) 0%, rgba(20, 25, 45, 0.95) 100%);
  border-radius: 16px;
  border: 2px solid rgba(100, 120, 180, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.bracket-match:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 15px 40px rgba(0, 255, 136, 0.15);
}

.bracket-match.bracket-final {
  border: 3px solid rgba(255, 215, 0, 0.5);
  background: linear-gradient(145deg, rgba(50, 45, 20, 0.95) 0%, rgba(35, 30, 15, 0.95) 100%);
}

.bracket-match.bracket-final:hover {
  border-color: rgba(255, 215, 0, 0.8);
  box-shadow: 0 15px 50px rgba(255, 215, 0, 0.25);
}

.bracket-match.bracket-semi {
  border: 2px solid rgba(192, 192, 192, 0.4);
}

.bracket-match.bracket-live {
  border-color: #ff4444 !important;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 68, 68, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 68, 68, 0.6); }
}

.bracket-match.bracket-completed {
  opacity: 0.85;
}

.bracket-match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bracket-grouping {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bracket-status {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.bracket-status.status-live {
  background: rgba(255, 68, 68, 0.3);
  color: #ff6666;
  animation: liveTextPulse 1s ease-in-out infinite;
}

@keyframes liveTextPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.bracket-players {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bracket-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.bracket-player.player-winner {
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 200, 100, 0.08) 100%);
  border-color: rgba(0, 255, 136, 0.4);
}

.bracket-player.player-loser {
  opacity: 0.5;
}

.player-seed {
  font-size: 0.75rem;
  color: #ffd700;
  font-weight: 700;
  min-width: 30px;
}

.player-flag {
  font-size: 1.3rem;
}

.player-info {
  flex: 1;
}

.bracket-player-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.player-winner .bracket-player-name {
  color: #00ff88;
}

.winner-check {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.bracket-vs {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  letter-spacing: 2px;
  padding: 4px 0;
}

.bracket-scores {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.player-sets {
  display: flex;
  gap: 8px;
}

.set-score {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.set-score.set-won {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.3) 0%, rgba(0, 200, 100, 0.2) 100%);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.4);
}

.bracket-bet-btn {
  display: block;
  width: calc(100% - 30px);
  margin: 0 15px 15px 15px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
  border: none;
  border-radius: 12px;
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bracket-bet-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 255, 136, 0.4);
}

.bracket-bet-btn:active {
  transform: scale(0.98);
}

/* Responsive bracket styles */
@media (max-width: 768px) {
  .bracket-matches {
    grid-template-columns: 1fr;
    padding: 15px;
    gap: 15px;
  }
  
  .bracket-round-header {
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .round-icon {
    font-size: 1.5rem;
  }
  
  .round-title {
    font-size: 1.2rem;
  }
  
  .bracket-player {
    padding: 10px 12px;
    gap: 8px;
  }
  
  .bracket-player-name {
    font-size: 0.9rem;
  }
  
  .player-seed {
    font-size: 0.7rem;
    min-width: 25px;
  }
  
  .player-flag {
    font-size: 1.1rem;
  }
  
  .set-score {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
}
