:root {
  --bg: #0a0e1a;
  --bg2: #111827;
  --fg: #f1f5f9;
  --dim: #64748b;
  --gold: #ffd166;
  --hot: #ef476f;
  --grass: #06d6a0;
  --panel: rgba(255, 255, 255, 0.05);
}

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

html, body { height: 100%; }

body {
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1a2440 0%, var(--bg) 55%);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* zidul urărilor în zbor */
#zbor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  overflow: hidden;
}
.u-fly {
  position: absolute;
  left: 100vw;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  font-weight: 800;
  color: #e2e8f0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  will-change: transform;
  transition: font-size 300ms ease;
  user-select: none;
  -webkit-user-select: none;
}
.u-fly .u-autor {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.85;
  margin-left: 6px;
}
.u-fly.u-hot { color: var(--gold); }
.u-fly.u-noua {
  color: var(--grass);
  text-shadow: 0 0 14px rgba(6, 214, 160, 0.7);
}
.u-fly .u-in { display: inline-block; }
.u-fly .u-in.u-boosted { animation: u-pop 300ms ease; }
@keyframes u-pop { 50% { transform: scale(1.3); } }

/* caseta de urare */
.urare-box { text-align: left; }
.urare-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg2);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
}
.urare-row .prefix { font-weight: 900; color: var(--gold); letter-spacing: 1px; }
.urare-row input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 15px;
  min-width: 0;
}
.urare-row2 { display: flex; gap: 8px; margin-top: 8px; }
.urare-row2 input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--fg);
  font-size: 13px;
  outline: none;
  min-width: 0;
}
.pill.gold { background: var(--gold); color: #1a1a1a; border-color: var(--gold); font-weight: 800; }
.pill.gold:disabled { opacity: 0.5; cursor: default; }
.urare-hint { color: var(--dim); font-size: 12px; margin-top: 8px; text-align: center; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
}

.logo { font-weight: 900; font-size: 20px; letter-spacing: 1px; }
.logo span { color: var(--gold); }

.online { color: var(--grass); font-size: 13px; font-weight: 600; }

main {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}

/* contorul național */
.total {
  font-size: clamp(40px, 11vw, 64px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.total-label { color: var(--dim); font-size: 14px; margin-top: 2px; }
.total-hour {
  color: var(--grass);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.tagline { color: var(--gold); font-size: 13px; margin-top: 8px; opacity: 0.9; }
.tagline b { letter-spacing: 1px; }

/* butonul */
.btn-zone { position: relative; display: flex; justify-content: center; padding: 12px 0; }

#tap {
  position: relative;
  width: min(62vw, 250px);
  height: min(62vw, 250px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #2b3a67, #16213e 70%);
  box-shadow:
    0 0 0 6px rgba(255, 209, 102, 0.15),
    0 0 60px rgba(255, 209, 102, 0.12),
    inset 0 -12px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 60ms ease;
  z-index: 2;
}
#tap:active { transform: scale(0.93); }
#tap .emoji { font-size: min(26vw, 110px); line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)); }
#tap .btn-text { font-weight: 900; font-size: 18px; letter-spacing: 2px; color: var(--gold); }

.rings { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; z-index: 1; }
.ring {
  position: absolute;
  width: min(62vw, 250px);
  height: min(62vw, 250px);
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0.7;
  animation: ring 900ms ease-out forwards;
}
@keyframes ring {
  to { transform: scale(1.8); opacity: 0; }
}

/* decibelmetrul */
.meter {
  height: 14px;
  border-radius: 7px;
  background: var(--panel);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--grass), var(--gold) 60%, var(--hot));
  transition: width 250ms linear;
}
.meter-label { color: var(--dim); font-size: 13px; margin-top: 6px; }

.personal { font-size: 15px; color: var(--fg); display: flex; justify-content: center; gap: 12px; }
.personal b { color: var(--gold); font-variant-numeric: tabular-nums; }
.combo { color: var(--hot); font-weight: 800; }

/* meci live */
.match {
  background: var(--panel);
  border: 1px solid rgba(239, 71, 111, 0.4);
  border-radius: 14px;
  padding: 14px;
}
.match-head { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-bottom: 10px; }
.live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--hot);
  animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0.3; } }
#match-chart { width: 100%; height: 120px; }
.match-sub { color: var(--dim); font-size: 12px; margin-top: 6px; }

/* paneluri */
.panel {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}
select {
  background: var(--bg2);
  color: var(--fg);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}
.panel-sub { color: var(--dim); font-size: 11px; font-weight: 500; }
#tl-chart { width: 100%; height: 110px; display: block; }
.tl-legend {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 11px;
  margin-top: 4px;
}
.tl-legend #tl-peak { color: var(--hot); font-weight: 700; }

.judete { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.judete li {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.judete li b { color: var(--gold); }
.judete li:first-child { font-weight: 800; }

.monument-bar {
  height: 12px;
  border-radius: 6px;
  background: var(--bg2);
  overflow: hidden;
}
#monument-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #94a3b8, var(--gold));
  transition: width 400ms ease;
}
.monument-label { color: var(--dim); font-size: 12px; margin-top: 6px; }
.niveluri {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.niveluri li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  color: var(--dim);
  padding: 6px 8px;
  border-radius: 8px;
}
.niveluri li b {
  min-width: 92px;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}
.niveluri li.done { opacity: 0.55; text-decoration: line-through; }
.niveluri li.done b { color: var(--grass); text-decoration: none; }
.niveluri li.next {
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: var(--fg);
}
.niveluri li.next b { color: var(--gold); }

.actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pill {
  background: var(--panel);
  border: 1px solid #334155;
  color: var(--fg);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pill:active { transform: scale(0.96); }

footer { color: var(--dim); font-size: 12px; margin-top: 8px; }
footer a { color: var(--dim); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--gold);
  color: #1a1a1a;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  animation: toast-in 300ms ease;
  text-align: center;
  max-width: 90vw;
}
@keyframes toast-in { from { transform: translate(-50%, 20px); opacity: 0; } }

.hidden { display: none !important; }

/* ERUPȚII — toată țara tapează */
body.erupt-1 .btn-zone { animation: pulse 800ms infinite; }
body.erupt-2 { animation: shake 300ms infinite; }
body.erupt-2 .meter-fill, body.erupt-3 .meter-fill { box-shadow: 0 0 18px var(--hot); }
body.erupt-3 { animation: shake 150ms infinite; }
body.erupt-3::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background: radial-gradient(circle at 50% 60%, rgba(239, 71, 111, 0.25), transparent 60%);
  animation: blink 400ms infinite;
}
@keyframes pulse { 50% { transform: scale(1.03); } }
@keyframes shake {
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
}

/* pagina de meci */
.pagina-meci { padding: 20px; }
.pagina-meci main, #meci-root { max-width: 640px; margin: 0 auto; text-align: center; }
