/* ===== NihongoMaster CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Playfair+Display:wght@400;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ---- THEMES ---- */
[data-theme="sakura"] {
  --bg: #fdf2f8;
  --bg2: #fce7f3;
  --surface: #ffffff;
  --accent: #ec4899;
  --accent2: #f472b6;
  --accent-light: #fce7f3;
  --text: #1f2937;
  --text2: #6b7280;
  --border: #fbcfe8;
  --sidebar-bg: linear-gradient(160deg, #831843 0%, #9d174d 50%, #be185d 100%);
  --sidebar-text: rgba(255,255,255,0.9);
  --sidebar-active: rgba(255,255,255,0.2);
  --hero-bg: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  --card-shadow: 0 4px 24px rgba(236,72,153,0.08);
  --tag-bg: #fce7f3;
  --tag-text: #be185d;
}

[data-theme="midnight"] {
  --bg: #0f172a;
  --bg2: #1e293b;
  --surface: #1e293b;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent-light: #1e1b4b;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --border: #334155;
  --sidebar-bg: linear-gradient(160deg, #020617 0%, #0f172a 100%);
  --sidebar-text: rgba(255,255,255,0.85);
  --sidebar-active: rgba(99,102,241,0.3);
  --hero-bg: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  --card-shadow: 0 4px 24px rgba(0,0,0,0.3);
  --tag-bg: #1e1b4b;
  --tag-text: #a5b4fc;
}

[data-theme="matcha"] {
  --bg: #f0fdf4;
  --bg2: #dcfce7;
  --surface: #ffffff;
  --accent: #16a34a;
  --accent2: #22c55e;
  --accent-light: #dcfce7;
  --text: #14532d;
  --text2: #4b7a5f;
  --border: #bbf7d0;
  --sidebar-bg: linear-gradient(160deg, #14532d 0%, #166534 100%);
  --sidebar-text: rgba(255,255,255,0.9);
  --sidebar-active: rgba(255,255,255,0.2);
  --hero-bg: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  --card-shadow: 0 4px 24px rgba(22,163,74,0.08);
  --tag-bg: #dcfce7;
  --tag-text: #15803d;
}

[data-theme="ocean"] {
  --bg: #eff6ff;
  --bg2: #dbeafe;
  --surface: #ffffff;
  --accent: #2563eb;
  --accent2: #3b82f6;
  --accent-light: #dbeafe;
  --text: #1e3a5f;
  --text2: #4b6a8a;
  --border: #bfdbfe;
  --sidebar-bg: linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 100%);
  --sidebar-text: rgba(255,255,255,0.9);
  --sidebar-active: rgba(255,255,255,0.2);
  --hero-bg: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  --card-shadow: 0 4px 24px rgba(37,99,235,0.08);
  --tag-bg: #dbeafe;
  --tag-text: #1d4ed8;
}

[data-theme="autumn"] {
  --bg: #fff7ed;
  --bg2: #ffedd5;
  --surface: #ffffff;
  --accent: #ea580c;
  --accent2: #f97316;
  --accent-light: #ffedd5;
  --text: #431407;
  --text2: #7c4a1e;
  --border: #fed7aa;
  --sidebar-bg: linear-gradient(160deg, #431407 0%, #7c2d12 100%);
  --sidebar-text: rgba(255,255,255,0.9);
  --sidebar-active: rgba(255,255,255,0.2);
  --hero-bg: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
  --card-shadow: 0 4px 24px rgba(234,88,12,0.08);
  --tag-bg: #ffedd5;
  --tag-text: #c2410c;
}

[data-theme="snow"] {
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --surface: #ffffff;
  --accent: #0ea5e9;
  --accent2: #38bdf8;
  --accent-light: #e0f2fe;
  --text: #0c1a2e;
  --text2: #475569;
  --border: #e2e8f0;
  --sidebar-bg: linear-gradient(160deg, #0c4a6e 0%, #0369a1 100%);
  --sidebar-text: rgba(255,255,255,0.9);
  --sidebar-active: rgba(255,255,255,0.2);
  --hero-bg: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --card-shadow: 0 4px 24px rgba(14,165,233,0.08);
  --tag-bg: #e0f2fe;
  --tag-text: #0369a1;
}

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

body {
  font-family: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  font-size: 15px;
  transition: background 0.3s, color 0.3s;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
}

.brand-name { font-size: 16px; font-weight: 700; }
.brand-sub { font-size: 10px; opacity: 0.7; }

.sidebar-section { padding: 16px 12px 4px; }
.section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  opacity: 0.5; padding: 0 8px 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  opacity: 0.8;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,0.1); opacity: 1; }
.nav-item.active { background: var(--sidebar-active); opacity: 1; font-weight: 600; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; font-family: 'Noto Sans JP', sans-serif; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.user-profile { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  font-family: 'Noto Sans JP', sans-serif;
}
.user-name { font-size: 13px; font-weight: 600; }
.user-level { font-size: 11px; opacity: 0.65; }

/* ---- MAIN ---- */
.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  transition: margin-left 0.3s;
}

/* ---- TOPBAR ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.menu-btn {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text2);
  display: none;
}

.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  flex: 1; max-width: 420px;
}

.search-icon { color: var(--text2); font-size: 16px; }
.search-input {
  border: none; background: none;
  font-family: inherit; font-size: 14px; color: var(--text);
  flex: 1; outline: none;
}

.streak-badge {
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px; font-weight: 600;
}

.notif-btn {
  background: none; border: 1.5px solid var(--border);
  border-radius: 8px; padding: 7px 12px;
  cursor: pointer; position: relative; font-size: 16px;
}

.notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
}

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--accent);
  color: white; border: none;
  padding: 9px 20px; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-outline {
  background: none;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 8px 18px; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background: var(--accent-light); }

.btn-danger { background:#ef4444;color:white;border:none;padding:9px 20px;border-radius:8px;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer; }
.btn-warning { background:#f59e0b;color:white;border:none;padding:9px 20px;border-radius:8px;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer; }
.btn-success { background:#22c55e;color:white;border:none;padding:9px 20px;border-radius:8px;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer; }

/* ---- NOTIFICATIONS ---- */
.notif-panel {
  display: none; position: fixed; top: 64px; right: 16px;
  width: 320px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 14px;
  box-shadow: var(--card-shadow); z-index: 200;
}
.notif-panel.open { display: block; }
.notif-header { padding: 14px 18px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--border); }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.notif-item.unread { background: var(--accent-light); }
.notif-icon { font-size: 20px; }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-time { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* ---- SEARCH RESULTS ---- */
.search-results {
  display: none; position: fixed; top: 64px; left: 280px;
  max-width: 500px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 14px;
  box-shadow: var(--card-shadow); z-index: 200;
  max-height: 400px; overflow-y: auto;
}
.search-results.open { display: block; }
.search-result-item {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.search-result-item:hover { background: var(--bg); }
.sr-title { font-size: 14px; font-weight: 600; }
.sr-sub { font-size: 12px; color: var(--text2); }

/* ---- PAGES ---- */
.page { display: none; padding: 28px; }
.page.active { display: block; }

.page-header { margin-bottom: 24px; }
.page-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.page-header p { color: var(--text2); font-size: 14px; }

/* ---- HERO ---- */
.page-hero {
  background: var(--hero-bg);
  border-radius: 20px; padding: 36px;
  color: white; margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-greeting { font-size: 14px; opacity: 0.85; margin-bottom: 6px; font-family: 'Noto Sans JP', sans-serif; }
.hero-title { font-family: 'Playfair Display', serif; font-size: 30px; margin-bottom: 10px; }
.hero-sub { font-size: 14px; opacity: 0.9; }

.stat-ring { position: relative; width: 90px; height: 90px; flex-shrink: 0; }
.stat-ring svg { width: 100%; height: 100%; }
.ring-label {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  text-align: center; font-size: 16px; font-weight: 700; line-height: 1.2;
}
.ring-label span { font-size: 11px; opacity: 0.8; }

/* ---- STATS ROW ---- */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px; padding: 18px;
  text-align: center;
  box-shadow: var(--card-shadow);
}
.stat-num { font-size: 26px; font-weight: 700; color: var(--accent); }
.stat-lbl { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ---- CONTENT GRID ---- */
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.content-main { display: flex; flex-direction: column; gap: 4px; }
.content-side { display: flex; flex-direction: column; gap: 14px; }

.section-title { font-size: 17px; font-weight: 700; margin-bottom: 14px; color: var(--text); }

/* ---- COURSE CARDS ---- */
.course-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.course-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px; padding: 20px;
  cursor: pointer; transition: all 0.2s;
  box-shadow: var(--card-shadow);
}
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
.course-card.featured { border-color: var(--accent); background: var(--accent-light); }

.course-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--accent); margin-bottom: 10px;
}
.course-kana {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 24px; margin-bottom: 8px;
}
.course-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.course-desc { font-size: 12px; color: var(--text2); margin-bottom: 12px; }

.progress-bar {
  height: 5px; background: var(--bg2); border-radius: 10px; overflow: hidden;
}
.progress-fill { height: 100%; background: var(--accent); border-radius: 10px; }

/* ---- DAILY TASKS ---- */
.daily-tasks { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
}
.task-item.done { opacity: 0.6; }
.task-check { font-size: 16px; color: var(--accent); font-weight: 700; width: 20px; }
.task-xp { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }

/* ---- WIDGET CARDS ---- */
.widget-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px; padding: 18px;
  box-shadow: var(--card-shadow);
}
.widget-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text2); margin-bottom: 14px; }

