/* ============================================
   SOCCER COACH U7 — PREMIUM STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
  --color-primary: #059669;
  --color-primary-light: #10b981;
  --color-primary-dark: #047857;
  --color-primary-deeper: #064e3b;
  --color-accent: #f59e0b;
  --color-accent-light: #fbbf24;
  --color-blue: #3b82f6;
  --color-blue-dark: #1d4ed8;
  --color-red: #ef4444;
  --color-red-dark: #b91c1c;
  --color-green: #22c55e;
  --color-purple: #8b5cf6;
  --color-white: #ffffff;
  --color-bg: #f0fdf4;
  --color-bg-alt: #ecfdf5;
  --color-surface: rgba(255, 255, 255, 0.85);
  --color-surface-solid: #ffffff;
  --color-text: #1a1a2e;
  --color-text-secondary: #64748b;
  --color-text-light: #94a3b8;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-strong: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(5, 150, 105, 0.15);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
[data-theme="dark"] {
  --color-primary: #34d399;
  --color-primary-light: #6ee7b7;
  --color-primary-dark: #10b981;
  --color-primary-deeper: #064e3b;
  --color-bg: #0f172a;
  --color-bg-alt: #1e293b;
  --color-surface: rgba(30, 41, 59, 0.85);
  --color-surface-solid: #1e293b;
  --color-text: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-light: #64748b;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Animated Background ===== */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 20%, rgba(5, 150, 105, 0.06) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
  animation: bgFloat 20s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, -2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* ===== Header ===== */
.app-header {
  background: linear-gradient(135deg, var(--color-primary-deeper) 0%, var(--color-primary-dark) 50%, var(--color-primary) 100%);
  color: var(--color-white);
  padding: 1rem 1.25rem;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

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

.header-content h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-content h1 .ball {
  display: inline-block;
  animation: ballBounce 2s ease-in-out infinite;
}

@keyframes ballBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(15deg); }
}

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

.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.subtitle {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== Tab Bar ===== */
.tab-bar {
  display: flex;
  background: var(--color-surface-solid);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 60px;
  z-index: 99;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  padding: 0.35rem;
  gap: 0.25rem;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.2rem;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 0.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  gap: 0.2rem;
  position: relative;
  border-radius: var(--radius-sm);
}

.tab-btn .tab-icon {
  font-size: 1.25rem;
  transition: transform var(--transition-base);
}

.tab-btn:hover {
  color: var(--color-primary);
  background: rgba(5, 150, 105, 0.06);
}

.tab-btn:hover .tab-icon {
  transform: scale(1.1);
}

.tab-btn.active {
  color: var(--color-primary-dark);
  background: rgba(5, 150, 105, 0.1);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -0.35rem;
  left: 25%;
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 3px;
}

/* ===== Main Content ===== */
.main-content {
  padding: 1rem;
  padding-bottom: 5.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.page {
  display: none;
  animation: pageIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Cards & Surfaces ===== */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}

/* ===== Dashboard ===== */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.stat-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

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

.stat-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* ===== Quick Actions ===== */
.quick-actions {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(59, 130, 246, 0.05));
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.quick-actions h2 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
  color: var(--color-text);
  font-weight: 700;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.action-btn {
  background: var(--color-surface-solid);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
}

.action-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.action-btn:hover {
  border-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.action-btn:hover::after {
  opacity: 1;
}

.action-btn:active {
  transform: translateY(0) scale(0.97);
}

.action-btn .action-icon {
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
}

.action-btn span:last-child {
  position: relative;
  z-index: 1;
}

/* ===== Tips Section ===== */
.tips-section {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid #a7f3d0;
  position: relative;
  overflow: hidden;
}

.tips-section::before {
  content: '💡';
  position: absolute;
  top: -10px;
  right: -5px;
  font-size: 4rem;
  opacity: 0.1;
}

.tips-section h2 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
}

.tips-section p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  color: #065f46;
  line-height: 1.6;
}

/* ===== Buttons ===== */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-accent), #d97706);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-outline {
  background: var(--color-surface-solid);
  border: 2px solid var(--color-border-strong);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(5, 150, 105, 0.04);
}

