/* =========================================================
   FUTSAL GAME LEON & VANO - MODERN GAMING UI STYLESHEET
   Responsive for Mobile (Android & iPhone), Tablets & Desktop
   ========================================================= */

:root {
  --bg-main: #0a0e17;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-glass: rgba(17, 24, 39, 0.75);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(56, 189, 248, 0.3);

  --red-team: #ef4444;
  --red-team-glow: rgba(239, 68, 68, 0.5);
  --red-team-dark: #991b1b;
  --red-team-gradient: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);

  --blue-team: #3b82f6;
  --blue-team-glow: rgba(59, 130, 246, 0.5);
  --blue-team-dark: #1e40af;
  --blue-team-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);

  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.5);
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --pitch-green: #0d4a2b;
  --pitch-line: rgba(255, 255, 255, 0.85);

  --font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Teko', 'Rajdhani', sans-serif;
  --bottom-nav-height: 68px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 60%);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
  overflow-x: hidden;
}

/* Hide Scrollbars completely across all browsers while keeping smooth scroll active */
html, body, *, ::-webkit-scrollbar {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera, Android WebKit */
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

* {
  -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS Safari */
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.glow-red {
  box-shadow: 0 0 20px var(--red-team-glow);
}
.glow-blue {
  box-shadow: 0 0 20px var(--blue-team-glow);
}
.glow-gold {
  box-shadow: 0 0 20px var(--accent-gold-glow);
}
.glow-cyan {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.text-red { color: var(--red-team); }
.text-blue { color: var(--blue-team); }
.text-gold { color: var(--accent-gold); }
.text-cyan { color: var(--accent-cyan); }
.text-green { color: var(--accent-green); }

/* =========================================================
   TOP HEADER & BRANDING
   ========================================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 10px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
  transition: transform 0.3s ease;
}

.brand-logo:hover {
  transform: rotate(5deg) scale(1.08);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1.5px;
  line-height: 1;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ef4444 0%, #ffffff 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.icon-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* =========================================================
   NAVIGATION TABS (DESKTOP & MOBILE)
   ========================================================= */
/* Desktop Top Nav */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 20px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  overflow-x: auto;
}

.nav-tab {
  flex: 1;
  min-width: max-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.25) 100%);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(10, 14, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  z-index: 1000;
  padding: 6px 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

.mobile-nav-items {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  width: 20%;
  height: 100%;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.mobile-nav-btn span.nav-icon {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.mobile-nav-btn.active {
  color: var(--accent-cyan);
}

.mobile-nav-btn.active span.nav-icon {
  transform: translateY(-2px) scale(1.15);
  filter: drop-shadow(0 0 8px var(--accent-cyan));
}

/* =========================================================
   TAB CONTENT SECTIONS & ANIMATIONS
   ========================================================= */
.tab-content {
  display: none;
  animation: fadeInTab 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-content.active {
  display: block;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card General Style */
.game-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

/* Section Header Titles */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title span.badge-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-weight: bold;
}

/* =========================================================
   HOME & HERO SECTION
   ========================================================= */
.hero-banner {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-glass);
  background: #0d1322;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.hero-bg {
  width: 100%;
  height: 260px;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.2) contrast(1.1);
  transition: transform 0.5s ease;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 23, 0.3) 0%, rgba(10, 14, 23, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.hero-clash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-pill-img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid;
}

.team-pill.red .team-pill-img {
  border-color: var(--red-team);
  box-shadow: 0 0 15px var(--red-team-glow);
}
.team-pill.blue .team-pill-img {
  border-color: var(--blue-team);
  box-shadow: 0 0 15px var(--blue-team-glow);
}

.team-pill-info h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}
.team-pill.red .team-pill-info h3 { color: var(--red-team); }
.team-pill.blue .team-pill-info h3 { color: var(--blue-team); }

.team-pill-info p {
  font-size: 11px;
  color: var(--text-secondary);
}

.vs-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-gold-glow);
  color: #000;
}

