/* Tables Football World Cup 2026 - Shared Styles */

:root {
  --pitch-green:   #0d5c2e;
  --pitch-dark:    #094a24;
  --gold:          #ffd700;
  --gold-dark:     #c9a800;
  --bg-dark:       #0a0e1a;
  --bg-card:       #131929;
  --bg-input:      #1c2638;
  --border:        #2a3a52;
  --text-primary:  #ffffff;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --error:         #ef4444;
  --success:       #22c55e;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:     0 8px 48px rgba(0, 0, 0, 0.6);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background-image: url('assets/background1.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Pitch background pattern ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.015) 60px,
      rgba(255,255,255,0.015) 61px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(255,255,255,0.015) 60px,
      rgba(255,255,255,0.015) 61px
    );
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1, h2, h3 { line-height: 1.2; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--gold-dark); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pitch-green), #16a34a);
  color: #fff;
  box-shadow: 0 2px 12px rgba(13, 92, 46, 0.5);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(13, 92, 46, 0.7);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: var(--bg-dark);
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.3);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #f59e0b, var(--gold));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-full { width: 100%; }

.btn:active { transform: translateY(0); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* ── Form elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.25rem;
}

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

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--pitch-green);
  box-shadow: 0 0 0 3px rgba(13, 92, 46, 0.25);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--error); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: none;
}
.alert.show { display: block; }
.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

/* ── World Cup badge ── */
.wc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Spinner ── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.spinner.show { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 480px) {
  .btn { padding: 13px 24px; }
  .card { padding: 1.5rem; }
}
