/* ============================================================
   VEGHETOR — Academia Strajerului — styles.css
   Paleta: bleumarin foarte inchis, alb cald, auriu, albastru
   puternic pentru actiuni, rosu discret (greseli), verde discret
   (corect). Fara aspect copilaresc.
   ============================================================ */

:root{
  --navy-900:#080b16;
  --navy-800:#121a30;
  --navy-700:#1a2340;
  --navy-600:#263152;
  --white-warm:#f7f2e7;
  --gold:#d9b04f;
  --gold-bright:#f0cd7a;
  --gold-soft:#c9a84c;
  --blue-action:#4a7ce0;
  --blue-action-bright:#6b96ec;
  --red-warn:#c25947;
  --green-ok:#5a9968;
  --text-dim:#c3c9dd;
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 14px 34px -14px rgba(0,0,0,.55);
}

*{box-sizing:border-box;}
html,body{margin:0; padding:0; height:100%;}
body{
  font-family:'Manrope', 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(217,176,79,0.13), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 100%, rgba(74,124,224,0.08), transparent 60%),
    var(--navy-900);
  background-attachment:fixed;
  color:var(--white-warm);
  -webkit-font-smoothing:antialiased;
  min-height:100%;
}
h1,h2,h3,h4{ font-family:'Fraunces','Georgia',serif; margin:0; }
p{ margin:0; }
button{ font-family:inherit; }
a{ color:var(--gold-bright); }

.app-shell{ display:flex; flex-direction:column; min-height:100vh; }

/* ---------------- HEADER ---------------- */
.app-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; background:var(--navy-800); border-bottom:1px solid var(--navy-600);
  position:sticky; top:0; z-index:20;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand svg{ width:30px; height:30px; }
.brand .name{ font-family:'Fraunces',serif; font-weight:700; font-size:17px; letter-spacing:.02em; }
.brand .name small{ display:block; font-family:'Manrope',sans-serif; font-size:10px; color:var(--text-dim); font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.header-actions{ display:flex; gap:8px; align-items:center; }
.icon-btn{
  background:var(--navy-700); border:1px solid var(--navy-600); color:var(--white-warm);
  width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:16px;
}
.icon-btn:hover{ border-color:var(--gold); }
#installBtn{ display:flex; }
#installBtn.installed{ display:none; }
#installBtn.ready{ border-color:var(--gold); color:var(--gold-bright); }

/* ---------------- MAIN ---------------- */
main{ flex:1; padding:20px 16px 110px; max-width:920px; margin:0 auto; width:100%; }

/* ---------------- BOTTOM NAV (mobile) ---------------- */
.bottom-nav{
  position:fixed; bottom:0; left:0; right:0; z-index:20;
  display:flex; background:var(--navy-800); border-top:1px solid var(--navy-600);
  padding:5px 4px calc(5px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 20px -8px rgba(0,0,0,.5);
}
.bottom-nav button{
  flex:1; background:none; border:none; color:var(--text-dim); font-size:10px;
  display:flex; flex-direction:column; align-items:center; gap:2px; padding:5px 2px; cursor:pointer;
  border-radius:8px; line-height:1.1;
}
.bottom-nav button .ic{ font-size:16px; }
.bottom-nav button.active{ color:var(--gold-bright); background:rgba(201,168,76,0.08); }

@media (min-width:820px){
  .bottom-nav{ display:none; }
  main{ padding-bottom:40px; }
}

/* ---------------- CARDS / DASHBOARD ---------------- */
.grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(150px,1fr)); gap:12px; margin:16px 0; }
.stat-card{
  background:var(--navy-800); border:1px solid var(--navy-600); border-radius:var(--radius);
  padding:16px; box-shadow:var(--shadow);
}
.stat-card .num{ font-family:'Fraunces',serif; font-size:26px; font-weight:700; color:var(--gold-bright); }
.stat-card .label{ font-size:12px; color:var(--text-dim); margin-top:4px; text-transform:uppercase; letter-spacing:.06em; }

.hero{
  background:linear-gradient(135deg, var(--navy-800), var(--navy-700));
  border:1px solid rgba(217,176,79,0.3); border-radius:var(--radius); padding:26px 24px;
  margin-bottom:18px; box-shadow:0 20px 50px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(240,205,122,0.08);
  position:relative; overflow:hidden;
}
.hero::before{
  content:""; position:absolute; top:-40%; left:50%; transform:translateX(-50%);
  width:140%; height:200px; background:radial-gradient(ellipse, rgba(217,176,79,0.16), transparent 70%);
  pointer-events:none;
}
.hero h1{
  font-size:27px; margin-bottom:8px; position:relative;
  background:linear-gradient(135deg, var(--white-warm) 30%, var(--gold-bright) 90%);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.hero p{ color:var(--text-dim); font-size:15px; line-height:1.6; position:relative; }
.hero .verse{ margin-top:14px; font-style:italic; color:var(--gold-bright); font-size:14px; line-height:1.55; border-left:2px solid var(--gold); padding-left:12px; position:relative; }

.action-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.btn{
  border:none; border-radius:10px; padding:12px 18px; font-weight:700; font-size:14px; cursor:pointer;
  display:inline-flex; align-items:center; gap:8px;
}
.btn-primary{ background:var(--blue-action); color:#fff; }
.btn-primary:hover{ background:var(--blue-action-bright); }
.btn-gold{ background:linear-gradient(135deg, var(--gold), var(--gold-bright)); color:var(--navy-900); box-shadow:0 4px 14px -4px rgba(217,176,79,0.5); }
.btn-gold:hover{ background:var(--gold-bright); box-shadow:0 6px 18px -4px rgba(217,176,79,0.65); }
.btn-ghost{ background:var(--navy-700); color:var(--white-warm); border:1px solid var(--navy-600); }
.btn-ghost:hover{ border-color:var(--gold); }
.btn-sm{ padding:8px 12px; font-size:12.5px; }
.btn:disabled{ opacity:.4; cursor:not-allowed; }

section.block{ margin-bottom:26px; }
section.block h2{ font-size:19px; margin-bottom:12px; display:flex; align-items:center; gap:8px; color:var(--white-warm); }
section.block h2::before{ content:""; width:4px; height:18px; background:linear-gradient(180deg, var(--gold-bright), var(--gold)); border-radius:2px; display:inline-block; }

.category-chip{
  display:inline-flex; align-items:center; gap:6px; background:var(--navy-700); border:1px solid var(--navy-600);
  border-radius:20px; padding:7px 14px; font-size:13.5px; cursor:pointer; margin:4px 6px 4px 0;
}
.category-chip:hover{ border-color:var(--gold); }
.category-chip .pct{ color:var(--gold-bright); font-weight:700; }

/* ---------------- QUESTION CARD ---------------- */
.qcard{
  background:linear-gradient(160deg, var(--navy-800), var(--navy-700) 140%);
  border:1px solid var(--navy-600); border-radius:var(--radius);
  padding:20px; box-shadow:var(--shadow); margin-bottom:16px;
}
.qcard .meta{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.tag-pill{ font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; padding:4px 9px; border-radius:6px; background:var(--navy-600); color:var(--text-dim); }
.tag-pill.level{ color:var(--gold-bright); }
.qcard h3.qtext{ font-size:17.5px; line-height:1.4; margin-bottom:14px; color:var(--white-warm); }
.opt-list{ display:flex; flex-direction:column; gap:9px; }
.opt-btn{
  text-align:left; background:var(--navy-700); border:1px solid var(--navy-600); color:var(--white-warm);
  padding:13px 15px; border-radius:10px; cursor:pointer; font-size:14.5px; line-height:1.45; display:flex; gap:10px;
}
.opt-btn:hover{ border-color:var(--gold); }
.opt-btn.correct{ border-color:var(--green-ok); background:rgba(90,153,104,0.18); }
.opt-btn.wrong{ border-color:var(--red-warn); background:rgba(194,89,71,0.16); opacity:.8; }
.opt-btn .k{ font-weight:800; color:var(--gold-bright); }

.explain-box{
  margin-top:14px; padding:15px; background:var(--navy-700); border-radius:10px; border:1px solid var(--navy-600);
  font-size:14px; color:var(--text-dim); line-height:1.6; display:none;
}
.explain-box.show{ display:block; }
.explain-box.is-wrong{ border-color:rgba(194,89,71,0.4); background:rgba(194,89,71,0.08); }
.explain-box h4{ font-size:12px; text-transform:uppercase; color:var(--gold-bright); margin-bottom:6px; letter-spacing:.05em; }
.explain-box .row{ margin-bottom:10px; }
.explain-box .row:last-child{ margin-bottom:0; }

.qcard-footer{ display:flex; gap:8px; margin-top:14px; flex-wrap:wrap; }

/* ---------------- ACCORDION (learn mode) ---------------- */
.accordion-item{ border:1px solid var(--navy-600); border-radius:10px; margin-bottom:8px; overflow:hidden; background:var(--navy-800); }
.accordion-head{ padding:14px; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:10px; }
.accordion-head h4{ font-size:14.5px; font-weight:700; }
.accordion-body{ padding:0 14px 14px; display:none; font-size:13.5px; color:var(--text-dim); line-height:1.6; }
.accordion-body.show{ display:block; }
.accordion-body h5{ color:var(--gold-bright); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; margin:12px 0 4px; }
.accordion-body h5:first-child{ margin-top:0; }

/* ---------------- SEARCH ---------------- */
.search-box{
  display:flex; gap:8px; margin-bottom:16px;
}
.search-box input{
  flex:1; background:var(--navy-800); border:1px solid var(--navy-600); border-radius:10px; padding:12px 14px;
  color:var(--white-warm); font-size:14px;
}
.search-box input:focus{ outline:none; border-color:var(--gold); }

/* ---------------- PROGRESS RING ---------------- */
.result-ring{ display:flex; align-items:center; justify-content:center; margin:20px auto; position:relative; width:150px; height:150px; }
.result-ring svg{ position:absolute; top:0; left:0; transform:rotate(-90deg); }
.result-ring .num{ font-family:'Fraunces',serif; font-size:34px; font-weight:700; color:var(--gold-bright); z-index:1; }

/* ---------------- DEBATE ---------------- */
.debate-line{ margin-bottom:14px; padding:14px; border-radius:10px; }
.debate-line.interlocutor{ background:var(--navy-700); border-left:3px solid var(--red-warn); }
.debate-line.you{ background:rgba(59,111,214,0.14); border-left:3px solid var(--blue-action); }
.debate-line .who{ font-size:11px; text-transform:uppercase; color:var(--text-dim); margin-bottom:6px; letter-spacing:.05em; }
.debate-choice{ display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.debate-choice button{ text-align:left; }
.quality-badge{ font-size:10.5px; padding:2px 7px; border-radius:5px; margin-left:8px; text-transform:uppercase; letter-spacing:.04em; }
.quality-badge.bun{ background:rgba(79,138,91,0.25); color:#8fd39c; }
.quality-badge.slab{ background:rgba(182,74,60,0.25); color:#e08d80; }
.quality-badge.mediu{ background:rgba(201,168,76,0.25); color:var(--gold-bright); }

/* ---------------- SETTINGS ---------------- */
.settings-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--navy-600); }
.settings-row:last-child{ border-bottom:none; }
.settings-row .label{ font-size:14px; }
.settings-row .desc{ font-size:12px; color:var(--text-dim); margin-top:2px; }
.toggle{ width:44px; height:26px; background:var(--navy-700); border:1px solid var(--navy-600); border-radius:14px; position:relative; cursor:pointer; }
.toggle.on{ background:var(--blue-action); }
.toggle .knob{ width:20px; height:20px; background:var(--white-warm); border-radius:50%; position:absolute; top:2px; left:2px; transition:left .15s; }
.toggle.on .knob{ left:20px; }

textarea.import-area{ width:100%; min-height:120px; background:var(--navy-800); border:1px solid var(--navy-600); border-radius:10px; color:var(--white-warm); padding:10px; font-family:monospace; font-size:12px; }

.empty-state{ text-align:center; padding:40px 20px; color:var(--text-dim); }
.empty-state .big{ font-size:34px; margin-bottom:10px; }

/* Accessibility helpers */
body.large-font{ font-size:112%; }
body.high-contrast{ --navy-800:#000; --navy-700:#111; --text-dim:#e8e8e8; }
body.reduced-motion *{ animation:none !important; transition:none !important; }

:focus-visible{ outline:2px solid var(--gold-bright); outline-offset:2px; }

@media (max-width:480px){
  .hero h1{ font-size:21px; }
}