/* Quick Action Grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quick-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.quick-card:hover, .quick-card:active {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.25);
}

.quick-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.quick-card.red .quick-icon { background: rgba(239, 68, 68, 0.15); color: var(--red-team); }
.quick-card.blue .quick-icon { background: rgba(59, 130, 246, 0.15); color: var(--blue-team); }
.quick-card.gold .quick-icon { background: rgba(245, 158, 11, 0.15); color: var(--accent-gold); }
.quick-card.cyan .quick-icon { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }

.quick-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}
.quick-info p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Jersey Gallery Showcase */
.jersey-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.jersey-card {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-glass);
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.jersey-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.25);
}

.jersey-card::after {
  content: '🔍 Klik untuk Perbesar';
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.jersey-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.jersey-card:hover .jersey-img {
  transform: scale(1.05);
}

.jersey-details {
  padding: 14px;
  background: var(--bg-surface);
}

.jersey-details h4 {
  font-size: 16px;
  font-weight: 700;
}
.jersey-details p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* =========================================================
   JERSEY POPUP MODAL WITH 3D SPIN SWIRL ANIMATION
   ========================================================= */
.jersey-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.45); /* Transparan agar dashboard belakang tetap terlihat */
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  transition: all 0.3s ease;
}

.jersey-modal-backdrop.active {
  display: flex;
}

.jersey-modal-dialog {
  position: relative;
  max-width: 520px;
  width: 100%;
  perspective: 1000px;
}

.jersey-modal-container {
  position: relative;
  background: rgba(17, 24, 39, 0.82); /* Efek frosted glass transparan */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65), 0 0 30px rgba(6, 182, 212, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: center center;
}

.jersey-modal-backdrop.active .jersey-modal-container {
  animation: spinSwirlEntrance 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes spinSwirlEntrance {
  0% {
    transform: rotate(-720deg) scale(0.05);
    opacity: 0;
    filter: blur(12px) brightness(2.5);
  }
  65% {
    transform: rotate(18deg) scale(1.08);
    opacity: 1;
    filter: blur(0px) brightness(1.2);
  }
  85% {
    transform: rotate(-6deg) scale(0.98);
  }
  100% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
    filter: blur(0px) brightness(1);
  }
}

.jersey-modal-img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-glass);
}

.jersey-modal-close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red-team);
  color: #fff;
  border: 2px solid #fff;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  z-index: 20;
  transition: transform 0.2s ease, background 0.2s ease;
}

.jersey-modal-close-btn:hover {
  transform: scale(1.15) rotate(90deg);
  background: #dc2626;
}

.jersey-modal-caption {
  width: 100%;
  text-align: center;
  margin-top: 12px;
}

.jersey-modal-caption h3 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}

.jersey-modal-caption p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* =========================================================
   TAB 2: PLAYERS & INFOGRAPHICS (FUT CARDS & STATS)
   ========================================================= */
.team-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.team-switch-group {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  padding: 4px;
  border-radius: var(--radius-lg);
  gap: 4px;
}

.team-switch-btn {
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.team-switch-btn.red.active {
  background: var(--red-team-gradient);
  color: #fff;
  box-shadow: 0 0 15px var(--red-team-glow);
}

.team-switch-btn.blue.active {
  background: var(--blue-team-gradient);
  color: #fff;
  box-shadow: 0 0 15px var(--blue-team-glow);
}

.team-switch-btn.vs.active {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #000;
  box-shadow: 0 0 15px var(--accent-gold-glow);
}

/* Position Filter Pills */
.pos-filter-group {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
}

.pos-pill {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pos-pill:hover, .pos-pill.active {
  color: #fff;
  background: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
}

/* Player FUT Cards Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* FIFA / FUT Style Player Card */
.fut-card {
  position: relative;
  background: linear-gradient(145deg, #1b2438 0%, #0d1424 100%);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.fut-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  pointer-events: none;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.fut-card.team-merah {
  background: linear-gradient(145deg, #241417 0%, #150a0d 100%);
}
.fut-card.team-merah::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red-team-gradient);
}
.fut-card.team-merah:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 15px 35px var(--red-team-glow);
  border-color: var(--red-team);
}

.fut-card.team-biru {
  background: linear-gradient(145deg, #111e38 0%, #0a1020 100%);
}
.fut-card.team-biru::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--blue-team-gradient);
}
.fut-card.team-biru:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 15px 35px var(--blue-team-glow);
  border-color: var(--blue-team);
}

