/* Google Fonts: Outfit for cards, Inter for interface */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Color Palettes - Theme Redesign: White & Celeste */
  --bg-main: #f3f7fd;           /* Soft light blue-gray background */
  --bg-darker: #e3efff;         /* Slightly darker celeste panel background */
  --bg-card: #ffffff;           /* Clean white background for cards */
  --border-light: rgba(27, 91, 255, 0.1);  /* Soft blue border */
  --border-glow: rgba(78, 195, 232, 0.4);   /* Celeste border glow */
  --text-bright: #0c1a30;       /* Deep navy blue for high contrast text */
  --text-gray: #4b5e78;         /* Medium blue-gray for secondary text */
  
  /* Type Colors (TCG style) */
  --color-fuego: #ff473d;
  --color-agua: #3d9cff;
  --color-acero: #8c9fae;
  --color-psiquico: #a855f7;

  /* Card Type Gradients (stay rich and colorful so cards pop as physical collectibles) */
  --gradient-fuego: linear-gradient(135deg, #1e0b0a 0%, #3a0a03 50%, #520900 100%);
  --gradient-agua: linear-gradient(135deg, #071524 0%, #03203f 50%, #002e62 100%);
  --gradient-acero: linear-gradient(135deg, #0f1318 0%, #1c2128 50%, #29313d 100%);
  --gradient-psiquico: linear-gradient(135deg, #110724 0%, #1f053a 50%, #2f005c 100%);

  /* Accents */
  --accent-gold: #ffd700;
  --accent-blue: #1b5bff;
  --accent-celeste: #4ec3e8;
  --accent-red: #ff1e27;
  
  /* Transitions */
  --trans-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-bright);
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at center, rgba(243, 247, 253, 0.82) 0%, rgba(243, 247, 253, 0.94) 100%),
    url('assets/fifa_2026_branding_pattern.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-gray);
}

/* Layout Container */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 1.2rem 2rem 1rem 2rem;
}

.app-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #ff1e27 0%, #1b5bff 20%, #8dff00 40%, #00a74f 60%, #ff5722 80%, #4ec3e8 100%);
  z-index: 101;
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.1);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #ff1e27 0%, #1b5bff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-tag {
  background: rgba(27, 91, 255, 0.08);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 1px;
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--trans-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-blue);
  background: rgba(27, 91, 255, 0.06);
}

.nav-link.active {
  border-bottom: 2px solid var(--accent-blue);
  border-radius: 8px 8px 0 0;
}

/* App Main Body */
main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem;
  min-height: calc(100vh - 150px);
}

/* Section Views */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

#view-matches {
  display: block; /* Default visible */
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}

.world-cup-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(227, 239, 255, 0.8) 100%), url('assets/fifa_2026_branding_pattern.png');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(27, 91, 255, 0.12);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  box-shadow: 0 15px 35px rgba(27, 91, 255, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.4);
}

.hero-logo-container {
  width: 130px;
  height: 130px;
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(27, 91, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.8rem;
  flex-shrink: 0;
  box-shadow: 0 0 25px rgba(27, 91, 255, 0.1);
}

.hero-text-content {
  flex: 1;
}

.hero-text-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, #0c1a30 40%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-text-content p {
  color: var(--text-gray);
  line-height: 1.6;
  font-size: 1.05rem;
  max-width: 850px;
  font-weight: 500;
}

/* Section Header */
.section-header {
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent-blue);
  padding-left: 1rem;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
}

.section-header p {
  color: var(--text-gray);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

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

/* Match Cards */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--trans-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(27, 91, 255, 0.05);
}

.match-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 195, 232, 0.8);
  box-shadow: 0 10px 25px rgba(27, 91, 255, 0.12);
}

/* Live/Completed borders */
.match-card.live {
  border-color: rgba(255, 30, 39, 0.4);
  box-shadow: 0 0 15px rgba(255, 30, 39, 0.08);
}

.match-card.live::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-fuego);
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.match-group {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 500;
}

/* Scoreboard */
.match-scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
}

.team-score {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 42%;
}

.team-score:last-child {
  justify-content: flex-end;
  text-align: right;
}

.team-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.score-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.8rem;
  border-radius: 8px;
  min-width: 48px;
  text-align: center;
}

.score-separator {
  color: var(--text-gray);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Badges */
.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge.live {
  background: rgba(255, 71, 61, 0.15);
  color: var(--color-fuego);
}

.badge.live .pulse {
  width: 8px;
  height: 8px;
  background: var(--color-fuego);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.badge.completed {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-gray);
}

.badge.upcoming {
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent-blue);
}

/* Custom Flags (emojis inside styled divs) */
.team-flag {
  display: inline-block;
  flex-shrink: 0;
  width: 32px;
  height: 24px;
  border-radius: 4px;
  background-size: 100% 100%;
  background-position: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.flag-argentina { background-image: linear-gradient(#74acdf 33%, #fff 33%, #fff 66%, #74acdf 66%); position: relative; }
.flag-argentina::after { content: '☀️'; font-size: 8px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.flag-francia { background-image: linear-gradient(to right, #00209f 33%, #fff 33%, #fff 66%, #de002b 66%); }
.flag-usa { background-image: repeating-linear-gradient(#de002b, #de002b 3px, #fff 3px, #fff 6px); position: relative; border-left: 14px solid #00209f; }
.flag-mexico { background-image: linear-gradient(to right, #006847 33%, #fff 33%, #fff 66%, #c8102e 66%); position: relative; }
.flag-mexico::after { content: '🦅'; font-size: 6px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.flag-inglaterra { background-image: linear-gradient(#fff 44%, #de002b 44%, #de002b 56%, #fff 56%); position: relative; }
.flag-inglaterra::after { content: ''; position: absolute; left: 44%; top: 0; width: 12%; height: 100%; background: #de002b; }
.flag-canada { background-image: linear-gradient(to right, #de002b 25%, #fff 25%, #fff 75%, #de002b 75%); position: relative; }
.flag-canada::after { content: '🍁'; font-size: 10px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.flag-alemania { background-image: linear-gradient(#000 33%, #de002b 33%, #de002b 66%, #ffd700 66%); }
.flag-portugal { background-image: linear-gradient(to right, #006847 40%, #c8102e 40%); position: relative; }
.flag-portugal::after { content: '🛡️'; font-size: 7px; position: absolute; top: 50%; left: 40%; transform: translate(-50%, -50%); }
.flag-espana { background-image: linear-gradient(#c8102e 25%, #ffd700 25%, #ffd700 75%, #c8102e 75%); position: relative; }
.flag-espana::after { content: '🏰'; font-size: 6px; position: absolute; top: 50%; left: 30%; transform: translate(-50%, -50%); }
.flag-brasil { background-image: linear-gradient(135deg, #009b3a 100%, #009b3a 100%); position: relative; overflow: hidden; }
.flag-brasil::before { content: ''; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; background: #fedf00; transform: translate(-50%, -50%) rotate(45deg); }
.flag-brasil::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; background: #002776; border-radius: 50%; transform: translate(-50%, -50%); }

.match-card-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.btn-enter-stadium {
  width: 100%;
  background: rgba(78, 195, 232, 0.08);
  border: 1px solid rgba(27, 91, 255, 0.15);
  color: var(--accent-blue);
  padding: 0.7rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: var(--trans-smooth);
}

.btn-enter-stadium:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(27, 91, 255, 0.2);
}

/* ==========================================================================
   STADIUM PLAYMAT PITCH SCREEN
   ========================================================================== */
.pitch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(27, 91, 255, 0.04);
}

.pitch-score-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.pitch-score-banner h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.pitch-score-box {
  background: var(--bg-darker);
  color: var(--text-bright);
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  padding: 0.3rem 1rem;
  border-radius: 6px;
}

/* Match events timeline banner */
.pitch-events-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(27, 91, 255, 0.04);
}

.timeline-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--accent-blue);
  letter-spacing: 1.5px;
  margin-bottom: 0.8rem;
}

.timeline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--text-bright);
  border: 1px solid var(--border-light);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  box-shadow: 0 2px 6px rgba(27, 91, 255, 0.04);
}

.timeline-item.teamA { border-color: rgba(61, 156, 255, 0.35); }
.timeline-item.teamB { border-color: rgba(255, 71, 61, 0.35); }

.timeline-min { font-weight: 800; color: var(--accent-gold); }
.timeline-icon { font-size: 0.9rem; }
.timeline-player { font-weight: 700; }
.timeline-detail { color: var(--text-gray); font-size: 0.72rem; }

.pitch-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1.5rem;
}

.btn-back {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-gray);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.btn-back:hover {
  color: var(--text-bright);
  border-color: var(--text-gray);
}

/* Tactical Tabs */
.pitch-team-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.tab-btn.active {
  background: var(--accent-blue);
  color: var(--bg-main);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.2);
}

/* Soccer Playmat Field */
.soccer-playmat {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600'%3E%3Crect width='400' height='600' fill='%23114d23'/%3E%3Crect x='15' y='15' width='370' height='570' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Cline x1='15' y1='300' x2='385' y2='300' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Ccircle cx='200' cy='300' r='50' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Ccircle cx='200' cy='300' r='4' fill='rgba(255,255,255,0.4)'/%3E%3Crect x='90' y='15' width='220' height='90' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Crect x='140' y='15' width='120' height='35' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Ccircle cx='200' cy='75' r='3' fill='rgba(255,255,255,0.4)'/%3E%3Crect x='90' y='495' width='220' height='90' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Crect x='140' y='550' width='120' height='35' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'/%3E%3Ccircle cx='200' cy='525' r='3' fill='rgba(255,255,255,0.4)'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-position: center;
  border: 2px solid rgba(0, 229, 255, 0.3);
  border-radius: 24px;
  padding: 2.5rem 1.5rem;
  position: relative;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6), 0 15px 40px rgba(0, 229, 255, 0.04);
  overflow: hidden;
}

/* Pitch tactical layers */
.pitch-tactical-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

.pitch-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  min-height: 160px;
}

/* ==========================================================================
   TCG CARD DESIGN SYSTEM (MINI)
   ========================================================================== */
.tcg-card-wrapper {
  position: relative;
  width: 140px;
  height: 205px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

.tcg-card-mini {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 3px solid #000;
  background-size: cover;
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* Card Rarity Frames */
.tcg-card-wrapper.rare {
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}
.tcg-card-wrapper.rare .tcg-card-mini {
  border-color: var(--accent-blue);
}

.tcg-card-wrapper.legendary {
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}
.tcg-card-wrapper.legendary .tcg-card-mini {
  border-color: var(--accent-gold);
}

/* Card Element Backgrounds */
.tcg-card-mini.type-fuego { background: var(--gradient-fuego); --card-accent: var(--color-fuego); }
.tcg-card-mini.type-agua { background: var(--gradient-agua); --card-accent: var(--color-agua); }
.tcg-card-mini.type-acero { background: var(--gradient-acero); --card-accent: var(--color-acero); }
.tcg-card-mini.type-psiquico { background: var(--gradient-psiquico); --card-accent: var(--color-psiquico); }

/* Header element inside mini card */
.card-header-mini {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.2rem;
}

.card-name-mini {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95px;
}

.card-type-mini {
  font-size: 0.85rem;
}

/* Illustration body in mini card */
.card-image-mini {
  height: 95px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Transparent player headshot on cards */
.player-avatar-img {
  height: 98%;
  width: auto;
  object-fit: contain;
  position: absolute;
  bottom: -4px;
  z-index: 2;
  filter: drop-shadow(0px 3px 4px rgba(0, 0, 0, 0.55));
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

.tcg-card-wrapper:hover .player-avatar-img {
  transform: scale(1.08) translateY(-2px);
}

.player-avatar-bg {
  width: 100%;
  height: 100%;
}

.player-silhouette {
  width: 100%;
  height: 100%;
}

.card-flag-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 12px;
  border-radius: 1px;
  z-index: 4;
}

/* Info footer of mini card */
.card-info-mini {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.card-club-line {
  font-size: 0.6rem;
  color: var(--text-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  font-weight: 500;
}

.card-stats-mini {
  display: flex;
  justify-content: space-between;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-bright);
  background: rgba(255,255,255,0.04);
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
}

/* Holographic dynamic shimmer overlay */
.card-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.15) 40%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 60%,
    rgba(255, 255, 255, 0) 70%
  );
  background-size: 200% 200%;
  background-position: 0% 0%;
  mix-blend-mode: color-dodge;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.15s ease-out;
}

.rare .card-shimmer {
  background: linear-gradient(
    135deg,
    rgba(0, 229, 255, 0) 30%,
    rgba(0, 229, 255, 0.2) 45%,
    rgba(168, 85, 247, 0.25) 50%,
    rgba(0, 229, 255, 0.2) 55%,
    rgba(0, 229, 255, 0) 70%
  );
  background-size: 200% 200%;
}

.legendary .card-shimmer {
  background: linear-gradient(
    115deg,
    rgba(255, 0, 0, 0.1) 0%,
    rgba(255, 235, 59, 0.25) 30%,
    rgba(0, 229, 255, 0.25) 50%,
    rgba(168, 85, 247, 0.25) 70%,
    rgba(255, 0, 0, 0.1) 100%
  );
  background-size: 300% 300%;
}

/* ==========================================================================
   ALBUM SCREEN (BINDER)
   ========================================================================== */
.album-filters-grid {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 0.8rem;
  color: var(--text-gray);
  font-weight: 500;
}

.filter-group input, .filter-group select {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  padding: 0.75rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--trans-smooth);
}

.filter-group input:focus, .filter-group select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

.album-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.album-stats-bar span {
  font-size: 0.9rem;
  color: var(--text-gray);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

/* ==========================================================================
   3D CARD INSPECTOR MODAL
   ========================================================================== */
.inspect-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 6, 10, 0.9);
  backdrop-filter: blur(15px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  overflow-y: auto;
}

.inspect-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 440px;
  width: 100%;
}

/* 3D Card Flipper Containers */
.inspect-card-container {
  --card-w: 400px;
  --card-h: 690px;
  width: var(--card-w);
  height: var(--card-h);
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Explicitly control visibility of front and back to prevent WebKit bleed-through bugs */
.inspect-card-container:not(.flipped) #inspect-card-back {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.inspect-card-container.flipped #inspect-card-front {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.inspect-card-container:not(.flipped) #inspect-card-front {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.inspect-card-container.flipped #inspect-card-back {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Card Front & Back Styles */
.tcg-card-large {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  border: 7px solid #000;
  background-size: cover;
  padding: 1.2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.8);
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tcg-card-large.card-back {
  transform: rotateY(180deg);
  background: #060b13;
  border-color: rgba(78, 195, 232, 0.4);
  color: #ffffff;
}

.tcg-card-large.card-back .back-player-name {
  color: #ffffff;
}

.tcg-card-large.card-back .back-jersey-number {
  color: rgba(255, 255, 255, 0.15);
}

.tcg-card-large.card-back .back-bio-text {
  color: #a5b4fc;
}

.tcg-card-large.card-back .club-name {
  color: #ffffff;
}

.tcg-card-large.card-back .club-league {
  color: #8f9cae;
}

.tcg-card-large.card-back .specs-table td {
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tcg-card-large.card-back .specs-table td strong {
  color: #ffffff;
}

.tcg-card-large.card-back .back-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #8f9cae;
}

/* Elements on Card Large Type */
.tcg-card-large.type-fuego { background: var(--gradient-fuego); --card-accent: var(--color-fuego); }
.tcg-card-large.type-agua { background: var(--gradient-agua); --card-accent: var(--color-agua); }
.tcg-card-large.type-acero { background: var(--gradient-acero); --card-accent: var(--color-acero); }
.tcg-card-large.type-psiquico { background: var(--gradient-psiquico); --card-accent: var(--color-psiquico); }

.tcg-card-large.rare { border-color: var(--accent-blue); }
.tcg-card-large.legendary { border-color: var(--accent-gold); }

/* Front details */
.large-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid rgba(255,255,255,0.15);
  padding-bottom: 0.4rem;
}

.left-head .large-card-position {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-gray);
}

.left-head .large-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 0.1rem;
}

.right-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.large-card-hp {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
}
.large-card-hp strong {
  font-size: 1.4rem;
  font-weight: 900;
}

.large-card-type-icon {
  font-size: 1.5rem;
}

/* Artwork Large */
.large-card-artwork {
  height: 260px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  margin: 0.4rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Transparent player headshot on large inspector card */
.player-large-img {
  height: 110%;
  width: auto;
  object-fit: contain;
  position: absolute;
  bottom: -15px;
  z-index: 2;
  filter: drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.large-player-bg {
  width: 100%;
  height: 100%;
}
.large-silhouette {
  width: 100%;
  height: 100%;
}

.large-card-flag-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 24px;
  border-radius: 3px;
  z-index: 4;
}

.large-card-club-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 4;
}

/* Real Information Styling for Large Cards */
.large-card-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-light);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
}

.large-card-info-grid .info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.1rem 0.2rem;
}

.large-card-info-grid .label {
  color: var(--text-gray);
  font-weight: 500;
}

.large-card-info-grid .val {
  color: var(--text-bright);
  font-weight: 700;
}

.large-card-club-display, .large-card-role-display, .large-card-fact-display {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.large-card-club-display {
  border-left: 3px solid var(--color-agua);
}

.large-card-role-display {
  border-left: 3px solid var(--color-acero);
}

.large-card-fact-display {
  border-left: 3px solid var(--accent-gold);
}

.large-card-club-display .label, 
.large-card-role-display .label, 
.large-card-fact-display .label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-gray);
  display: block;
  margin-bottom: 0.15rem;
}

.large-card-club-display .val, 
.large-card-role-display .val, 
.large-card-fact-display .fact-text {
  color: var(--text-bright);
  font-weight: 500;
}

.large-card-fact-display .fact-text {
  font-size: 0.75rem;
  font-style: italic;
  color: #ffd700;
}

/* Large body container */
.large-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

/* Footer large card */
.large-card-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 0.4rem;
  font-size: 0.65rem;
  color: var(--text-gray);
}

.footer-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-stat .val {
  font-weight: 700;
  color: var(--text-bright);
  margin-top: 0.1rem;
}

/* ==========================================================================
   CARD BACK DETAILS (BIOGRAPHY)
   ========================================================================== */
.back-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.back-country {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-blue);
  letter-spacing: 1.5px;
}

.back-player-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  flex: 1;
  margin-left: 0.5rem;
}

.back-jersey-number {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: rgba(255,255,255,0.15);
}

.back-scroll-container {
  flex: 1;
  overflow-y: auto;
  margin: 1rem 0;
  padding-right: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.back-section h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-gray);
  margin-bottom: 0.4rem;
}

.back-bio-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-bright);
}

.back-club-grid {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  padding: 0.6rem;
  border-radius: 8px;
}

.club-logo-placeholder {
  font-size: 1.5rem;
  background: rgba(255,255,255,0.05);
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}

.club-detail-text {
  display: flex;
  flex-direction: column;
}

.club-detail-text .club-name {
  font-size: 0.85rem;
  font-weight: 600;
}
.club-detail-text .club-league {
  font-size: 0.7rem;
  color: var(--text-gray);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.specs-table td {
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

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

.back-footer {
  border-top: 1px solid var(--border-light);
  padding-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-gray);
}

/* Modal Bottom Buttons */
.modal-controls {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.btn-modal {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: var(--trans-smooth);
}

.btn-flip {
  background: var(--accent-blue);
  color: var(--bg-main);
  border: none;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
}

.btn-flip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.3);
}

.btn-close {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-gray);
}

.btn-close:hover {
  color: var(--text-bright);
  border-color: var(--text-gray);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  .world-cup-hero {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    text-align: center;
  }
  .world-cup-hero p {
    display: none;
  }
  .hero-text-content h2 {
    font-size: 1.6rem;
  }
  .matches-tabs-container {
    flex-direction: column;
    max-width: 100%;
    gap: 0.6rem;
    padding: 0.6rem;
    border-radius: 14px;
    margin: 1.5rem auto;
  }
  .match-tab-btn {
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }
  .matches-grid {
    grid-template-columns: 1fr;
  }
  .match-card {
    padding: 1rem;
  }
  .soccer-playmat {
    padding: 1.5rem 0.5rem;
    overflow: hidden;
  }
  .pitch-row {
    gap: 0.8rem;
    min-height: 140px;
    overflow-x: auto;
    justify-content: safe center;
    width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 0 0.5rem;
  }
  .pitch-row::-webkit-scrollbar {
    display: none;
  }
  .tcg-card-wrapper {
    width: 90px;
    height: 135px;
    flex-shrink: 0;
  }
  .card-header-mini {
    padding-bottom: 0.1rem;
  }
  .card-name-mini {
    font-size: 0.55rem;
    max-width: 60px;
  }
  .card-type-mini {
    font-size: 0.65rem;
  }
  .card-image-mini {
    height: 60px;
  }
  .player-avatar-img {
    bottom: -2px;
  }
  .card-stats-mini {
    font-size: 0.5rem;
  }
  .card-club-line {
    font-size: 0.5rem;
  }
  .pitch-controls-bar {
    flex-direction: column;
    gap: 0.8rem;
  }
  .timeline-list {
    justify-content: center;
  }
}

/* Responsive Scaling for Large Inspector Card on smaller viewports */
@media (max-width: 420px) {
  .inspect-card-container {
    --card-w: 310px;
    --card-h: 530px;
  }
  .large-card-artwork {
    height: 160px;
  }
  .large-card-body {
    gap: 0.35rem;
  }
}


/* --- BENCH & DT STYLES --- */
.pitch-bench-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.bench-header h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-gold);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.bench-layout {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

.bench-sub-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-gray);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dt-wrapper {
  flex: 0 0 160px;
}

.dt-card {
  height: calc(100% - 1.5rem);
  min-height: 200px;
}

.dt-card-inner {
  height: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(30, 40, 60, 0.6) 0%, rgba(15, 20, 35, 0.8) 100%);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.dt-card-inner.active {
  border-color: rgba(255, 215, 0, 0.4);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(15, 20, 35, 0.8) 100%);
}

.dt-card-inner.empty {
  justify-content: center;
  align-items: center;
  border-style: dashed;
  border-color: var(--border-light);
}

.dt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-gold);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}

.dt-artwork {
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
}

.dt-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dt-silhouette {
  font-size: 3rem;
  opacity: 0.3;
}

.dt-info {
  margin-top: 0.5rem;
}

.dt-name {
  margin: 0 0 0.3rem 0;
  font-family: 'Outfit', sans-serif;
  color: var(--text-bright);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dt-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-gray);
}

.subs-wrapper {
  flex: 1;
  min-width: 0;
}


/* --- BENCH & DT STYLES --- */
.pitch-bench-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(27, 91, 255, 0.04);
}

.bench-header h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
  color: var(--accent-blue);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

.bench-layout {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

.bench-sub-title {
  font-family: 'Outfit', sans-serif;
  color: var(--text-gray);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.dt-wrapper {
  flex: 0 0 160px;
}

.dt-card {
  height: calc(100% - 1.5rem);
  min-height: 200px;
}

.dt-card-inner {
  height: 100%;
  border-radius: 8px;
  border: 1px solid rgba(27, 91, 255, 0.15);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 4px 8px rgba(27, 91, 255, 0.04);
}

.dt-card-inner.active {
  border-color: var(--accent-blue);
  background: rgba(27, 91, 255, 0.03);
}

.dt-card-inner.empty {
  justify-content: center;
  align-items: center;
  border-style: dashed;
  border-color: var(--border-light);
}

.dt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-blue);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}

.dt-artwork {
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(27, 91, 255, 0.03);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
}

.dt-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dt-silhouette {
  font-size: 3rem;
  opacity: 0.3;
  color: var(--text-gray);
}

.dt-info {
  margin-top: 0.5rem;
}

.dt-name {
  margin: 0 0 0.3rem 0;
  font-family: 'Outfit', sans-serif;
  color: var(--text-bright);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dt-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-gray);
}

.subs-wrapper {
  flex: 1;
  min-width: 0;
}

.subs-scroll-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0.2rem 1rem 0.2rem;
  scroll-behavior: smooth;
}

.subs-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.subs-scroll-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.subs-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.subs-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-gray);
}

/* --- CLUB BADGE STYLES --- */
.card-club-badge-corner {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 5;
  transition: transform 0.2s;
  object-fit: contain;
  object-position: center;
}

.tcg-card-wrapper:hover .card-club-badge-corner {
  transform: scale(1.1);
}

.large-card-club-badge-corner {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  z-index: 5;
  object-fit: contain;
  object-position: center;
}

.back-club-logo {
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  object-fit: contain;
  object-position: center;
}

/* Force flags cover fitting */
.team-flag, .card-flag-badge, .large-card-flag-badge {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Matches Tabs Layout */
.matches-tabs-container {
  display: flex;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  border-radius: 16px;
  border: 2px solid var(--border-light);
  margin: 2rem auto;
  max-width: 700px;
  gap: 0.8rem;
  box-shadow: 0 10px 30px rgba(27, 91, 255, 0.08);
}

.match-tab-btn {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-gray);
  padding: 1rem 1.6rem;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  transition: var(--trans-smooth);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(27, 91, 255, 0.02);
}

