:root {
  --bg-dark: #030711;
  --surface: #141b2f;
  --glass-light: rgba(255, 255, 255, 0.05);
  --glass-lighter: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --green: #00ff88;
  --green-dim: rgba(0, 255, 136, 0.15);
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --gold: #d4a843;
  --red: #ff3d5a;
  --text-primary: #e8eef8;
  --text-secondary: #a8b5c8;
  --text-tertiary: #7a8fa8;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --z-modal: 1000;
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}

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

.header-center {
  flex: 1;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.brand-dot {
  color: var(--green);
  animation: glow-pulse 2s ease-in-out infinite;
}

.brand-text {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.header-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.header-title .year {
  color: var(--gold);
}

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

.install-btn, .user-profile {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.user-profile {
  display: inline-flex;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}

.live-pulse {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse-live 1s ease-in-out infinite;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 15px;
}

.matches-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-card {
  background: var(--glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.match-card--live {
  border-color: var(--red);
  background: rgba(255, 61, 90, 0.08);
}

.match-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 11px;
}

.match-card__group {
  background: var(--green-dim);
  color: var(--green);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.match-card__status--live {
  color: var(--red);
  font-weight: 700;
}

.match-card__body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

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

.team--away {
  flex-direction: row-reverse;
}

.team__flag {
  font-size: 24px;
}

.team__name {
  font-weight: 600;
  font-size: 14px;
}

.score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.score__num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}

.stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
}

.stat-value.highlighted {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.3);
}

.leaderboard {
  padding: 1.5rem;
}

.leaderboard-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--glass-light);
}

.rank {
  font-weight: 700;
  color: var(--gold);
}

.prediction-wide {
  grid-column: 1 / -1;
}

.prediction-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.5rem;
}

.predict-select {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.predict-select label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.match-predictions {
  padding: 1.5rem;
}

.match-predictions h3 {
  margin-bottom: 1rem;
}

.glass-input {
  background: var(--glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.glass-input:focus {
  background: var(--glass-lighter);
  border-color: var(--green);
  outline: none;
}

.glass-button {
  background: var(--glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-button:hover {
  border-color: var(--green);
}

.button-primary {
  background: linear-gradient(135deg, var(--green) 0%, var(--cyan) 100%);
  border: none;
  color: var(--bg-dark);
  font-weight: 700;
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.badge-ai {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid var(--cyan);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  max-width: 800px;
  width: 90%;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: var(--glass-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.glass-card {
  background: var(--glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.glass-small {
  background: var(--glass-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
}

.animated-glow {
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 8px rgba(0, 255, 136, 0.4); }
  50% { text-shadow: 0 0 16px rgba(0, 255, 136, 0.8); }
}