/* Card Header: Rating, Number, Position */
.fut-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.fut-rating-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fut-rating {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 0.9;
  font-weight: 800;
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.fut-pos {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.fut-number-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: bold;
  border: 1px solid var(--border-glass);
}

.fut-card.team-merah .fut-number-badge {
  color: var(--red-team);
  border-color: var(--red-team-glow);
}
.fut-card.team-biru .fut-number-badge {
  color: var(--blue-team);
  border-color: var(--blue-team-glow);
}

/* Card Photo Showcase */
.fut-player-visual {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
}

.fut-player-img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

.fut-card:hover .fut-player-img {
  transform: scale(1.06);
}

.captain-tag {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent-gold);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Card Name & Bio */
.fut-player-name {
  text-align: center;
  margin-bottom: 12px;
}

.fut-player-name h3 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}

.fut-player-name p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* FUT 6 Main Stats Matrix */
.fut-stats-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fut-stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
}

.fut-stat-val {
  font-weight: 800;
  color: #fff;
}

.fut-stat-lbl {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

/* Special Traits Badges */
.traits-container {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.trait-badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: 12px;
  white-space: nowrap;
}

/* Infographic Modal & Radar Chart View */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.45); /* Transparan agar dashboard belakang tetap terlihat */
  backdrop-filter: blur(8px) saturate(1.15);
  -webkit-backdrop-filter: blur(8px) saturate(1.15);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.25s ease forwards;
}

.modal-backdrop.active {
  display: flex;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: rgba(17, 24, 39, 0.88); /* Efek frosted glass transparan */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65), 0 0 35px rgba(6, 182, 212, 0.2);
  position: relative;
}

.modal-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
}

/* Modal Player Details Layout */
.modal-player-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
}

@media (max-width: 720px) {
  .modal-player-grid {
    grid-template-columns: 1fr;
  }
}

.modal-player-card-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-surface-elevated);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.modal-player-photo {
  max-height: 220px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

.modal-stats-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Radar Chart Canvas Container */
.radar-canvas-box {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  padding: 10px;
}

/* Stat Progress Bars */
.stat-bars-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.stat-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.stat-bar-fill.red { background: var(--red-team-gradient); }
.stat-bar-fill.blue { background: var(--blue-team-gradient); }
.stat-bar-fill.gold { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* Career Stats Grid in Modal */
.career-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--bg-surface-elevated);
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
}

.career-box h5 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent-cyan);
  line-height: 1;
}