/* WORD OF DAY */
.wod-kana { font-family: 'Noto Sans JP', sans-serif; font-size: 32px; color: var(--accent); }
.wod-romaji { font-size: 14px; color: var(--text2); margin: 4px 0; }
.wod-meaning { font-size: 16px; font-weight: 600; margin-bottom: 12px; }

/* JLPT WIDGET */
.jlpt-item { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; }
.jlpt-label { font-size: 12px; font-weight: 700; width: 24px; color: var(--accent); }
.jlpt-bar { flex: 1; height: 6px; background: var(--bg2); border-radius: 10px; overflow: hidden; }
.jlpt-bar div { height: 100%; background: var(--accent); border-radius: 10px; }
.jlpt-pct { font-size: 12px; color: var(--text2); width: 30px; text-align: right; }

/* ACTIVITY CHART */
.activity-chart { display: flex; align-items: flex-end; gap: 6px; height: 60px; }
.act-bar {
  flex: 1; background: var(--accent-light); border-radius: 4px 4px 0 0;
  position: relative; cursor: pointer;
}
.act-bar.active { background: var(--accent); }
.act-bar.empty { background: var(--bg2); height: 4px !important; }
.act-bar span {
  position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%);
  font-size: 9px; color: var(--text2); white-space: nowrap;
}

/* ---- TABS ---- */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg2); border-radius: 10px; padding: 4px; width: fit-content; }
.tab {
  padding: 7px 16px; border-radius: 7px; border: none;
  background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text2); transition: all 0.2s;
}
.tab.active { background: var(--surface); color: var(--accent); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- KANA GRID ---- */
.kana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}

.kana-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px 8px; text-align: center;
  cursor: pointer; transition: all 0.2s;
}
.kana-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.kana-card.learned { border-color: var(--accent); background: var(--accent-light); }
.kana-char { font-family: 'Noto Sans JP', sans-serif; font-size: 26px; color: var(--accent); }
.kana-romaji { font-size: 11px; color: var(--text2); margin-top: 4px; }

/* ---- VOCAB LIST ---- */
.vocab-list { display: flex; flex-direction: column; gap: 8px; }
.vocab-item {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: center; gap: 16px;
}
.vocab-jp { font-family: 'Noto Sans JP', sans-serif; font-size: 20px; color: var(--accent); min-width: 80px; }
.vocab-romaji { font-size: 12px; color: var(--text2); min-width: 80px; }
.vocab-id { font-size: 15px; font-weight: 500; flex: 1; }
.vocab-cat { font-size: 11px; background: var(--tag-bg); color: var(--tag-text); padding: 3px 8px; border-radius: 6px; }

/* ---- JLPT PAGE ---- */
.jlpt-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.jlpt-card {
  border-radius: 16px; padding: 20px; text-align: center;
  cursor: pointer; transition: all 0.2s; position: relative;
  overflow: hidden;
}
.jlpt-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.n5 { background: linear-gradient(135deg,#dcfce7,#bbf7d0); border: 2px solid #86efac; }
.n4 { background: linear-gradient(135deg,#dbeafe,#bfdbfe); border: 2px solid #93c5fd; }
.n3 { background: linear-gradient(135deg,#fef3c7,#fde68a); border: 2px solid #fcd34d; }
.n2 { background: linear-gradient(135deg,#ffedd5,#fed7aa); border: 2px solid #fdba74; }
.n1 { background: linear-gradient(135deg,#fce7f3,#fbcfe8); border: 2px solid #f9a8d4; }
.jlpt-badge { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.jlpt-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.jlpt-desc { font-size: 11px; color: var(--text2); margin-bottom: 10px; }
.jlpt-progress-bar { height: 5px; background: rgba(0,0,0,0.1); border-radius: 10px; overflow: hidden; margin-bottom: 4px; }
.jlpt-progress-bar div { height: 100%; background: var(--accent); border-radius: 10px; }
.jlpt-detail { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 24px; }

/* ---- QUIZ ---- */
.quiz-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quiz-type-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; padding: 28px 20px; text-align: center;
  cursor: pointer; transition: all 0.2s;
}
.quiz-type-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.quiz-icon { font-family: 'Noto Sans JP', sans-serif; font-size: 40px; margin-bottom: 12px; color: var(--accent); }
.quiz-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.quiz-info { font-size: 12px; color: var(--text2); }

.quiz-question-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 40px; text-align: center; margin-bottom: 24px;
  max-width: 600px; margin-left: auto; margin-right: auto;
}
.quiz-q-text { font-family: 'Noto Sans JP', sans-serif; font-size: 64px; color: var(--accent); margin-bottom: 8px; }
.quiz-q-sub { font-size: 14px; color: var(--text2); }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 600px; margin: 0 auto; }
.quiz-option {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 16px; text-align: center;
  cursor: pointer; font-size: 16px; font-weight: 500;
  transition: all 0.2s; font-family: inherit;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-light); }
.quiz-option.correct { border-color: #22c55e; background: #dcfce7; }
.quiz-option.wrong { border-color: #ef4444; background: #fee2e2; }

.quiz-score { text-align: center; padding: 40px; }
.quiz-score-num { font-size: 64px; font-weight: 800; color: var(--accent); }
.quiz-score-label { font-size: 16px; color: var(--text2); margin: 8px 0 24px; }

/* ---- FLASHCARD ---- */
.flashcard-actions { display: flex; gap: 12px; margin-bottom: 20px; }
.flashcard-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.fc-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 20px; text-align: center;
  position: relative;
}
.fc-front { font-family: 'Noto Sans JP', sans-serif; font-size: 28px; color: var(--accent); margin-bottom: 6px; }
.fc-romaji { font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.fc-back { font-size: 14px; font-weight: 500; }
.fc-delete { position: absolute; top: 8px; right: 8px; background: none; border: none; cursor: pointer; color: var(--text2); font-size: 14px; }

.review-mode { max-width: 500px; margin: 0 auto; text-align: center; }
.review-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 20px; padding: 60px 40px;
  cursor: pointer; margin-bottom: 20px; min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s;
}
.review-front { font-family: 'Noto Sans JP', sans-serif; font-size: 64px; color: var(--accent); }
.review-back { font-size: 24px; font-weight: 600; }
.review-controls { display: flex; gap: 12px; justify-content: center; }

/* ---- MODAL ---- */
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: var(--surface); border-radius: 16px;
  padding: 28px; width: 400px; max-width: 90vw;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.modal-input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); margin-bottom: 12px; outline: none;
}
.modal-input:focus { border-color: var(--accent); }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; }

/* ---- KONVERSI ---- */
.konversi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.konversi-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.konversi-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.konversi-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-family: 'Noto Sans JP', inherit; font-size: 14px;
  background: var(--bg); color: var(--text); outline: none; resize: vertical;
  min-height: 80px; margin-bottom: 12px;
}
.konversi-output {
  background: var(--bg); border-radius: 8px; padding: 14px;
  font-family: 'Noto Sans JP', sans-serif; font-size: 18px;
  color: var(--accent); min-height: 60px;
}
.angka-result { display: flex; flex-direction: column; gap: 10px; }
.angka-row { display: flex; justify-content: space-between; align-items: center; padding: 8px; background: var(--bg); border-radius: 8px; }
.angka-row span:first-child { font-size: 12px; color: var(--text2); }
.angka-row span:last-child { font-family: 'Noto Sans JP', sans-serif; font-size: 18px; color: var(--accent); font-weight: 600; }

/* ---- KANJI ---- */
.kanji-filter { display: flex; gap: 8px; margin-bottom: 16px; }
.tag {
  padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer;
  font-family: inherit; font-size: 13px; color: var(--text2);
  transition: all 0.2s;
}
.tag.active { background: var(--accent); color: white; border-color: var(--accent); }
.tag:hover { border-color: var(--accent); color: var(--accent); }

.kanji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.kanji-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 16px; text-align: center; cursor: pointer;
  transition: all 0.2s;
}
.kanji-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.kanji-char { font-family: 'Noto Sans JP', sans-serif; font-size: 40px; color: var(--accent); }
.kanji-on { font-size: 11px; color: var(--text2); margin-top: 4px; }
.kanji-kun { font-size: 11px; color: var(--text2); }
.kanji-meaning { font-size: 12px; font-weight: 600; margin-top: 6px; }
.kanji-level { font-size: 10px; background: var(--tag-bg); color: var(--tag-text); padding: 2px 6px; border-radius: 4px; margin-top: 4px; display: inline-block; }

/* ---- BUNPOU ---- */
.bunpou-list { display: flex; flex-direction: column; gap: 14px; }
.bunpou-item {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 20px;
}
.bunpou-pattern { font-family: 'Noto Sans JP', sans-serif; font-size: 18px; color: var(--accent); margin-bottom: 6px; }
.bunpou-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.bunpou-desc { font-size: 13px; color: var(--text2); margin-bottom: 10px; }
.bunpou-example { background: var(--bg); border-radius: 8px; padding: 10px 14px; }
.bunpou-ex-jp { font-family: 'Noto Sans JP', sans-serif; font-size: 15px; color: var(--accent); }
.bunpou-ex-id { font-size: 13px; color: var(--text2); margin-top: 2px; }

/* ---- VOCAB CATEGORIES ---- */
.vocab-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.vocab-cat-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 20px; cursor: pointer; transition: all 0.2s;
}
.vocab-cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.vocab-cat-icon { font-size: 32px; margin-bottom: 10px; }
.vocab-cat-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.vocab-cat-count { font-size: 12px; color: var(--text2); }

/* ---- SSW ---- */
.ssw-banner {
  background: var(--hero-bg); border-radius: 16px; padding: 24px 28px;
  color: white; margin-bottom: 24px;
}
.ssw-banner h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; font-family: 'Playfair Display', serif; }
.ssw-banner p { font-size: 13px; opacity: 0.9; }
.ssw-sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ssw-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 16px; cursor: pointer; transition: all 0.2s;
}
.ssw-card:hover { border-color: var(--accent); }
.ssw-icon { font-size: 24px; margin-bottom: 8px; }
.ssw-name { font-size: 13px; font-weight: 700; }
.ssw-jp { font-family: 'Noto Sans JP', sans-serif; font-size: 12px; color: var(--text2); margin-top: 2px; }

/* ---- FORUM ---- */
.forum-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.forum-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.forum-posts { display: flex; flex-direction: column; gap: 12px; }
.forum-post {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; padding: 18px; cursor: pointer; transition: all 0.2s;
}
.forum-post:hover { border-color: var(--accent); }
.forum-post-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.forum-post-meta { font-size: 12px; color: var(--text2); display: flex; gap: 12px; }
.forum-post-tag { font-size: 11px; background: var(--tag-bg); color: var(--tag-text); padding: 2px 8px; border-radius: 6px; }
.forum-post-preview { font-size: 13px; color: var(--text2); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- BLOG ---- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.blog-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 16px; overflow: hidden; cursor: pointer; transition: all 0.2s;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--card-shadow); }
.blog-thumb { height: 120px; background: var(--hero-bg); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.blog-content { padding: 16px; }
.blog-cat { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.blog-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.blog-excerpt { font-size: 12px; color: var(--text2); line-height: 1.6; }
.blog-date { font-size: 11px; color: var(--text2); margin-top: 10px; }

/* ---- DOWNLOAD ---- */
.download-list { display: flex; flex-direction: column; gap: 10px; }
.download-item {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
}
.dl-icon { font-size: 24px; }
.dl-info { flex: 1; }
.dl-name { font-size: 14px; font-weight: 600; }
.dl-size { font-size: 12px; color: var(--text2); }
.dl-btn {
  padding: 7px 16px; border-radius: 8px;
  background: var(--accent-light); color: var(--accent);
  border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: inherit;
}
.dl-progress { height: 4px; background: var(--bg2); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.dl-progress div { height: 100%; background: var(--accent); border-radius: 10px; transition: width 0.5s; }

/* ---- PENGINGAT ---- */
.pengingat-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 16px; padding: 28px; max-width: 500px; }
.pengingat-section { margin-bottom: 24px; }
.pengingat-label { font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 10px; }
.time-input {
  padding: 10px 16px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 22px; font-family: inherit;
  background: var(--bg); color: var(--text); outline: none;
}
.days-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.day-btn {
  padding: 8px 12px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--bg); cursor: pointer; font-family: inherit; font-size: 13px;
  color: var(--text2); transition: all 0.2s;
}
.day-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.target-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.target-btn {
  padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--bg); cursor: pointer; font-family: inherit; font-size: 13px;
  color: var(--text2); transition: all 0.2s;
}
.target-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.reminder-status { margin-top: 14px; font-size: 13px; color: #22c55e; }

/* ---- ANALISA ---- */
.analisa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analisa-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 20px; }
.analisa-card.wide { grid-column: 1 / -1; }
.analisa-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; }

.big-chart { overflow-x: auto; }
.chart-bar-group { display: flex; align-items: flex-end; gap: 16px; height: 140px; padding-bottom: 24px; }
.chart-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 50px; }
.chart-bar {
  width: 100%; background: var(--accent-light); border-radius: 6px 6px 0 0;
  position: relative; transition: height 0.5s; min-height: 4px;
}
.chart-bar.highlight { background: var(--accent); }
.chart-bar.dim { background: var(--bg2); }
.bar-val { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--text2); white-space: nowrap; }
.chart-label { font-size: 12px; color: var(--text2); margin-top: 4px; }

.strength-list { display: flex; flex-direction: column; gap: 12px; }
.strength-item { display: flex; align-items: center; gap: 10px; }
.strength-name { font-size: 13px; width: 90px; flex-shrink: 0; }
.strength-bar { flex: 1; height: 8px; background: var(--bg2); border-radius: 10px; overflow: hidden; }
.strength-bar div { height: 100%; border-radius: 10px; }
.strength-pct { font-size: 12px; color: var(--text2); width: 36px; text-align: right; }

.recommendation-list { display: flex; flex-direction: column; gap: 12px; }
.rec-item { display: flex; align-items: flex-start; gap: 12px; }
.rec-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; font-family: 'Noto Sans JP', sans-serif; }
.rec-title { font-size: 13px; font-weight: 600; }
.rec-desc { font-size: 12px; color: var(--text2); }

/* ---- TEMA ---- */
.tema-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.tema-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: 14px; padding: 12px; cursor: pointer; transition: all 0.2s; text-align: center;
}
.tema-card.active { border-color: var(--accent); }
.tema-card:hover { border-color: var(--accent); }
.tema-preview { height: 80px; border-radius: 8px; margin-bottom: 8px; }
.sakura-preview { background: linear-gradient(135deg, #831843, #ec4899); }
.midnight-preview { background: linear-gradient(135deg, #020617, #6366f1); }
.matcha-preview { background: linear-gradient(135deg, #14532d, #22c55e); }
.ocean-preview { background: linear-gradient(135deg, #1e3a8a, #0284c7); }
.autumn-preview { background: linear-gradient(135deg, #431407, #f97316); }
.snow-preview { background: linear-gradient(135deg, #0c4a6e, #38bdf8); }
.tema-name { font-size: 13px; font-weight: 600; }
.font-size-control { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 20px; max-width: 400px; }

/* ---- TOAST ---- */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--text); color: var(--bg);
  padding: 12px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  transform: translateY(100px); opacity: 0;
  transition: all 0.3s; z-index: 1000;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .jlpt-cards { grid-template-columns: repeat(3, 1fr); }
  .konversi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-btn { display: block; }
  .course-cards { grid-template-columns: 1fr; }
  .quiz-selector { grid-template-columns: repeat(2, 1fr); }
  .quiz-options { grid-template-columns: 1fr; }
  .jlpt-cards { grid-template-columns: repeat(2, 1fr); }
  .analisa-grid { grid-template-columns: 1fr; }
  .page { padding: 16px; }
  .analisa-card.wide { grid-column: 1; }
  .topbar { padding: 12px 16px; }
  .page-hero { flex-direction: column; gap: 16px; }
}

/* =============================================
   AUTH OVERLAY
   ============================================= */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #831843 0%, #be185d 50%, #f43f5e 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  max-height: 92vh;
  overflow-y: auto;
}

.auth-screen {
  display: none;
  padding: 32px 28px 28px;
  animation: fadeSlideIn 0.35s ease;
}
.auth-screen.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Welcome Screen */
.welcome-logo {
  text-align: center;
  margin-bottom: 28px;
}
.welcome-logo-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, #be185d, #f43f5e);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; color: white; font-weight: 700;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(190,24,93,0.35);
}
.welcome-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--text, #1f2937);
}
.welcome-logo-sub { font-size: 13px; color: var(--text2, #6b7280); margin-top: 4px; }

.welcome-features { margin-bottom: 28px; }
.wf-title {
  font-size: 14px; font-weight: 600;
  color: var(--accent, #ec4899);
  margin-bottom: 14px;
  text-align: center;
}
.wf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wf-item {
  background: var(--bg, #fdf2f8);
  border: 1px solid var(--border, #fbcfe8);
  border-radius: 12px;
  padding: 12px;
  cursor: default;
  transition: transform 0.2s;
}
.wf-item:hover { transform: translateY(-2px); }
.wf-icon {
  font-size: 22px; margin-bottom: 6px;
  font-family: 'Noto Sans JP', sans-serif;
}
.wf-label { font-size: 12px; font-weight: 600; color: var(--text, #1f2937); }
.wf-desc { font-size: 11px; color: var(--text2, #6b7280); margin-top: 2px; line-height: 1.4; }

.welcome-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-full { width: 100%; padding: 14px !important; font-size: 15px !important; border-radius: 12px !important; }
.btn-ghost {
  background: transparent;
  border: 1.5px dashed var(--border, #fbcfe8);
  color: var(--text2, #6b7280);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  transition: all 0.2s;
}
.btn-ghost:hover { background: var(--bg, #fdf2f8); color: var(--text, #1f2937); }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text2, #6b7280); font-size: 12px;
}
.auth-divider::before,.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border, #fbcfe8);
}

/* Login / Register */
.auth-back {
  background: none; border: none; color: var(--text2, #6b7280);
  font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 20px;
  display: block; font-family: 'Space Grotesk', sans-serif;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--accent, #ec4899); }

.auth-logo-mini {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 6px;
}
.auth-title-text {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 700;
  color: var(--text, #1f2937);
}
.auth-subtitle { font-size: 13px; color: var(--text2, #6b7280); margin-bottom: 24px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--text, #1f2937); }
.form-input {
  padding: 12px 14px;
  border: 1.5px solid var(--border, #fbcfe8);
  border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: var(--text, #1f2937);
  background: var(--bg, #fdf2f8);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--accent, #ec4899);
  box-shadow: 0 0 0 3px rgba(236,72,153,0.1);
}
.auth-error {
  background: #fee2e2; color: #dc2626;
  padding: 10px 12px; border-radius: 8px;
  font-size: 13px; border: 1px solid #fca5a5;
}
.auth-switch { text-align: center; font-size: 13px; color: var(--text2, #6b7280); }
.auth-switch a {
  color: var(--accent, #ec4899); font-weight: 600; cursor: pointer; text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* Sidebar logout btn */
.btn-logout {
  width: 100%; margin-top: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  padding: 8px 12px; border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.2); color: white; }

/* =============================================
   DISCORD BANNER (Forum)
   ============================================= */
.discord-banner {
  background: linear-gradient(135deg, #5865F2 0%, #404EED 100%);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(88,101,242,0.35);
}
.discord-banner-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.discord-logo {
  width: 56px; height: 56px; flex-shrink: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.discord-info { color: white; }
.discord-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.discord-desc { font-size: 13px; opacity: 0.85; margin-bottom: 8px; line-height: 1.5; }
.discord-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; opacity: 0.8; }
.discord-join-btn {
  background: white;
  color: #5865F2;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}
.discord-join-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

.forum-post-discord { cursor: pointer; transition: transform 0.2s; }
.forum-post-discord:hover { transform: translateX(4px); border-left: 3px solid #5865F2; }

.discord-badge {
  background: #5865F2; color: white;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
}
.discord-link-hint {
  color: #5865F2; font-size: 11px; font-weight: 600;
}

/* =============================================
   BLOG — read more link
   ============================================= */
.blog-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow, 0 8px 32px rgba(0,0,0,0.1)); }
.blog-read-link {
  color: var(--accent, #ec4899);
  font-size: 12px; font-weight: 600;
  margin-top: 8px; display: block;
}

/* =============================================
   Q&A PAGE
   ============================================= */
.qa-hero {
  background: var(--bg2, #fce7f3);
  border: 1px solid var(--border, #fbcfe8);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.qa-hero-icon { font-size: 42px; flex-shrink: 0; }
.qa-hero-text h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px; margin: 0 0 6px;
  color: var(--text, #1f2937);
}
.qa-hero-text p { font-size: 13px; color: var(--text2, #6b7280); margin: 0; }

.qa-instagram-card {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(220,39,67,0.3);
}
.qa-ig-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.qa-ig-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.qa-ig-info { color: white; }
.qa-ig-handle { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.qa-ig-desc { font-size: 13px; opacity: 0.9; margin-bottom: 8px; line-height: 1.5; }
.qa-ig-meta { display: flex; gap: 12px; font-size: 12px; opacity: 0.8; }
.qa-ig-btn {
  background: white;
  color: #dc2743;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.2s;
  display: inline-block;
}
.qa-ig-btn:hover { transform: translateY(-2px); }

.qa-faq-section { margin-top: 8px; }
.qa-faq-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  color: var(--text, #1f2937);
  margin-bottom: 16px;
}
.qa-faq-list { display: flex; flex-direction: column; gap: 10px; }
.qa-faq-item {
  background: var(--surface, #fff);
  border: 1px solid var(--border, #fbcfe8);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.qa-faq-item:hover { box-shadow: var(--card-shadow); }
.qa-faq-q {
  padding: 16px 18px;
  font-size: 14px; font-weight: 600;
  color: var(--text, #1f2937);
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-arrow { transition: transform 0.3s; font-size: 11px; color: var(--accent); }
.qa-faq-item.open .faq-arrow { transform: rotate(180deg); }
.qa-faq-a {
  padding: 0 18px;
  max-height: 0; overflow: hidden;
  font-size: 13px; color: var(--text2, #6b7280);
  line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.qa-faq-item.open .qa-faq-a {
  max-height: 200px;
  padding: 0 18px 16px;
}

@media (max-width: 640px) {
  .discord-banner, .qa-instagram-card { flex-direction: column; text-align: center; }
  .discord-banner-left, .qa-ig-left { flex-direction: column; }
  .discord-join-btn, .qa-ig-btn { width: 100%; text-align: center; }
  .wf-grid { grid-template-columns: 1fr 1fr; }
  .auth-container { padding: 0; }
  .auth-screen { padding: 24px 20px; }
}
