/* ═══════════════════════════════════════════════════════════════════════
   GLOBAL STYLES — FIFA Web Game
   ═══════════════════════════════════════════════════════════════════════ */

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

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

:root {
  --primary:  #00D46A;
  --accent:   #FFD700;
  --dark:     #0a0f14;
  --dark2:    #111820;
  --dark3:    #1a2535;
  --text:     #e8f0fe;
  --text-dim: #8a9bb0;
  --border:   rgba(255,255,255,0.08);
  --glow-g:   rgba(0,212,106,0.15);
  --radius:   12px;
  --shadow:   0 20px 60px rgba(0,0,0,0.5);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ─── SCROLLBAR ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ─── BUTTONS ────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px;
  background: linear-gradient(135deg, #00D46A, #00A851);
  color: #000;
  font-weight: 700; font-size: 1rem;
  border-radius: 50px;
  border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(0,212,106,0.4);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(0,212,106,0.6);
}
.btn-primary.btn-large { padding: 18px 48px; font-size: 1.1rem; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-weight: 600; font-size: 1rem;
  cursor: pointer; transition: all 0.2s;
  text-decoration: none;
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }

/* ─── NAVBAR ─────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: background 0.3s, backdrop-filter 0.3s;
}
.navbar.scrolled {
  background: rgba(10,15,20,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.4rem; font-weight: 900;
  letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo span { color: var(--primary); }
.nav-links {
  display: flex; align-items: center; gap: 32px;
  font-weight: 600;
}
.nav-links a { color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.btn-play-nav {
  background: var(--primary);
  color: #000 !important;
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
}
.btn-play-nav:hover { background: #00b85a; }

/* ─── HERO ───────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 24px 60px;
  position: relative; overflow: hidden;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero-field {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(0,212,106,0.07) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(255,215,0,0.04) 0%, transparent 50%),
    linear-gradient(180deg, #0a0f14 0%, #0d1821 100%);
}
.hero-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,106,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:0.5;transform:translate(-50%,-50%) scale(1);} 50%{opacity:1;transform:translate(-50%,-50%) scale(1.15);} }

.hero-content { position: relative; z-index: 1; max-width: 560px; }
.hero-badge {
  display: inline-block;
  background: rgba(0,212,106,0.15);
  border: 1px solid rgba(0,212,106,0.3);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, #00D46A, #FFD700, #00D46A);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero-sub {
  font-size: 1.1rem; color: var(--text-dim);
  margin-bottom: 36px; max-width: 460px;
}
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block; font-size: 2rem; font-weight: 900;
  color: var(--primary); line-height: 1;
}
.stat-lbl { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; text-transform: uppercase; }

/* Hero Preview Window */
.hero-preview { position: relative; z-index: 1; }
.preview-window {
  border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,106,0.2);
  position: relative;
}
.preview-bar {
  background: #1e2530; padding: 10px 14px;
  display: flex; gap: 6px; align-items: center;
}
.preview-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #555;
}
.preview-bar span:nth-child(1) { background: #FF5F57; }
.preview-bar span:nth-child(2) { background: #FFBD2E; }
.preview-bar span:nth-child(3) { background: #28C840; }
#previewCanvas { display: block; }
.preview-overlay {
  position: absolute; inset: 32px 0 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.preview-window:hover .preview-overlay { opacity: 1; }
.preview-play-btn {
  background: rgba(0,212,106,0.9);
  color: #000; font-weight: 900; font-size: 1.5rem;
  padding: 16px 40px; border-radius: 50px;
  box-shadow: 0 0 40px rgba(0,212,106,0.5);
  transition: transform 0.2s;
}
.preview-play-btn:hover { transform: scale(1.05); }

/* ─── AD SECTIONS ────────────────────────────────────────────────────── */
.ad-section {
  text-align: center; padding: 16px;
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 100px;
  display: flex; align-items: center; justify-content: center;
}

/* ─── CONTAINER ─────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── SECTION HEADER ─────────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-badge {
  display: inline-block;
  color: var(--primary); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  background: rgba(0,212,106,0.1);
  padding: 5px 14px; border-radius: 50px;
  border: 1px solid rgba(0,212,106,0.25);
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 900;
  letter-spacing: -0.5px; margin-bottom: 12px;
}
.section-header p { color: var(--text-dim); font-size: 1.05rem; max-width: 480px; margin: 0 auto; }

/* ─── FEATURES ───────────────────────────────────────────────────────── */
.features { padding: 96px 24px; background: var(--dark2); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,106,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,212,106,0.1);
}
.feature-icon { font-size: 2.4rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p  { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }

/* ─── TEAMS ─────────────────────────────────────────────────────────── */
.teams-section { padding: 96px 24px; }
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px; margin-bottom: 48px;
}
.team-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
}
.team-card:hover { transform: translateY(-4px); border-color: rgba(255,215,0,0.4); }
.team-flag { font-size: 2rem; margin-bottom: 8px; }
.team-name { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; }
.team-rating-bar {
  height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden; margin-bottom: 6px;
}
.team-rating-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.team-rating-num { font-size: 0.75rem; color: var(--text-dim); font-weight: 600; }
.teams-cta { text-align: center; }

/* ─── HOW TO PLAY ────────────────────────────────────────────────────── */
.how-to-play { padding: 96px 24px; background: var(--dark2); }
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.controls-card {
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.controls-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.control-list { display: flex; flex-direction: column; gap: 16px; }
.control-item {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 0.9rem;
}
.control-item:first-child { flex-direction: column; align-items: flex-start; gap: 6px; }
kbd {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px; border-radius: 6px;
  font-size: 0.8rem; font-family: inherit; color: var(--text);
  font-weight: 600;
}
.touch-icon, .tip-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ─── CTA BANNER ─────────────────────────────────────────────────────── */
.cta-banner {
  padding: 80px 24px; text-align: center;
  background: linear-gradient(135deg, rgba(0,212,106,0.08) 0%, rgba(255,215,0,0.05) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-banner h2 { font-size: 2.4rem; font-weight: 900; margin-bottom: 16px; }
.cta-banner p { color: var(--text-dim); margin-bottom: 36px; font-size: 1.05rem; }

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
.footer { padding: 60px 24px 30px; background: #070a0e; }
.footer-content {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-logo { font-size: 1.5rem; font-weight: 900; margin-bottom: 12px; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; max-width: 280px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 { font-weight: 700; margin-bottom: 6px; color: var(--text); }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 48px; text-align: center; color: var(--text-dim); font-size: 0.85rem;
}

/* ─── MODALS ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  background: var(--dark3); border: 1px solid rgba(255,255,255,0.1);
  padding: 30px; border-radius: 16px; width: 90%; max-width: 400px;
  position: relative; transform: translateY(20px); transition: all 0.3s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
  position: absolute; top: 15px; right: 15px; background: none; border: none;
  color: #fff; font-size: 24px; cursor: pointer; opacity: 0.5;
}
.modal-close:hover { opacity: 1; }
.modal-content h3 { margin-bottom: 10px; color: var(--primary); font-size: 1.25rem; font-weight: bold;}
.modal-content p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--text-dim); margin-bottom: 5px; font-weight: bold;}
.form-group input, .form-group textarea {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  padding: 10px; border-radius: 8px; color: #fff; outline: none; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.btn-submit {
  width: 100%; background: var(--primary); color: #000; border: none; padding: 12px;
  border-radius: 8px; font-weight: bold; cursor: pointer; margin-top: 10px; font-size: 1rem;
}
.btn-submit:hover { opacity: 0.9; }
.modal-contact {
  display: flex; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
}
.modal-contact small { color: var(--text-dim); text-transform: uppercase; font-size: 0.7rem; }
.modal-contact p { font-size: 0.9rem; color: #fff; font-weight: bold; margin: 0; }

.apps-modal-content { max-width: 350px; }
.menu-section { margin-bottom: 20px; }
.menu-section h3 { font-size: 1rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; margin-bottom: 15px;}
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app-item {
  display: flex; flex-direction: column; align-items: center; text-decoration: none;
  padding: 10px; border-radius: 12px; transition: background 0.2s;
}
.app-item:hover { background: rgba(255,255,255,0.05); }
.app-icon { font-size: 24px; margin-bottom: 8px; display:flex; align-items:center; justify-content:center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.1); }
.app-label { font-size: 0.75rem; color: var(--text-dim); text-align: center; }
.app-item:hover .app-label { color: #fff; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 80px 16px 40px; gap: 40px; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-preview { width: 100%; max-width: 400px; }
  #previewCanvas { width: 100%; height: auto; }
  .nav-links { display: none; }
  .footer-content { grid-template-columns: 1fr; gap: 32px; }
  .features-grid { grid-template-columns: 1fr; }
}