.btn-danger {
  background: linear-gradient(135deg, var(--color-red), var(--color-red-dark));
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* ===== Timer ===== */
.timer-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.timer-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.timer-header select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-surface-solid);
  cursor: pointer;
  font-family: inherit;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.timer-header select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.timer-display {
  background: linear-gradient(145deg, var(--color-surface-solid), rgba(5, 150, 105, 0.03));
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.timer-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(5, 150, 105, 0.04) 0%, transparent 70%);
  animation: timerPulse 4s ease-in-out infinite;
}

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

.timer-period-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.timer-time {
  font-size: 5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.timer-time.warning {
  background: linear-gradient(135deg, #d97706, var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
}

.timer-time.danger {
  background: linear-gradient(135deg, #dc2626, var(--color-red));
  -webkit-background-clip: text;
  background-clip: text;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

.timer-progress {
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent-light), var(--color-accent));
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width 1s linear;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.timer-controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.session-overview, .period-config {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.session-overview h3, .period-config h3 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.period-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.period-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: all var(--transition-fast);
}

.period-item:hover {
  border-color: var(--color-border-strong);
}

.period-item.active-period {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(5, 150, 105, 0.03));
  border-color: var(--color-primary);
  font-weight: 700;
}

.period-item.active-period::before {
  content: '▶';
  color: var(--color-primary);
  font-size: 0.6rem;
  margin-right: 0.5rem;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.period-item.completed {
  opacity: 0.45;
  text-decoration: line-through;
}

.period-duration {
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
}

.period-config-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.period-config-item label {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 500;
}

.period-config-item input[type="number"] {
  width: 55px;
  padding: 0.3rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
}

.period-config-item input[type="number"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ===== Drills ===== */
.drills-header {
  margin-bottom: 1rem;
}

.drills-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.drills-filters {
  display: flex;
  gap: 0.5rem;
}

.drills-filters input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  background: var(--color-surface-solid);
  font-family: inherit;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.drills-filters input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.drills-filters select {
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-surface-solid);
  cursor: pointer;
  font-family: inherit;
  color: var(--color-text);
}

.drills-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drill-card {
  background: var(--color-surface-solid);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.drill-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.04), transparent);
  transition: height var(--transition-base);
}

.drill-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
}

.drill-card:hover::after {
  height: 100%;
}

.drill-card.warmup { border-left-color: var(--color-green); }
.drill-card.dribbling { border-left-color: var(--color-blue); }
.drill-card.passing { border-left-color: var(--color-purple); }
.drill-card.shooting { border-left-color: var(--color-red); }
.drill-card.gameplay { border-left-color: var(--color-primary); }
.drill-card.cooling { border-left-color: var(--color-text-light); }

.drill-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.drill-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.drill-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.drill-meta span {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.drill-card p {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.drill-card-full {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.drill-card.expanded .drill-card-full {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.drill-card-full h5 {
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  color: var(--color-primary);
  font-weight: 700;
}

.drill-card-full p, .drill-card-full li {
  font-size: 0.8rem;
  color: var(--color-text);
  line-height: 1.6;
}

.drill-card-full ul {
  padding-left: 1.2rem;
  margin-top: 0.25rem;
}

/* ===== Soccer Field Visualization ===== */
.soccer-field {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: relative;
  aspect-ratio: 3/4;
  max-height: 400px;
  margin: 1rem 0;
  box-shadow: var(--shadow-lg), inset 0 0 40px rgba(0,0,0,0.1);
  border: 3px solid rgba(255,255,255,0.3);
  overflow: hidden;
}

.soccer-field::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(255,255,255,0.25) 49.5%, rgba(255,255,255,0.25) 50.5%, transparent 50.5%),
    linear-gradient(0deg, transparent 49.5%, rgba(255,255,255,0.2) 49.5%, rgba(255,255,255,0.2) 50.5%, transparent 50.5%);
  pointer-events: none;
}

.field-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 50%;
}

.field-player {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.5);
}

.field-player.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.field-player.red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.field-player:hover { transform: scale(1.15); }