.career-box p {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Head to Head Comparison Layout */
.h2h-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.h2h-clash-display {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.h2h-player-card {
  text-align: center;
  padding: 16px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.h2h-player-card.red {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.h2h-player-card.blue {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.h2h-player-img {
  height: 130px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}

.h2h-vs-badge {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--accent-gold);
  font-weight: 900;
  text-align: center;
}

@media (max-width: 580px) {
  .h2h-select-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .h2h-clash-display {
    gap: 8px;
  }
  
  .h2h-player-card {
    padding: 10px 6px;
    border-radius: 10px;
  }
  
  .h2h-player-img {
    height: 95px;
  }
  
  .h2h-vs-badge {
    font-size: 22px;
  }
}

/* =========================================================
   TAB 3: MANUAL SCORE INPUT & MATCH CONTROLLER
   ========================================================= */
.scoreboard-arena {
  background: radial-gradient(circle at 50% 30%, #151f38 0%, #0c1220 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-glass);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* Match Clock & Period Header */
.match-clock-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  gap: 8px;
}

.match-period-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 1px;
}

.timer-digits {
  font-family: 'Courier New', Courier, monospace;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.timer-controls {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-timer {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-timer:hover, .btn-timer:active {
  background: var(--accent-cyan);
  color: #000;
}

/* Live Teams Scoreboard Grid */
.scoreboard-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .scoreboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.team-score-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-glass);
  text-align: center;
  position: relative;
}

.team-score-card.red {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.15);
}
.team-score-card.blue {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.15);
}

.team-score-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.team-score-header h3 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 1px;
}

.big-score-display {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 0.9;
  font-weight: 900;
  margin: 12px 0;
  text-shadow: 0 0 20px currentColor;
}

/* Score Adjust Buttons */
.score-actions-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-score-adjust {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.btn-score-adjust:active {
  transform: scale(0.9);
}

.btn-score-plus.red {
  background: var(--red-team-gradient);
  color: #fff;
  box-shadow: 0 0 15px var(--red-team-glow);
}
.btn-score-minus.red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-team);
  border: 1px solid var(--red-team);
}

.btn-score-plus.blue {
  background: var(--blue-team-gradient);
  color: #fff;
  box-shadow: 0 0 15px var(--blue-team-glow);
}
.btn-score-minus.blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-team);
  border: 1px solid var(--blue-team);
}

/* Fouls & Cards Mini Matrix */
.team-match-stats {
  display: flex;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: var(--radius-md);
  font-size: 12px;
}

.stat-pill-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
}

.stat-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Middle VS / Event Trigger Column */
.score-divider-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.vs-text {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--accent-gold);
  font-weight: 800;
}

/* Quick Event Buttons */
.quick-event-btn-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.btn-event {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-event:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
}

/* Main Save to Server Button */
.btn-save-server {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
  margin-top: 18px;
}

.btn-save-server:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
}

.btn-save-server:active {
  transform: translateY(1px);
}

/* Live Event Log Feed */
.events-log-card {
  margin-top: 24px;
}

.event-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 6px;
}

.event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--text-muted);
}

.event-item.red { border-left-color: var(--red-team); }
.event-item.blue { border-left-color: var(--blue-team); }

.event-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-minute {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.event-desc {
  font-size: 13px;
}

.event-remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}
.event-remove-btn:hover { color: var(--red-team); }

/* Saved Match History List */
.matches-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.match-history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  transition: transform 0.2s ease;
}

.match-history-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.match-history-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.match-history-scoreline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
}

.history-team-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.history-score-digits {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 12px;
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
}

/* =========================================================
   TAB 4: SKEMA PERTANDINGAN & TACTICAL BOARD
   ========================================================= */
.tactics-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .tactics-container {
    grid-template-columns: 1fr;
  }
}

.tactics-court-wrapper {
  background: #061e12;
  border-radius: var(--radius-xl);
  border: 2px solid rgba(16, 185, 129, 0.3);
  overflow: hidden;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

.court-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 8px;
}

.court-tools-left, .court-tools-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.tool-btn:hover, .tool-btn.active {
  background: var(--accent-cyan);
  color: #000;
}

/* Tactical Court Stage */
.court-stage {
  position: relative;
  width: 100%;
  height: 440px;
  background: #09331e;
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 600px) {
  .court-stage {
    height: 340px;
  }
}

.court-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  pointer-events: none;
}

/* Court Vector SVG Lines */
.court-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Draggable Tactical Player Tokens */
.player-token {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transform: translate(-50%, -50%);
  z-index: 20;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.player-token:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.18);
  z-index: 50;
}

.player-token.red {
  background: var(--red-team-gradient);
  box-shadow: 0 0 15px var(--red-team-glow);
}
.player-token.blue {
  background: var(--blue-team-gradient);
  box-shadow: 0 0 15px var(--blue-team-glow);
}
.player-token.ball {
  width: 32px;
  height: 32px;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #cbd5e1 70%, #64748b 100%);
  border: 2px solid #000;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.token-num {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.token-name-tag {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  margin-top: 2px;
}

