/* ═══════════════════════════════════════════════════════════════════════
   GNP Institute – Global CSS Design System
   ═══════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Sora:wght@300;400;600;700;800&display=swap');

/* ─── CSS Variables ────────────────────────────────────────────────────── */
:root {
  --bg-primary:   #05070f;
  --bg-card:      #0d1117;
  --bg-card2:     #111827;
  --border:       rgba(255,255,255,0.07);
  --border-glow:  rgba(99,102,241,0.4);

  --text-primary:   #f0f4ff;
  --text-secondary: #9ba3b8;
  --text-muted:     #4b5563;

  --accent:         #6366f1;
  --accent-light:   #818cf8;
  --accent-glow:    rgba(99,102,241,0.25);
  --gold:           #f59e0b;
  --gold-light:     #fbbf24;
  --success:        #10b981;
  --danger:         #ef4444;
  --warning:        #f59e0b;

  --ielts-color:   #6366f1;
  --french-color:  #8b5cf6;
  --duolingo-color:#10b981;
  --spoken-color:  #ef4444;
  --stock-color:   #f59e0b;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);

  --nav-h: 70px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Sora', sans-serif;

  --api: http://localhost:3001;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

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

/* ─── Noise Grain Overlay ────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ─── Utility Classes ────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.hidden { display: none !important; }

/* ─── Glassmorphism Card ─────────────────────────────────────────────────── */
.glass-card {
  background: rgba(13,17,23,0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* ─── Gradient Text ──────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em;
  transition: all 0.25s ease; position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,0.08), transparent);
  opacity: 0; transition: opacity 0.25s;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #4f46e5 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #d97706 100%);
  color: #fff; box-shadow: 0 4px 20px rgba(245,158,11,0.4);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(245,158,11,0.5); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--border-glow); }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-lg); }

/* ─── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-free    { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.badge-premium { background: rgba(245,158,11,0.15); color: var(--gold);    border: 1px solid rgba(245,158,11,0.3); }
.badge-locked  { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* ─── Form Inputs ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.form-input {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary); font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text-muted); }

/* ─── Section Headers ────────────────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 60px; }
.section-label {
  display: inline-block; padding: 6px 16px;
  background: var(--accent-glow); border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px; color: var(--accent-light);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-top: 12px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ─── Toast Notifications ────────────────────────────────────────────────── */
.toast-container { position: fixed; top: 90px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 20px; border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 500; max-width: 320px;
  animation: slideInToast 0.3s ease; backdrop-filter: blur(20px);
  border: 1px solid;
}
.toast-success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.4); color: #34d399; }
.toast-error   { background: rgba(239,68,68,0.15);  border-color: rgba(239,68,68,0.4);  color: #f87171; }
.toast-info    { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.4); color: #a5b4fc; }

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

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
  width: 100%; max-width: 480px; position: relative;
  animation: slideUp 0.3s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 1.1rem;
  cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: rgba(239,68,68,0.2); color: #f87171; }

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

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

/* ─── Lock overlay for premium content ───────────────────────────────────── */
.lock-overlay {
  position: absolute; inset: 0; border-radius: inherit;
  background: rgba(5,7,15,0.85); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  z-index: 2;
}
.lock-icon { font-size: 2rem; }
.lock-text { font-size: 0.8rem; color: var(--text-secondary); text-align: center; padding: 0 16px; }

/* ─── Progress bar ───────────────────────────────────────────────────────── */
.progress-bar-wrap { background: rgba(255,255,255,0.06); border-radius: 100px; height: 6px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 100px; transition: width 0.5s ease; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}