/* Individual tab button active states - Larger and more striking gradients */
#tab-live-matches.active {
  background: linear-gradient(135deg, #ff1e27 0%, #ff5722 100%);
  color: #ffffff;
  border-color: #ff1e27;
  box-shadow: 0 6px 20px rgba(255, 30, 39, 0.35);
  transform: scale(1.03);
}

#tab-upcoming-matches.active {
  background: linear-gradient(135deg, #00a74f 0%, #00b957 100%);
  color: #ffffff;
  border-color: #00a74f;
  box-shadow: 0 6px 20px rgba(0, 167, 79, 0.3);
  transform: scale(1.03);
}

#tab-completed-matches.active {
  background: linear-gradient(135deg, #1b5bff 0%, #4ec3e8 100%);
  color: #ffffff;
  border-color: #1b5bff;
  box-shadow: 0 6px 20px rgba(27, 91, 255, 0.3);
  transform: scale(1.03);
}

/* Individual tab button hover states - More responsive */
#tab-live-matches:hover:not(.active) {
  color: #ff1e27;
  background: rgba(255, 30, 39, 0.05);
  border-color: rgba(255, 30, 39, 0.3);
  transform: translateY(-2px);
}

#tab-upcoming-matches:hover:not(.active) {
  color: #00a74f;
  background: rgba(0, 167, 79, 0.05);
  border-color: rgba(0, 167, 79, 0.3);
  transform: translateY(-2px);
}

#tab-completed-matches:hover:not(.active) {
  color: #1b5bff;
  background: rgba(27, 91, 255, 0.05);
  border-color: rgba(27, 91, 255, 0.3);
  transform: translateY(-2px);
}

/* Empty State Styling */
.matches-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px dashed var(--border-light);
  color: var(--text-gray);
  font-size: 1.1rem;
}

/* Pitch Player Search Bar */
.pitch-search-wrapper {
  margin-left: auto;
  margin-right: 1.5rem;
  min-width: 250px;
}

#pitch-player-search {
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  transition: var(--trans-smooth);
}

#pitch-player-search:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
  background: #ffffff;
}

/* Card highlighting/fading during pitch player search */
.tcg-card-wrapper.non-matching,
.dt-card-inner.non-matching {
  opacity: 0.15;
  filter: grayscale(100%) blur(0.5px);
  pointer-events: none;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

/* Match Card Goals List (Google-style) */
.match-card-goals {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  padding: 0.7rem 1.2rem;
  background: rgba(78, 195, 232, 0.06);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: var(--text-gray);
  align-items: start;
  font-family: 'Inter', sans-serif;
}

.team-goals {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-a-goals {
  text-align: left;
}

.team-b-goals {
  text-align: right;
}

.team-goals div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.goals-icon {
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
  align-self: center;
  animation: pulse 2.5s infinite;
}

/* Ensure the front of the cards (which have dark backgrounds) always use white/light text */
.tcg-card-mini, .tcg-card-large:not(.card-back) {
  color: #ffffff;
}
.tcg-card-mini .card-name-mini,
.tcg-card-mini .card-stats-mini,
.tcg-card-large:not(.card-back) .large-card-name,
.tcg-card-large:not(.card-back) .large-card-hp,
.tcg-card-large:not(.card-back) .large-card-hp strong,
.tcg-card-large:not(.card-back) .large-card-info-grid .val,
.tcg-card-large:not(.card-back) .large-card-club-display .val,
.tcg-card-large:not(.card-back) .large-card-role-display .val,
.tcg-card-large:not(.card-back) .footer-stat .val {
  color: #ffffff !important;
}

.tcg-card-mini .card-club-line,
.tcg-card-large:not(.card-back) .left-head .large-card-position,
.tcg-card-large:not(.card-back) .large-card-info-grid .label,
.tcg-card-large:not(.card-back) .large-card-club-display .label,
.tcg-card-large:not(.card-back) .large-card-role-display .label,
.tcg-card-large:not(.card-back) .large-card-fact-display .label,
.tcg-card-large:not(.card-back) .large-card-footer {
  color: #cbd5e1 !important;
}

/* Google Search Style Empty State (Partidos de Hoy) */
.google-empty-state-container {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 850px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(27, 91, 255, 0.04);
  border: 1px solid var(--border-light);
  margin: 1.5rem 0;
  text-align: left;
  animation: fadeIn 0.4s ease-out;
}
.google-empty-state-header {
  margin-bottom: 1rem;
}
.google-empty-state-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.8rem;
}
.google-logo-wrapper {
  background: #0d1e3d;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}
.google-fifa-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.google-title-container {
  display: flex;
  flex-direction: column;
}
.google-fifa-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: 'Outfit', sans-serif;
}
.google-fifa-subtitle {
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: 500;
}
.google-empty-state-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-bright);
  font-family: 'Outfit', sans-serif;
  margin-top: 0.5rem;
}
.google-matches-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin: 1rem 0;
  background: transparent;
}
.google-match-item {
  display: flex;
  justify-content: space-between;
  padding: 1.2rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border-bottom: 1px solid var(--border-light);
}
.google-match-item:hover {
  background-color: var(--bg-darker);
  transform: scale(1.005);
}
.google-match-item:nth-child(even) {
  border-left: 1px solid var(--border-light);
}
/* Remove bottom border on the last row */
.google-match-item:nth-last-child(-n+2) {
  border-bottom: none;
}
.google-match-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  padding-right: 1rem;
}
.google-match-group {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-bottom: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.google-match-teams {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.google-match-team {
  display: flex;
  align-items: center;
  gap: 10px;
}
.google-team-flag {
  display: inline-block;
  flex-shrink: 0;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0,0,0,0.06);
}
.google-team-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
}
.google-match-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  width: 100px;
  min-height: 80px;
}
.google-match-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-red);
  margin-bottom: 6px;
  text-align: right;
  font-family: 'Outfit', sans-serif;
}
.google-match-thumb {
  position: relative;
  width: 100px;
  height: 58px;
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}
.thumb-flag-half {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.thumb-flag-half:nth-child(1) {
  left: 0;
  clip-path: polygon(0 0, 55% 0, 45% 100%, 0 100%);
  z-index: 1;
}
.thumb-flag-half:nth-child(2) {
  left: 0;
  clip-path: polygon(55% 0, 100% 0, 100% 100%, 45% 100%);
  z-index: 0;
}
.thumb-video-overlay {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
  z-index: 2;
}
.thumb-play-icon {
  font-size: 0.6rem;
}
.google-empty-state-footer {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}
.btn-more-matches {
  background: var(--bg-darker);
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.7rem 2rem;
  border-radius: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-more-matches i {
  font-style: normal;
  font-size: 1.1rem;
}
.btn-more-matches:hover {
  background: var(--accent-celeste);
  color: #ffffff;
  border-color: var(--accent-celeste);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(78, 195, 232, 0.25);
}

@media (max-width: 768px) {
  .google-matches-grid {
    grid-template-columns: 1fr;
  }
  .google-match-item {
    border-left: none !important;
    border-bottom: 1px solid var(--border-light) !important;
  }
  .google-match-item:last-child {
    border-bottom: none !important;
  }
  .google-match-item:nth-child(even) {
    border-left: none;
  }
}

/* ==========================================
   Efecto de Goleador en Cartas TCG
   ========================================== */
.tcg-card-wrapper.has-scored {
  position: relative;
  animation: goldPulse 2.2s infinite alternate ease-in-out;
  box-shadow: 0 0 12px #ffd700, 0 0 25px rgba(255, 215, 0, 0.4);
  border-radius: 12px;
}

@keyframes goldPulse {
  0% {
    box-shadow: 0 0 8px #ffd700, 0 0 18px rgba(255, 215, 0, 0.35);
    transform: scale(1.01);
  }
  50% {
    box-shadow: 0 0 18px #ffb300, 0 0 35px rgba(255, 179, 0, 0.6);
    transform: scale(1.04) rotate(-0.5deg);
  }
  100% {
    box-shadow: 0 0 12px #ffd700, 0 0 25px rgba(255, 215, 0, 0.4);
    transform: scale(1.01) rotate(0.5deg);
  }
}

/* Contenedor flotante GOL encima de la carta */
.card-goal-scorer-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.goal-text-bubble {
  background: linear-gradient(135deg, #ffd700 0%, #ff5722 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  letter-spacing: 0.8px;
  animation: goalPop 0.8s ease-in-out infinite alternate;
  border: 1.5px solid #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  white-space: nowrap;
}

.goal-soccer-ball-badge {
  background: rgba(255, 255, 255, 0.95);
  color: #0c1a30;
  border: 1px solid rgba(255, 215, 0, 0.8);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  margin-top: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  animation: ballSpin 6s linear infinite;
}

@keyframes goalPop {
  0% {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  }
  100% {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 15px rgba(255, 87, 34, 0.5);
  }
}

@keyframes ballSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================
   TOURNAMENT BRACKET STYLES
   ========================================== */
.tournament-bracket-section {
  background: linear-gradient(135deg, #0e5fc2 0%, #084aa0 100%), url('assets/fifa_2026_branding_pattern.png');
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 2.5rem 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 45px rgba(8, 74, 160, 0.25);
  max-width: 100%;
  box-sizing: border-box;
}

.bracket-header {
  margin-bottom: 2.5rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 1.5rem;
}

.bracket-header h2 {
  font-family: 'Outfit', 'Impact', 'Arial Black', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 2px 2px 0px #000, -1px -1px 0px #000, 1px -1px 0px #000, -1px 1px 0px #000, 2px 4px 10px rgba(0,0,0,0.5);
}

.bracket-header p {
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.bracket-scroll-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.bracket-scroll-container::-webkit-scrollbar {
  height: 8px;
}
.bracket-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
.bracket-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}
.bracket-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.6);
}

.bracket-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.15rem;
  min-width: 320px; /* Fits completely on a phone screen without scroll! */
  margin: 0 auto;
  position: relative;
}

.bracket-side-container {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 0.2rem; /* Squeezed columns gap! */
  height: 720px;
}

.bracket-side-container.left-side {
  flex-direction: row;
}

.bracket-side-container.right-side {
  flex-direction: row-reverse;
}

.bracket-column {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 100%;
  width: 14px; /* default compact width for R16, QF, SF */
  position: relative;
}

.bracket-column.round-of-32 {
  width: 56px; /* Round of 32 remains narrow to show flag-only cards */
}

/* Bracket Match Pair Container */
.bracket-match-pair {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  position: relative;
  width: 100%;
  flex: 1;
}

/* Connector Lines - Left Side (Squeezed!) */
.left-side .round-of-32 .bracket-match-card::after {
  content: "";
  position: absolute;
  right: -0.35rem;
  top: 50%;
  width: 0.35rem;
  border-top: 1.5px solid rgba(16, 185, 129, 0.65);
  pointer-events: none;
}

.left-side .bracket-column:not(.round-of-32) .bracket-match-pair::after {
  content: "";
  position: absolute;
  right: -0.25rem;
  top: 14px;
  bottom: 14px;
  width: 0.25rem;
  border: 1.5px solid rgba(16, 185, 129, 0.65);
  border-left: none;
  pointer-events: none;
}
.left-side .bracket-column:not(.round-of-32) .bracket-match-pair::before {
  content: "";
  position: absolute;
  right: -0.45rem;
  top: 50%;
  width: 0.2rem;
  border-top: 1.5px solid rgba(16, 185, 129, 0.65);
  pointer-events: none;
}

/* Connector Lines - Right Side (Squeezed!) */
.right-side .round-of-32 .bracket-match-card::after {
  content: "";
  position: absolute;
  left: -0.35rem;
  top: 50%;
  width: 0.35rem;
  border-top: 1.5px solid rgba(16, 185, 129, 0.65);
  pointer-events: none;
}

.right-side .bracket-column:not(.round-of-32) .bracket-match-pair::after {
  content: "";
  position: absolute;
  left: -0.25rem;
  top: 14px;
  bottom: 14px;
  width: 0.25rem;
  border: 1.5px solid rgba(16, 185, 129, 0.65);
  border-right: none;
  pointer-events: none;
}
.right-side .bracket-column:not(.round-of-32) .bracket-match-pair::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 50%;
  width: 0.2rem;
  border-top: 1.5px solid rgba(16, 185, 129, 0.65);
  pointer-events: none;
}

/* Style intermediate rounds slots (thin green borders, smaller circle shape) */
.bracket-team-slot {
  width: 28px;
  height: 28px;
  border-radius: 50%; /* circular outline! */
  background: #070c16;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  z-index: 2;
  align-self: center; /* center circle horizontally in column */
}

.bracket-team-slot.filled {
  border-color: #10b981;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

/* Hide empty black squares entirely! */
.bracket-team-slot.empty {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Hide Champion Box (Final card remains visible below trophy!) */
.bracket-champion-box {
  display: none !important;
}

/* Bracket Match Card - Black Block style (R32) */
.bracket-match-card {
  background: #070c16;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 4px;
  padding: 0;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: 100%;
}

.bracket-match-card:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--accent-gold, #ffd700);
  box-shadow: 0 10px 25px rgba(255, 215, 0, 0.25), 0 0 12px rgba(255, 215, 0, 0.15);
}

.bracket-match-status {
  font-size: 0.38rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.1rem 0.15rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
}

.bracket-match-status.live {
  color: #ff453a;
  background: rgba(255, 69, 58, 0.08);
}

.bracket-pulse-dot {
  width: 5px;
  height: 5px;
  background-color: #ff453a;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-red 1.5s infinite;
  margin-right: 3px;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 69, 58, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
}

/* Row-based Symmetric Teams */
.bracket-match-team {
  padding: 0.3rem 0.4rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

/* Divider inside card */
.bracket-match-vs {
  font-size: 0.55rem;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0;
  background: rgba(255, 255, 255, 0.01);
}

.left-side .bracket-match-team {
  flex-direction: row;
}
.left-side .bracket-team-info {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
}

.right-side .bracket-match-team {
  flex-direction: row-reverse;
}
.right-side .bracket-team-info {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 0;
  max-width: 100%;
}

/* Flags - Rectangular style for R32 */
.bracket-team-flag {
  width: 20px;
  height: 14px;
  border-radius: 1.5px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* Global circular flag style (for intermediate slots) */
.bracket-team-flag-round {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  align-self: center;
  margin-top: 5px; /* nudge down to optically center inside circular slot */
}

/* Circular flags for compact match cards (R32) */
.bracket-match-card .bracket-team-flag-round {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* Hide country names globally to keep ONLY flags and scores */
.bracket-team-name {
  display: none !important;
}

.bracket-match-score {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  color: #ffffff;
}

.bracket-match-card.completed .bracket-match-team.winner .bracket-match-score {
  color: var(--accent-gold, #ffd700);
}

.bracket-scroll-container {
  padding: 0.5rem 0;
}

.tournament-bracket-section {
  padding: 1rem 0.3rem;
  margin-bottom: 1.5rem;
  border-radius: 16px;
}
.bracket-header h2 {
  font-size: 1.4rem;
}
.bracket-header p {
  font-size: 0.8rem;
  letter-spacing: 1px;
}

/* Center Column Section (Squeezed!) */
.bracket-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  gap: 0.4rem;
  position: relative;
  z-index: 3;
}

.bracket-trophy-container {
  position: relative;
  width: 80px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.1rem;
}

.bracket-trophy-glow {
  position: absolute;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0) 70%); /* green glow matching theme! */
  border-radius: 50%;
  animation: float-glow 4s ease-in-out infinite alternate;
}

.bracket-trophy-img {
  width: 50px;
  height: auto;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 10px rgba(16, 185, 129, 0.3)); /* green tinted drop shadow! */
  animation: float-trophy 3s ease-in-out infinite alternate;
  z-index: 1;
  mix-blend-mode: multiply; /* completely removes the white background block! */
}

@keyframes float-trophy {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

@keyframes float-glow {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 1; }
}

.bracket-final-card {
  width: 80px;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  border-radius: 8px;
  background: #070c16;
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.bracket-final-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 900;
  color: #070c16;
  background: #10b981; /* Solid green header! */
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: 100%;
  text-align: center;
}

.final-pair {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
}