/* ===== Teams ===== */
.teams-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.teams-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.teams-layout {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.team-card {
  flex: 1;
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
}

.team-color-bar {
  height: 5px;
}

.team-card h3 {
  padding: 0.75rem 1rem 0.2rem;
  font-size: 1rem;
  font-weight: 700;
}

.team-name-input {
  padding: 0.2rem 1rem 0.6rem;
  border: none;
  border-bottom: 2px solid var(--color-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  width: calc(100% - 2rem);
  font-family: inherit;
  background: transparent;
}

.team-name-input:focus {
  outline: none;
  border-bottom-color: var(--color-primary);
}

.player-list {
  padding: 0.4rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 80px;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  transition: all var(--transition-fast);
}

.player-item:hover {
  background: rgba(5, 150, 105, 0.06);
}

.player-remove {
  background: none;
  border: none;
  color: var(--color-red);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
  opacity: 0.5;
  transition: all var(--transition-fast);
  border-radius: var(--radius-full);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-remove:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

.score-section {
  padding: 0.75rem 1rem;
  border-top: 2px solid var(--color-border);
  text-align: center;
}

.score-section h4 {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.score-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.score-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.score-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: scale(1.1);
}

.score-value {
  font-size: 2rem;
  font-weight: 900;
  min-width: 50px;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-text-secondary);
  background: var(--color-surface-solid);
  border-radius: var(--radius-full);
  width: 40px;
  height: 40px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.match-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* ===== Plan Builder ===== */
.plan-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.plan-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.plan-builder {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.plan-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.input-group label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
  padding: 0.5rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.plan-activities h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.plan-activity-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
  background: var(--color-bg);
  transition: all var(--transition-fast);
}

.plan-activity-item:hover {
  border-color: var(--color-border-strong);
}

.activity-type { font-size: 1.1rem; }

.plan-activity-item .activity-info { flex: 1; }

.activity-name {
  font-size: 0.82rem;
  font-weight: 600;
}

.activity-duration {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}

.activity-note {
  font-size: 0.7rem;
  color: var(--color-primary);
  font-style: italic;
}

.activity-remove {
  background: none;
  border: none;
  color: var(--color-red);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.15rem;
  opacity: 0.5;
  transition: all var(--transition-fast);
}

.activity-remove:hover { opacity: 1; }

.add-activity-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

.plan-drill-select {
  flex: 1;
  min-width: 140px;
  padding: 0.5rem;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
}

.plan-summary {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.06), rgba(245, 158, 11, 0.04));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(5, 150, 105, 0.1);
}

.plan-summary h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.plan-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.plan-actions {
  display: flex;
  gap: 0.4rem;
}

.saved-plans {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.saved-plans h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.saved-plan-item {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.saved-plan-item:hover {
  border-color: var(--color-border-strong);
}

.saved-plan-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
}

.saved-plan-info p {
  font-size: 0.7rem;
  color: var(--color-text-secondary);
}

.saved-plan-actions {
  display: flex;
  gap: 0.3rem;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-white);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h3 { font-size: 1.05rem; margin-bottom: 1rem; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.modal-close:hover { color: var(--color-text); }

/* ===== Empty States ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

.empty-state p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .main-content { padding: 0.75rem; padding-bottom: 5.5rem; }
  .tab-btn .tab-label { font-size: 0.55rem; }
  .tab-btn .tab-icon { font-size: 1.1rem; }
  .quick-stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stat-card { padding: 0.75rem 0.4rem; }
  .stat-icon { font-size: 1.3rem; }
  .stat-value { font-size: 1.2rem; }
  .stat-label { font-size: 0.55rem; }
  .timer-time { font-size: 3.5rem; }
  .timer-display { padding: 2rem 1rem; }
  .teams-layout { flex-direction: column; }
  .vs-divider { padding: 0.3rem 0; }
  .plan-inputs { grid-template-columns: 1fr; }
  .plan-actions { flex-direction: column; }
  .add-activity-row { flex-direction: column; align-items: stretch; }
  .action-buttons { grid-template-columns: repeat(2, 1fr); }
  .header-content h1 { font-size: 1.15rem; }
}

@media (max-width: 380px) {
  .tab-label { display: none !important; }
  .stat-label { display: none !important; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }