/* ============================================
   HSK速通 Web App v2 - Global Styles
   Mobile-First Responsive + Bilingual Layout
   ============================================ */

/* === CSS Variables & Reset === */
:root {
  --primary: #1565C0;
  --primary-light: #1E88E5;
  --primary-dark: #0D47A1;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #212121;
  --text-secondary: #757575;
  --text-light: #BDBDBD;
  --border: #E0E0E0;
  --success: #4CAF50;
  --error: #F44336;
  --warning: #FF9800;
  --gold: #FFC107;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-width: 480px;
  --tab-height: 60px;
  --header-height: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  height: 100%;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
}

/* === App Container === */
#app {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 16px);
  background: var(--bg);
}

/* === Page === */
.page { padding: var(--header-height) 12px 16px; display: block; }
.page.hidden { display: none !important; }

/* === Bilingual: English Subtitle === */
.en-sub {
  display: block;
  font-size: 11px;
  color: #999;
  font-weight: 400;
  line-height: 1.3;
}
/* Inline en-sub inside buttons/headings */
.btn .en-sub, .q-option .en-sub, .tab .en-sub,
.stab .en-sub, .ctab .en-sub, .wtab .en-sub, .trtab .en-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
}
.btn-secondary .en-sub { color: rgba(21,101,192,0.55); }
.btn-sm .en-sub { font-size: 9px; }
.card h3 .en-sub, .card h4 .en-sub { display: inline-block; margin-left: 6px; }
/* Header subtitle */
.hdr-sub { font-size: 10px; color: rgba(255,255,255,0.7); display: block; font-weight: 400; }

/* Feature grid en-sub */
.feature-item .f-name .en-sub { font-size: 9px; color: #bbb; }

/* Toast bilingual */
.toast .en-sub { font-size: 10px; color: rgba(255,255,255,0.65); display: block; }

/* Test types en-sub */
.test-types span .en-sub { font-size: 9px; color: #aaa; display: block; }

/* === Header === */
.header {
  position: fixed; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: var(--max-width);
  height: var(--header-height);
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  z-index: 100;
}
.header h1, .header h2 { font-size: 16px; font-weight: 600; line-height: 1.2; }
.header h1.logo { font-size: 17px; letter-spacing: 0.5px; }
.header select { font-size: 12px; padding: 2px 4px; border-radius: 4px; border: none; }

.back-btn {
  background: none; border: none; color: #fff; font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.back-btn:active { background: rgba(255,255,255,0.2); }

/* === Cards === */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; margin-bottom: 10px; color: var(--primary-dark); }
.card h4 { font-size: 14px; margin-bottom: 8px; color: var(--text-secondary); }

/* === Buttons === */
.btn {
  display: inline-block; padding: 10px 20px; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s;
  text-align: center; line-height: 1.4;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary .en-sub { color: rgba(255,255,255,0.7); }
.btn-secondary { background: var(--bg); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-play { background: var(--primary-light); color: #fff; font-size: 15px; padding: 12px; border-radius: var(--radius); border:none; cursor:pointer; }
.btn-play .en-sub { color: rgba(255,255,255,0.7); display: block; font-size:10px; }
.btn-record { background: var(--error); color: #fff; font-size: 15px; padding: 14px; border-radius: 50px; width: 100%; border:none; cursor:pointer; }
.btn-record .en-sub { color: rgba(255,255,255,0.7); }
.btn-record.recording { background: #C62828; animation: pulse 1s infinite; }
.full-width { display: block; width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(244,67,54,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(244,67,54,0); }
}

/* === Tab Bar === */
.tab-bar {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: var(--max-width);
  height: var(--tab-height);
  background: #fff;
  display: flex; justify-content: space-around; align-items: center;
  box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
  z-index: 100;
  padding-bottom: var(--safe-bottom);
}
.tab-item {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; padding: 6px 8px;
  color: var(--text-light); transition: color 0.2s;
  font-size: 11px; line-height: 1.2;
}
.tab-item .tab-icon { font-size: 20px; margin-bottom: 1px; }
.tab-item .tab-label .en-sub { font-size: 9px; }
.tab-item.active { color: var(--primary); }
.tab-item:active { opacity: 0.7; }

/* === Dashboard === */
.streak-badge {
  background: rgba(255,255,255,0.2); padding: 2px 10px;
  border-radius: 20px; font-size: 13px; line-height: 1.2;
}
.streak-badge .en-sub { font-size: 9px; color: rgba(255,255,255,0.65); }

.dash-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; padding: 20px;
}
.hero-level { display: flex; align-items: center; gap: 14px; }
.level-badge {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,0.25); display: flex;
  align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
}
.hero-info { flex: 1; }
.hero-name { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.hero-xp { font-size: 13px; }
.xp-bar {
  width: 100%; height: 6px; background: rgba(255,255,255,0.3);
  border-radius: 3px; margin: 4px 0; overflow: hidden;
}
.xp-fill { height: 100%; background: #fff; border-radius: 3px; transition: width 0.5s; }
.hero-progress { margin-top: 10px; font-size: 12px; opacity: 0.85; }

.radar-card canvas { display: block; margin: 0 auto; max-width: 100%; }
.radar-labels { display: flex; justify-content: space-around; font-size: 13px; color: var(--text-secondary); }
.radar-labels span { text-align: center; }
.radar-labels .en-sub { font-size: 9px; }

.stats-row { display: flex; justify-content: space-around; text-align: center; }
.stat-item { display: flex; flex-direction: column; }
.stat-val { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }
.stat-label .en-sub { font-size: 9px; }

.diagnosis-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.diagnosis-content .en-sub { font-size: 11px; }

.quick-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.quick-btn { flex: 1; }

/* === Feature Grid (Dashboard) === */
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.feature-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px; cursor: pointer; border-radius: var(--radius-sm);
  transition: all 0.2s; text-align: center;
}
.feature-item:active { background: #EEF2FF; transform: scale(0.95); }
.feature-item .f-icon { font-size: 24px; margin-bottom: 4px; }
.feature-item .f-name { font-size: 11px; color: var(--text-secondary); font-weight: 500; line-height: 1.3; }

/* === Placement === */
.intro-text { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.intro-text .en-sub { font-size: 12px; color: #aaa; }

.test-types {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0;
  font-size: 13px; color: var(--text-secondary);
}
.test-types span {
  background: var(--bg); padding: 4px 10px; border-radius: 20px;
  line-height: 1.3; text-align: center;
}

.quiz-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qz-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.qz-fill { height: 100%; background: var(--primary-light); border-radius: 3px; transition: width 0.3s; }
.q-type { font-size: 12px; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.q-text { font-size: 18px; font-weight: 600; margin-bottom: 16px; line-height: 1.6; }
.q-options { display: flex; flex-direction: column; gap: 8px; }
.q-option {
  padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s; font-size: 15px;
}
.q-option:active { background: #EEF2FF; }
.q-option.selected { border-color: var(--primary); background: #EEF2FF; }
.q-option.correct { border-color: var(--success); background: #E8F5E9; }
.q-option.wrong { border-color: var(--error); background: #FFEBEE; }

.result-card { text-align: center; padding: 32px 20px; }
.result-icon { font-size: 56px; margin-bottom: 12px; }

/* === Listening Display === */
.listening-display {
  text-align: center; padding: 16px;
  background: linear-gradient(135deg, #EEF2FF, #E3F2FD);
  border-radius: var(--radius-sm); margin-bottom: 12px;
}
.playing-word {
  font-size: 36px; font-weight: 700; color: var(--primary-dark);
  line-height: 1.3;
}
.playing-sub {
  font-size: 13px; color: var(--text-secondary); margin-top: 4px;
}

/* === Listening feedback === */
.listen-fb {
  margin-top: 12px; padding: 10px; border-radius: 8px;
  font-size: 14px; text-align: center; line-height: 1.6;
}
.listen-fb .en-sub { font-size: 11px; color: #999; }

/* === Vocab === */
.vocab-progress-bar { width: 100%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.vpb-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 4px; transition: width 0.4s; }
.vocab-progress-text { font-size: 13px; color: var(--text-secondary); text-align: center; }

.game-area { min-height: 280px; }

/* Game: Word ↔ English matching (new design) */
.match-game {
  display: flex; flex-direction: column; gap: 12px;
}
.match-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.match-card {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all 0.2s; min-height: 56px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; word-break: break-word;
  user-select: none;
}
.match-card .en-sub { font-size: 10px; color: #999; font-weight: 400; }
.match-card.selected { border-color: var(--primary); background: #EEF2FF; box-shadow: 0 0 0 2px rgba(21,101,192,0.15); }
.match-card.matched { border-color: var(--success); background: #E8F5E9; opacity: 0.8; pointer-events: none; cursor: default; }
.match-card.flash-red { animation: flashRed 0.8s ease; }
.match-card.cn-card { background: #F5F7FA; }
.match-card.en-card { background: #FAFAFA; }

@keyframes flashRed {
  0%,100% { border-color: var(--border); background: inherit; }
  30% { border-color: var(--error); background: #FFEBEE; }
}

.match-feedback {
  text-align: center; font-weight: 600; padding: 8px;
  border-radius: 8px; min-height: 36px; line-height: 1.5;
}

/* Game: Listen */
.listen-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.listen-option {
  padding: 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  text-align: center; cursor: pointer; transition: all 0.2s;
}
.listen-option:active { border-color: var(--primary); background: #EEF2FF; }
.listen-option.correct { border-color: var(--success); background: #E8F5E9; }
.listen-option.wrong { border-color: var(--error); background: #FFEBEE; }

/* Game: Blocks */
.blocks-area { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; justify-content: center; }
.char-block {
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 6px;
  font-size: 18px; cursor: pointer; transition: all 0.2s;
}
.char-block:active { transform: scale(0.95); }
.char-block.used { opacity: 0.3; pointer-events: none; }
.answer-blocks { min-height: 44px; border-bottom: 2px dashed var(--primary-light); margin: 12px 0; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

/* === Quiz === */
.quiz-modes { display: flex; gap: 10px; }
.mode-card {
  flex: 1; padding: 20px 14px; border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; text-align: center; transition: all 0.2s;
}
.mode-card:active { border-color: var(--primary); background: #EEF2FF; }
.mode-icon { font-size: 32px; margin-bottom: 8px; }
.mode-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.mode-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }

.quiz-header-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px; color: var(--text-secondary);
}
.quiz-timer { font-weight: 600; color: var(--error); font-size: 16px; }

/* === Grammar === */
.grammar-tabs, .speaking-tabs, .community-tabs, .writing-mode-tabs, .trans-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
}
.tab, .stab, .ctab, .wtab, .trtab {
  flex: 1; padding: 8px 6px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer; font-size: 13px; text-align: center;
  transition: all 0.2s; font-weight: 500; line-height: 1.3;
}
.tab.active, .stab.active, .ctab.active, .wtab.active, .trtab.active {
  border-color: var(--primary); background: #EEF2FF; color: var(--primary);
}
.grammar-item {
  padding: 12px; border-bottom: 1px solid var(--border); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.grammar-item:active { background: #f9f9f9; }
.grammar-item .gi-name { font-weight: 500; }
.grammar-item .gi-freq { font-size: 12px; color: var(--text-light); }
.grammar-example { background: var(--bg); padding: 10px; border-radius: 6px; margin: 8px 0; font-size: 14px; }
.grammar-example .en-sub { font-size: 11px; }
.grammar-warning { color: var(--warning); font-size: 13px; }
.measure-pair { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.measure-pair .mp-char { font-size: 28px; font-weight: 700; }
.measure-desc { font-size: 13px; color: var(--text-secondary); }

/* === Essay === */
textarea {
  width: 100%; min-height: 160px; padding: 12px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: 16px; font-family: var(--font);
  resize: vertical; line-height: 1.8;
}
textarea:focus { outline: none; border-color: var(--primary-light); }
.char-count { text-align: right; font-size: 12px; color: var(--text-light); margin: 4px 0 8px; }
.correction-item { margin-bottom: 12px; padding: 10px; background: var(--bg); border-radius: 8px; }
.correction-item .orig { color: var(--error); text-decoration: line-through; }
.correction-item .fixed { color: var(--success); font-weight: 500; }
.correction-item .comment { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.essay-model-essay { margin-top: 16px; padding: 12px; background: #FFFDE7; border-radius: 8px; }

/* === Writing === */
#writing-trace, #writing-free, #writing-dictation { text-align: center; }
.trace-char {
  font-size: 64px; color: #E0E0E0; font-weight: 700; margin-bottom: 8px;
  user-select: none; line-height: 1;
}
canvas { border: 2px solid var(--border); border-radius: var(--radius-sm); touch-action: none; display: block; margin: 0 auto 10px; background: #fff; }
.write-prompt { font-size: 15px; margin: 10px 0; color: var(--text-secondary); }
.write-prompt .en-sub { font-size: 11px; }
.trace-controls, .write-controls { display: flex; gap: 10px; justify-content: center; }

.char-breakdown { font-size: 14px; }

/* === Speaking === */
.speaking-card { text-align: center; }
.speak-prompt { font-size: 18px; font-weight: 600; margin: 16px 0; color: var(--primary-dark); }
.recording-status { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; }
.rec-dot { width: 12px; height: 12px; background: var(--error); border-radius: 50%; animation: pulse 1s infinite; }
.rec-time { font-weight: 600; color: var(--error); }
.speaking-score { text-align: center; }
.score-row { display: flex; justify-content: space-around; margin: 16px 0; }
.score-item { text-align: center; }
.score-star { font-size: 20px; }
.score-label { font-size: 12px; color: var(--text-secondary); }

/* === Translation === */
.trans-source {
  padding: 16px; background: var(--bg); border-radius: var(--radius-sm);
  font-size: 17px; line-height: 1.7; margin-bottom: 12px;
}
.trans-compare-box {
  padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px;
}
.trans-compare-box .en-sub { font-size: 11px; }

/* === Comic === */
.comic-pages {
  position: relative; overflow: hidden; min-height: 360px;
  display: flex; align-items: center; justify-content: center;
}
.comic-page { text-align: center; padding: 16px; }
.comic-bubble {
  background: #fff; padding: 10px 16px; border-radius: 16px;
  border: 1.5px solid var(--primary-light); cursor: pointer;
  display: inline-block; font-size: 15px; margin: 4px 0;
}
.comic-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 12px; }
.comic-bubble-overlay {
  position: fixed; bottom: 20%; left: 50%; transform: translateX(-50%);
  background: #fff; padding: 20px; border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15); z-index: 50; max-width: 320px; width: 90%;
}

/* === Community === */
.qa-input-area { margin-bottom: 12px; }
.qa-item { padding: 14px; border-bottom: 1px solid var(--border); }
.qa-item .qa-question { font-weight: 500; }
.qa-item .qa-answer { font-size: 14px; color: var(--text-secondary); margin-top: 6px; line-height: 1.6; }
.daily-challenge-card { text-align: center; }
.challenge-question { font-size: 18px; font-weight: 600; margin: 12px 0; }
.challenge-options { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.circle-post { padding: 14px; border-bottom: 1px solid var(--border); }
.circle-post .cp-author { font-weight: 600; font-size: 13px; }
.circle-post .cp-content { margin: 6px 0; line-height: 1.6; }
.circle-post .cp-meta { font-size: 12px; color: var(--text-light); }

/* === Achievements === */
.achievements-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ach-item {
  text-align: center; padding: 10px; border-radius: var(--radius-sm);
  background: var(--bg); transition: all 0.2s;
}
.ach-item.unlocked { background: linear-gradient(135deg, #FFFDE7, #FFF8E1); }
.ach-item .ach-icon { font-size: 28px; }
.ach-item .ach-name { font-size: 11px; margin-top: 4px; font-weight: 500; }
.ach-item.locked { opacity: 0.5; }

.share-card-content {
  text-align: center; padding: 20px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius); color: #fff; margin-bottom: 12px;
}

/* === Leaderboard === */
.lb-top3 { display: flex; justify-content: center; align-items: flex-end; gap: 12px; padding: 16px 0; }
.lb-medal { text-align: center; }
.lb-medal .medal-avatar { font-size: 40px; }
.lb-medal .medal-name { font-size: 13px; font-weight: 600; }
.lb-medal .medal-score { font-size: 12px; color: var(--text-secondary); }
.lb-medal.gold .medal-avatar { font-size: 50px; }
.lb-row {
  display: flex; align-items: center; padding: 10px; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.lb-row .lb-rank { width: 30px; font-weight: 700; text-align: center; }
.lb-row .lb-rank.top3 { color: var(--gold); }
.lb-row .lb-name { flex: 1; font-weight: 500; }
.lb-row .lb-xp { color: var(--primary); font-weight: 600; }

/* === Admin === */
.admin-auth { text-align: center; padding-top: 40px; }
.admin-auth input {
  width: 100%; padding: 12px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; margin-bottom: 12px;
}
.admin-stat-card {
  background: var(--bg); padding: 12px; border-radius: 8px; margin-bottom: 8px;
  display: flex; justify-content: space-between;
}

/* === Profile === */
.profile-info { text-align: center; padding: 16px 0; }
.avatar { font-size: 60px; }
.profile-name { font-size: 20px; font-weight: 600; margin: 8px 0; }
.profile-level { font-size: 14px; color: var(--primary); }
.profile-stats { display: flex; justify-content: space-around; padding: 12px 0; }

/* === Toast === */
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.85); color: #fff; padding: 10px 24px;
  border-radius: 24px; font-size: 14px; z-index: 200;
  transition: opacity 0.3s; pointer-events: none;
  text-align: center; min-width: 160px;
}
.toast.hidden { opacity: 0; visibility: hidden; }
.toast:not(.hidden) { opacity: 1; visibility: visible; }

/* === Loading Overlay === */
.loading-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.9); display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  z-index: 300;
}
.loading-overlay.hidden { display: none; }
.loading-spinner {
  width: 40px; height: 40px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-overlay p { margin-top: 12px; color: var(--text-secondary); }
#loading-text-en { font-size: 11px; color: #aaa; display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* === Hint and small text === */
.hint { font-size: 12px; color: var(--text-light); text-align: center; }
.loading-text { text-align: center; color: var(--text-secondary); padding: 32px 0; }
.loading-text .en-sub { font-size: 11px; color: #bbb; }
.lang-select { font-size: 12px; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: #fff; }

/* === Responsive === */
@media (min-width: 480px) {
  #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

@media (max-width: 360px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .match-card { padding: 10px 6px; font-size: 13px; }
  .playing-word { font-size: 28px; }
}
