/* ============================================================
   hailafseo.info — stil comun
   Gândit întâi pentru telefon. Butoane mari, text puțin.
   ============================================================ */

:root {
  --bg:        #0A0C16;
  --bg-2:      #121527;
  --surface:   #1A1E33;
  --surface-2: #232845;
  --line:      #2E3455;

  --gold:  #FFD400;
  --coral: #FF4D6D;
  --mint:  #3DDC97;
  --sky:   #52A8FF;

  --text:  #F4F6FF;
  --muted: #98A0BF;

  --r:   18px;
  --r-l: 26px;

  --pad: clamp(16px, 4vw, 28px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* atributul hidden trebuie să învingă orice display din regulile de mai jos,
   altfel imaginile care lipsesc apar ca pătrate goale */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, .display {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 .4em;
}

h1 { font-size: clamp(34px, 9vw, 68px); }
h2 { font-size: clamp(26px, 6.5vw, 42px); }
h3 { font-size: clamp(19px, 4.5vw, 24px); }

p { margin: 0 0 1em; }
a { color: var(--gold); }

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.center { text-align: center; }
.muted  { color: var(--muted); }
.small  { font-size: 14px; line-height: 1.5; }
.tiny   { font-size: 12.5px; line-height: 1.45; }

.gold  { color: var(--gold); }
.coral { color: var(--coral); }
.mint  { color: var(--mint); }

/* ---------- butoane ---------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 60px;
  padding: 16px 30px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #0A0C16;
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
  width: 100%;
  max-width: 460px;
}
.btn:active { transform: scale(.97); }
.btn:hover  { filter: brightness(1.08); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line);
}
.btn-ghost:hover { border-color: var(--gold); filter: none; }

.btn-coral { background: var(--coral); color: #fff; }
.btn-mint  { background: var(--mint);  color: #05261A; }

.btn-sm { min-height: 46px; padding: 10px 20px; font-size: 16px; width: auto; }

/* ---------- carduri ---------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: clamp(20px, 5vw, 34px);
}

section { padding: clamp(48px, 11vw, 96px) 0; }

.eyebrow {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

/* ---------- carusel ---------------------------------------- */

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px var(--pad) 22px;
  margin: 0 calc(var(--pad) * -1);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 min(300px, 82vw);
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
}
.slide .em { font-size: 46px; line-height: 1; margin-bottom: 14px; }
.slide .nm { font-family: "Space Grotesk", sans-serif; font-size: 22px; font-weight: 700; }
.slide .co { color: var(--gold); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.slide .dd { font-size: 15px; color: var(--text); margin-bottom: 16px; flex: 1; }

.diploma {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
}
.diploma b { color: var(--mint); display: block; font-size: 14.5px; margin-bottom: 2px; }

.stat {
  margin-top: 14px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--gold);
}
.stat span { display: block; font-family: "Inter", sans-serif; font-size: 11.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

.rail-hint { font-size: 13px; color: var(--muted); margin-top: -12px; }

.badge-fse {
  display: inline-block;
  background: var(--mint);
  color: #05261A;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.badge-ro {
  display: inline-block;
  background: var(--coral);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- ecrane de activitate ---------------------------- */

.screen { display: none; }
.screen.on { display: block; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 18px var(--pad) 34px;
  max-width: 640px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 14px;
}
.topbar a { color: var(--muted); text-decoration: none; font-weight: 600; }

.cod-pill {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .08em;
}

/* input */
.field {
  width: 100%;
  min-height: 58px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
}
.field:focus { outline: none; border-color: var(--gold); }
.field::placeholder { color: #6D7699; }

/* opțiuni quiz */
.opt {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 17px;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .1s;
}
.opt:active { transform: scale(.985); }
.opt:hover  { border-color: var(--gold); background: var(--surface-2); }

.progress {
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 26px;
}
.progress i { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .3s ease; }

/* ---------- jocul Țiriac ------------------------------------ */

.hud {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(10,12,22,.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px var(--pad);
  margin: 0 calc(var(--pad) * -1) 18px;
}
.hud-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hud-lbl { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hud-val { font-family: "Space Grotesk", sans-serif; font-size: clamp(20px, 5.4vw, 30px); font-weight: 700; }
.hud-bar { height: 7px; background: var(--surface-2); border-radius: 999px; margin-top: 11px; overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 100%; background: var(--mint); transition: width .25s linear; }
.hud-bar.warn i { background: var(--coral); }

.timer-big { font-variant-numeric: tabular-nums; }

.item {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 12px;
  margin-bottom: 8px;
}
.item.bought { border-color: var(--mint); background: var(--surface-2); }
.item.tooexp { opacity: .35; }
.item .ic { font-size: 26px; line-height: 1; }
.item .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.item .nm2 { display: block; font-size: 15px; font-weight: 600; line-height: 1.22; }
.item .pr { display: block; font-family: "Space Grotesk", sans-serif; font-size: 13.5px; color: var(--muted); }
.item .ct {
  min-width: 34px;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--mint);
}
.qbtn {
  width: 44px; height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.qbtn.plus { background: var(--gold); color: #0A0C16; }
.qbtn:disabled { opacity: .28; cursor: default; }
.qbtn:active { transform: scale(.92); }

/* ---------- rezultate --------------------------------------- */

.result-hero { text-align: center; padding: 14px 0 6px; }
.result-hero .big-emoji { font-size: 78px; line-height: 1; }
.result-hero .type-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(38px, 11vw, 64px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -.02em;
  margin: 8px 0 4px;
}
.result-img { width: min(260px, 66vw); aspect-ratio: 1; object-fit: contain; margin: 0 auto 10px; display: block; }

.kv { display: flex; gap: 12px; margin-bottom: 12px; }
.kv .k { flex: 0 0 auto; font-size: 22px; }
.kv .v { font-size: 15.5px; }
.kv .v b { display: block; color: var(--mint); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- panel ------------------------------------------- */

.panel-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px var(--pad);
}
.panel-total {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(110px, 34vw, 300px);
  font-weight: 700;
  line-height: .9;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 760px;
  margin-top: 40px;
}
.panel-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 14px;
}
.panel-cell .n {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.panel-cell .l { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); margin-right: 8px; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- diverse ----------------------------------------- */

.stack > * + * { margin-top: 14px; }
.spacer { flex: 1; }
.hr { height: 1px; background: var(--line); border: 0; margin: 30px 0; }

.loader {
  width: 42px; height: 42px;
  border: 4px solid var(--surface-2);
  border-top-color: var(--gold);
  border-radius: 50%;
  margin: 30px auto;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
