@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

/* ─── Variables — TrAEnglish Brand ───────────────────────────────────── */
:root {
  --primary: #F26522;
  --primary-dark: #D4521A;
  --primary-light: #F57C40;
  --accent: #1a1a1a;
  --accent-dark: #000000;
  --accent-light: #444444;
  --bg: #FBF7F4;
  --card: #ffffff;
  --text: #1a1a1a;
  --text-sec: #4a4a4a;
  --text-muted: #777777;
  --border: #EDD5C4;
  --success: #0f9e72;
  --warning: #f59e0b;
  --danger: #e53e3e;
  --info: #3182ce;
  --shadow: 0 2px 8px rgba(242,101,34,.10);
  --shadow-md: 0 4px 16px rgba(242,101,34,.13);
  --shadow-lg: 0 8px 32px rgba(242,101,34,.16);
  
  /* Tokens from DESIGN.md (Reading + Listening Unified) */
  --font-family: 'Nunito', 'Helvetica Neue', Roboto, Helvetica, Arial, sans-serif;
  --font-size-xs: 14px;
  --font-size-sm: 16px;
  --font-size-md: 20px;
  --font-size-lg: 22px;
  --font-size-xl: 24px;
  --font-size-2xl: 26px;
  --font-size-3xl: 32px;

  /* Unified Spacing Scale */
  --space-0-5: 2.5px;
  --space-1: 1px;
  --space-2: 5px;
  --space-3: 6px;
  --space-3-5: 7px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 15px;
  --space-8: 20px;
  --space-9: 30px;

  /* Unified Radius Scale */
  --radius-xs: 4px;
  --radius-sm: 26px;
  --radius-md: 30px;
  --radius-lg: 50px;
  --radius-xl: 100px;
  
  /* Fallbacks for older references */
  --radius: var(--radius-xs);

}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-family); background: var(--bg); color: var(--text); line-height: 1.5; font-size: var(--font-size-sm); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Typography ───────────────────────────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-sec); }

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius); border: none;
  font-size: .9rem; font-weight: 600; transition: all .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline-accent { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn-outline-accent:hover { background: var(--accent); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ─── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 24px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }

/* ─── Navbar ───────────────────────────────────────────────────────────── */
.navbar {
  background: #ffffff;
  padding: 0 40px; height: 72px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,.07); position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid #f0ece8;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { background: none; padding: 0; border-radius: 0; display: block; }
.nav-logo-icon { width: 38px; height: 38px; background: rgba(242,101,34,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 900; color: var(--primary); }
.nav-center-links { display: flex; align-items: center; gap: 2px; }
.nav-links { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.nav-link { color: #333; padding: 8px 15px; border-radius: 6px; font-size: .9rem; font-weight: 500; transition: all .2s; }
.nav-link:hover, .nav-link.active { background: rgba(242,101,34,.07); color: var(--primary); }
.nav-btn { background: transparent !important; border: 2px solid var(--primary) !important; color: var(--primary) !important; font-weight: 700 !important; padding: 8px 22px !important; border-radius: 24px !important; transition: all .2s !important; white-space: nowrap; }
.nav-btn:hover { background: var(--primary) !important; color: #fff !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(242,101,34,.25) !important; }
.nav-user { display: flex; align-items: center; gap: 10px; color: #333; font-size: .9rem; }
.nav-avatar { width: 34px; height: 34px; background: rgba(242,101,34,.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); font-size: .85rem; }

/* ─── Hero Split Layout ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  padding: 80px 32px; position: relative; overflow: hidden;
}
.hero-split {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 48px; min-height: 520px;
}
.hero-split-left { flex: 1; position: relative; z-index: 1; }
.hero-split-right { flex: 0 0 440px; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.95); padding: 6px 16px; border-radius: 20px; font-size: .78rem; font-weight: 600; margin-bottom: 20px; letter-spacing: .5px; text-transform: uppercase; }
.hero-split-left h1 { color: #fff; font-size: 2.8rem; font-weight: 900; line-height: 1.2; margin-bottom: 16px; }
.hero-split-left h1 span { color: var(--accent); }
.hero-split-left p { color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 28px; max-width: 480px; line-height: 1.7; }
.hero-stats-row { display: flex; align-items: center; gap: 20px; margin-bottom: 32px; }
.hero-stat-item { text-align: center; }
.hero-stat-num { font-size: 1.5rem; font-weight: 900; color: #fff; line-height: 1; }
.hero-stat-label { font-size: .72rem; color: rgba(255,255,255,.65); margin-top: 3px; }
.hero-stat-sep { width: 1px; height: 36px; background: rgba(255,255,255,.2); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img-card { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.hero-main-img { width: 100%; height: 320px; object-fit: cover; display: block; }
.hero-floating-badge { position: absolute; bottom: 16px; left: 16px; background: #fff; border-radius: 10px; padding: 10px 16px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); }
.hero-float-icon { width: 32px; height: 32px; background: rgba(15,158,114,.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--success); font-size: 1rem; }
.hero-ielts-logos { display: flex; gap: 16px; align-items: center; padding: 12px 20px; background: rgba(255,255,255,.1); border-radius: 10px; border: 1px solid rgba(255,255,255,.15); }

/* ─── Skills Section ────────────────────────────────────────────────────── */
.skills-section { padding: 80px 32px; max-width: 1200px; margin: 0 auto; }
.skills-header { text-align: center; margin-bottom: 52px; }
.skills-header h2 { font-size: 2.2rem; color: var(--text); margin-bottom: 10px; font-weight: 800; }
.skills-header p { color: var(--text-muted); font-size: 1rem; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.skill-card { background: var(--card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 2px solid transparent; transition: all .3s; }
.skill-card:hover, .skill-card-featured { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.skill-card-featured { transform: translateY(-6px); }
.skill-card-img { position: relative; height: 200px; overflow: hidden; }
.skill-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.skill-card:hover .skill-card-img img { transform: scale(1.05); }
.skill-card-badge { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 20px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.skill-card-badge.listening { background: rgba(49,130,206,.9); color: #fff; }
.skill-card-badge.reading { background: rgba(15,158,114,.9); color: #fff; }
.skill-card-badge.writing { background: rgba(159,122,234,.9); color: #fff; }
.skill-card-body { padding: 24px; }
.skill-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; }
.skill-icon.blue { background: rgba(242,101,34,.1); color: var(--primary); }
.skill-icon.orange { background: rgba(242,101,34,.12); color: var(--primary); }
.skill-icon.green { background: rgba(15,158,114,.1); color: var(--success); }
.skill-card-body h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text); font-weight: 700; }
.skill-card-body p { color: var(--text-muted); font-size: .88rem; line-height: 1.6; margin-bottom: 16px; }
.skill-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.skill-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: rgba(242,101,34,.08); color: var(--primary); }

/* ─── How It Works ──────────────────────────────────────────────────────── */
.howto-section { background: linear-gradient(180deg, var(--bg) 0%, #F0E3D5 100%); padding: 80px 32px; }
.howto-inner { display: flex; gap: 64px; align-items: center; max-width: 1100px; margin: 0 auto; }
.howto-img-side { flex: 0 0 420px; }
.howto-content { flex: 1; }
.howto-content h2 { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.howto-steps { display: flex; flex-direction: column; gap: 24px; margin-top: 8px; }
.howto-step { display: flex; align-items: flex-start; gap: 20px; }
.howto-step-num { flex-shrink: 0; width: 44px; height: 44px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .9rem; }
.howto-step-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.howto-step-desc { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }

/* ─── Achievements ──────────────────────────────────────────────────────── */
.achievements-section { padding: 80px 32px; background: var(--primary-dark); }
.achievements-section .container { max-width: 1200px; }
.achievements-header { text-align: center; margin-bottom: 44px; }
.achievements-header h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.achievements-header p { color: rgba(255,255,255,.65); font-size: .95rem; }
.achievements-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.achievements-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); transition: transform .3s; }
.achievements-gallery img:hover { transform: scale(1.04); }

/* ─── CTA Section ───────────────────────────────────────────────────────── */
.cta-section { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 72px 32px; text-align: center; }
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.18); color: rgba(255,255,255,.95); border: 1px solid rgba(255,255,255,.35); padding: 5px 14px; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 20px; }
.cta-section h2 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,.75); font-size: .95rem; line-height: 1.7; }

/* ─── Feature icon (kept for compatibility) ─────────────────────────────── */
.feature-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.feature-icon.blue { background: rgba(242,101,34,.1); color: var(--primary); }
.feature-icon.orange { background: rgba(242,101,34,.12); color: var(--primary); }
.feature-icon.green { background: rgba(15,158,114,.1); color: var(--success); }

/* ─── Features (legacy, kept for other pages) ───────────────────────────── */
.features { padding: 64px 32px; max-width: 1100px; margin: 0 auto; }
.features-title { text-align: center; margin-bottom: 48px; }
.features-title h2 { font-size: 2rem; color: var(--text); margin-bottom: 8px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 32px 24px;
  box-shadow: var(--shadow); border: 2px solid transparent; transition: all .3s; text-align: center;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-card h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text); }
.feature-card p { color: var(--text-muted); font-size: .9rem; }

/* ─── Container ────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 32px; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 1.8rem; color: var(--text); }
.page-header p { color: var(--text-muted); margin-top: 4px; }
.section-divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ─── Forms ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius);
  font-size: .95rem; color: var(--text); background: #fff; transition: border .2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary-light); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: 4px; }

/* ─── Auth Pages ───────────────────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 40px; width: 100%; max-width: 440px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo { width: 56px; height: 56px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; margin: 0 auto 16px; font-weight: 900; }
.auth-title { font-size: 1.5rem; color: var(--text); margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: .9rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider span { color: var(--text-muted); font-size: .85rem; white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-link { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--text-muted); }
.auth-link a { color: var(--primary-light); font-weight: 600; }
.auth-link a:hover { text-decoration: underline; }
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.toggle-password { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; }

/* ─── Dashboard ────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--card); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
}
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-icon.primary { background: rgba(242,101,34,.1); }
.stat-icon.accent { background: rgba(242,101,34,.12); }
.stat-icon.success { background: rgba(15,158,114,.1); }
.stat-icon.info { background: rgba(49,130,206,.1); }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Test Cards ───────────────────────────────────────────────────────── */
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.test-card {
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  overflow: hidden; transition: all .3s; border: 2px solid transparent;
}
.test-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--border); }
.test-card-top { padding: 20px 20px 0; }
.test-card-banner { height: 6px; border-radius: 3px; margin-bottom: 20px; }
.test-card-banner.full { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); }
.test-card-banner.listening { background: linear-gradient(90deg, #3182ce, #63b3ed); }
.test-card-banner.reading { background: linear-gradient(90deg, var(--success), #68d391); }
.test-card-banner.writing { background: linear-gradient(90deg, #9f7aea, #d6bcfa); }
.test-type-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.test-type-badge.full { background: rgba(242,101,34,.1); color: var(--primary); }
.test-type-badge.listening { background: rgba(49,130,206,.1); color: #2b6cb0; }
.test-type-badge.reading { background: rgba(15,158,114,.1); color: #276749; }
.test-type-badge.writing { background: rgba(159,122,234,.1); color: #6b46c1; }
.test-card-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.test-card-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.test-card-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.test-meta-item { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-sec); }
.test-card-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.test-status-done { display: flex; align-items: center; gap: 8px; }
.band-badge { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: .8rem; font-weight: 700; }

/* ─── Badges ───────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-success { background: rgba(15,158,114,.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.1); color: var(--warning); }
.badge-danger { background: rgba(229,62,62,.1); color: var(--danger); }
.badge-info { background: rgba(49,130,206,.1); color: var(--info); }
.badge-primary { background: rgba(242,101,34,.1); color: var(--primary); }
.badge-accent { background: rgba(242,101,34,.12); color: var(--primary); }

/* ─── Alerts ───────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: .9rem; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert-error { background: rgba(229,62,62,.08); border: 1px solid rgba(229,62,62,.2); color: #c53030; }
.alert-success { background: rgba(15,158,114,.08); border: 1px solid rgba(15,158,114,.2); color: #276749; }
.alert-info { background: rgba(49,130,206,.08); border: 1px solid rgba(49,130,206,.2); color: #2b6cb0; }
.alert-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: #c27803; }

/* ─── Tables ───────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg); }
th { padding: 12px 16px; text-align: left; font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; font-size: .9rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }

/* ─── Modal ────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all .2s; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal { background: var(--card); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: scale(.95); transition: transform .2s; }
.modal-overlay.show .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.4rem; color: var(--text-muted); cursor: pointer; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── Loading ──────────────────────────────────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 60px; flex-direction: column; gap: 16px; }
.spinner { width: 40px; height: 40px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.footer { background: var(--primary-dark); color: rgba(255,255,255,.7); text-align: center; padding: 24px; font-size: .85rem; margin-top: auto; }
.footer a { color: var(--accent); }

/* ─── Empty State ──────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: .4; }
.empty-title { font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-desc { color: var(--text-muted); font-size: .9rem; }

/* ─── Notifications ────────────────────────────────────────────────────── */
#notify-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.notify { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 10px; font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); min-width: 280px; max-width: 360px; animation: slideIn .3s ease; }
.notify-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.notify-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.notify-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-split { flex-direction: column; gap: 32px; min-height: auto; text-align: center; }
  .hero-split-right { flex: none; width: 100%; max-width: 400px; }
  .hero-split-left h1 { font-size: 2rem; }
  .hero-stats-row { justify-content: center; }
  .hero-actions { justify-content: center; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-card-featured { transform: none; }
  .howto-inner { flex-direction: column; }
  .howto-img-side { flex: none; width: 100%; }
  .achievements-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .hero { padding: 48px 16px; }
  .skills-section { padding: 48px 16px; }
  .howto-section { padding: 48px 16px; }
  .achievements-section { padding: 48px 16px; }
  .cta-section { padding: 48px 16px; }
  .hero-split-left h1 { font-size: 1.8rem; }
  .container { padding: 16px; }
  .features { padding: 40px 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .tests-grid { grid-template-columns: 1fr; }
  .nav-center-links { display: none; }
  .nav-links { gap: 4px; }
  .nav-link { padding: 6px 10px; font-size: .8rem; }
  .achievements-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Utility ──────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: .85rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent-dark); }
.font-bold { font-weight: 700; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ─── Chân trang chung ──────────────────────────────────────────────────────
   Thông tin tổ chức, nhãn nội dung do AI tạo và miễn trừ nhãn hiệu IELTS.
   Nội dung lấy từ site_settings — xem public/js/site-footer.js. */
.site-footer {
  margin-top: 40px;
  padding: 24px 16px 32px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.7;
}
.site-footer__inner { max-width: 900px; margin: 0 auto; text-align: center; }
.site-footer__org { font-weight: 700; color: #334155; font-size: .95rem; margin-bottom: 4px; }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.site-footer__sep { opacity: .5; }
.site-footer__links { margin-top: 10px; }
.site-footer__links a { color: var(--primary, #1e3a6e); text-decoration: none; font-weight: 600; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__notice {
  margin-top: 12px;
  padding: 8px 12px;
  background: #eef2ff;
  border-radius: 6px;
  color: #4338ca;
  display: inline-block;
}
.site-footer__disclaimer {
  margin-top: 12px;
  font-size: .78rem;
  color: #94a3b8;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Nhãn "giọng đọc do AI tạo" đặt cạnh trình phát audio — chữ rõ, không phải tooltip. */
.ai-notice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  color: #4338ca;
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.4;
}