/* Tactics Scheme Cards Sidebar */
.tactics-info-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tactic-preset-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tactic-preset-card:hover, .tactic-preset-card.active {
  background: var(--bg-surface-elevated);
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 18px rgba(6, 182, 212, 0.2);
}

.tactic-preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tactic-preset-header h4 {
  font-size: 15px;
  font-weight: 700;
}

.tactic-preset-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* =========================================================
   TAB 5: TOURNAMENT BRACKET & STANDINGS
   ========================================================= */
.standings-table-container {
  overflow-x: auto;
  margin-top: 14px;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.standings-table th {
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-glass);
}

.standings-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.standings-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-team-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.form-badge-group {
  display: flex;
  gap: 3px;
}

.form-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
}
.form-dot.W { background: var(--accent-green); }
.form-dot.D { background: var(--accent-gold); color: #000; }
.form-dot.L { background: var(--red-team); }

/* Head to Head Match Simulator */
.h2h-sim-box {
  background: linear-gradient(145deg, #161f36 0%, #0d1322 100%);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-glass);
  margin-top: 20px;
}

.sim-radar-preview {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 16px 0;
}

.sim-team-stat-col {
  text-align: center;
}

.sim-stat-number {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
}

.btn-simulate {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #000;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  width: 100%;
  cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-gold-glow);
  transition: all 0.2s ease;
}

.btn-simulate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--accent-gold-glow);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-glass);
  border-left: 4px solid var(--accent-cyan);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  pointer-events: auto;
  animation: slideInToast 0.3s ease forwards;
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* =========================================================
   COMPREHENSIVE NATIVE-APP MOBILE RESPONSIVE SUITE
   Optimized for Android (Small/Medium/Large) & iPhone (SE to Pro Max)
   ========================================================= */

/* Prevent any icon or image squishing globally */
img, .team-pill-img, .brand-logo, .fut-player-img, .jersey-img, 
.court-bg-img, .jersey-modal-img, .token-avatar, .beating-heart {
  flex-shrink: 0 !important;
}

/* Tablet & Mobile Breakpoint (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 16px) + 24px);
  }

  .desktop-nav {
    display: none !important;
  }

  .mobile-bottom-bar {
    display: block !important;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .container {
    padding: 0 12px;
  }

  /* Scoreboard & Timer */
  .timer-digits {
    font-size: clamp(34px, 10vw, 48px);
    letter-spacing: 2px;
  }
  
  .big-score-display {
    font-size: clamp(48px, 14vw, 68px);
  }

  /* Quick action cards on tablet */
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Standard Smartphone Breakpoint (<= 540px) */
@media (max-width: 540px) {
  /* Top App Header */
  .app-header {
    padding: 10px 0;
  }

  .brand-section {
    gap: 8px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-text h1 {
    font-size: 19px;
    letter-spacing: 0.5px;
  }

  .brand-text p {
    font-size: 10px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  /* Hero Clash Banner */
  .hero-bg {
    height: 200px;
  }

  .hero-overlay {
    padding: 14px;
  }

  .hero-clash {
    gap: 6px;
  }

  .team-pill-img {
    width: 38px;
    height: 38px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }

  .team-pill-info h3 {
    font-size: 16px;
  }

  .team-pill-info p {
    font-size: 9.5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .vs-badge {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  /* Quick Action Grid (2x2 Matrix on Mobile) */
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }

  .quick-card {
    padding: 10px;
    gap: 8px;
    border-radius: var(--radius-sm);
  }

  .quick-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 8px;
  }

  .quick-info h4 {
    font-size: 12px;
    line-height: 1.2;
    margin-bottom: 0;
  }

  .quick-info p {
    display: none; /* Keep mobile clean and non-cluttered */
  }

  /* Player FUT Cards 2-Column Responsive Layout */
  .players-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .fut-card {
    padding: 10px;
    border-radius: 12px;
  }

  .fut-rating {
    font-size: 26px;
  }

  .fut-pos {
    font-size: 10px;
  }

  .fut-number-badge {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .fut-player-visual {
    height: 120px;
    margin-bottom: 6px;
  }

  .fut-player-img {
    max-height: 120px;
  }

  .fut-player-name h3 {
    font-size: 17px;
  }

  .fut-player-name p {
    font-size: 9.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fut-stats-matrix {
    padding: 6px 2px;
    gap: 3px 2px;
  }

  .fut-stat-item {
    font-size: 11px;
    gap: 2px;
  }

  .fut-stat-lbl {
    font-size: 9px;
  }

  .traits-container {
    display: none; /* Hide dense tags on card preview to keep card height clean on small screen */
  }

  /* Team Switcher Filter Buttons */
  .team-switch-group {
    width: 100%;
    display: flex;
    gap: 6px;
  }

  .team-switch-btn {
    flex: 1;
    padding: 10px 6px;
    font-size: 12px;
  }

  /* Position Filter Pills */
  .position-filters {
    overflow-x: auto;
    padding-bottom: 4px;
    display: flex;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .pos-pill {
    padding: 5px 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* Scoreboard Screen */
  .scoreboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .team-score-card {
    padding: 14px;
  }

  .team-score-header h3 {
    font-size: 20px;
  }

  .timer-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .btn-timer {
    padding: 10px;
    font-size: 12px;
  }

  .score-actions-row {
    gap: 16px;
  }

  .btn-score-adjust {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .team-match-stats {
    padding: 6px 4px;
    font-size: 11px;
  }

  .stat-pill-btn {
    padding: 4px 6px;
    font-size: 10.5px;
  }

  .btn-save-server {
    font-size: 15px;
    padding: 14px;
  }

  /* Tactical Board */
  .court-stage {
    height: 300px;
  }

  .court-toolbar {
    padding: 6px 8px;
    gap: 4px;
  }

  .tool-btn {
    padding: 5px 8px;
    font-size: 10.5px;
  }

  /* Jersey Showcase Grid */
  .jersey-showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .jersey-img {
    height: 180px;
  }

  /* Modals */
  .modal-dialog {
    max-height: 86vh;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-header h3 {
    font-size: 19px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-player-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Footer on small mobile */
  .footer-text {
    font-size: 12.5px;
    gap: 4px;
  }
}

/* Extra Small Phones (iPhone SE, Galaxy A01, <= 375px) */
@media (max-width: 375px) {
  .brand-text h1 {
    font-size: 17px;
  }
  
  .players-grid {
    grid-template-columns: 1fr; /* Single column on ultra-compact screens */
  }

  .fut-player-visual {
    height: 150px;
  }

  .fut-player-img {
    max-height: 150px;
  }

  .team-pill-info h3 {
    font-size: 14px;
  }

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

/* =========================================================
   APP FOOTER & ANIMATED BEATING HEART
   ========================================================= */
.app-footer {
  width: 100%;
  margin-top: 40px;
  margin-bottom: 20px;
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 50;
}

.footer-text {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.beating-heart {
  display: inline-block;
  color: #ef4444;
  font-size: 16px;
  animation: heartPulse 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.9));
  cursor: default;
  transform-origin: center center;
}

@keyframes heartPulse {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.35);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.35);
  }
  70% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.footer-link {
  color: #ff00ea; /* Magenta Neon */
  font-weight: 700;
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: all 0.25s ease;
  text-shadow: 0 0 10px rgba(255, 0, 234, 0.45);
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #ff00ea, #ff55bb);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px #ff00ea;
}

.footer-link:hover {
  color: #ff55f3;
  text-shadow: 0 0 16px rgba(255, 0, 234, 0.9), 0 0 25px rgba(255, 85, 243, 0.7);
  transform: translateY(-2px) scale(1.04);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-divider {
  color: var(--text-muted);
  opacity: 0.5;
  margin: 0 3px;
}
