/* Jarvis programėlė: kryptis „Scena“ (juoda + Private Beats raudona) */
:root {
  --bg: #0E0E12;
  --card: #18181F;
  --line: #26262F;
  --line-strong: #4A4858;
  --text: #F3F1EA;
  --soft: #C9C7D1;
  --muted: #9A98A6;
  --accent: #FF2E3F;
  --warn: #FFB23D;
  --warn-bg: #3A2E14;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --bottom: var(--tg-safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#screen {
  padding: calc(var(--top) + 14px) 20px calc(var(--bottom) + 120px);
  display: flex; flex-direction: column; gap: 14px;
  max-width: 520px; margin: 0 auto;
}

/* Bendri elementai */
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.warn { color: var(--warn); }
.soft { color: var(--soft); font-size: 14px; }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: 0.01em; }
.card { background: var(--card); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row.base { align-items: baseline; }
.title { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.05; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--line); color: var(--soft); font-size: 13px; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.ok { background: var(--accent); color: var(--bg); font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* Žaidėjo juosta */
.player { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 18px; background: var(--card); text-align: left; cursor: pointer; }
.lvl { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 28px; flex: none; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pinfo b { font-family: var(--display); font-size: 20px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pinfo .mono { white-space: nowrap; flex: none; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 8px; background: var(--accent); border-radius: 4px; }
.streak { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: var(--line); font-family: var(--mono); font-weight: 600; font-size: 14px; flex: none; }
.streak svg { width: 16px; height: 16px; stroke: var(--accent); }

/* Mėnesio misija */
.bignum { display: flex; align-items: baseline; gap: 8px; }
.big { font-family: var(--display); font-weight: 700; font-size: 84px; line-height: 0.9; color: var(--accent); }
.of { font-family: var(--display); font-weight: 600; font-size: 28px; color: var(--muted); }
.vu { display: flex; gap: 4px; }
.vu span { flex: 1; height: 26px; border-radius: 3px; background: var(--line); }
.vu span.on { background: var(--accent); }

/* Įspėjimai */
.alert { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--warn-bg); color: var(--warn); font-size: 14px; text-align: left; cursor: pointer; }
.alert svg { width: 18px; height: 18px; }

/* Užduotys */
.task { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 10px 12px 10px 14px; border: 0; border-radius: 16px; background: var(--card); text-align: left; }
.box { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: center; flex: none; }
.task.done .box { border: 0; background: var(--accent); }
.task.done .box svg { stroke: var(--bg); stroke-width: 3; width: 18px; height: 18px; }
.task.done .ttl { color: var(--muted); text-decoration: line-through; }
.ttl { font-weight: 600; }

/* Artimiausias gigas */
.countdown { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 84px; padding: 8px 0; border-radius: 14px; background: var(--bg); }
.countdown b { font-family: var(--mono); font-weight: 600; font-size: 38px; line-height: 1; color: var(--accent); }
.countdown span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); }
.gig { flex-direction: row; align-items: center; gap: 14px; padding: 14px; border: 0; width: 100%; text-align: left; cursor: pointer; }

/* Kalendorius */
.month-nav { display: flex; gap: 8px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #33323D; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round svg { width: 20px; height: 20px; }
.cal { padding: 14px; gap: 6px; }
.wk, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wk span { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; }
.day { height: 42px; border: 0; border-radius: 10px; background: transparent; font-family: var(--mono); font-size: 15px; font-weight: 600; cursor: pointer; position: relative; }
.day.sun { color: var(--muted); }
.day.free { border: 1.5px dashed var(--muted); }
.day.work::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--soft); }
.day.gig { background: var(--accent); color: var(--bg); }
.day.today { box-shadow: inset 0 0 0 2px var(--text); }
.day.sel { outline: 2px solid var(--text); outline-offset: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 8px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Užsakymo kortelė */
.order.selected { border: 1px solid var(--accent); }
.price { font-family: var(--display); font-weight: 700; font-size: 32px; color: var(--accent); white-space: nowrap; }
.actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.btn { min-height: 48px; border: 0; border-radius: 14px; background: var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn svg { width: 16px; height: 16px; }
.btn.accent { background: var(--accent); color: var(--bg); }
.btn.off { opacity: 0.45; cursor: default; }
.item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 8px 14px; border: 0; border-radius: 16px; background: var(--card); text-align: left; cursor: pointer; }
.item .d { font-family: var(--mono); font-size: 14px; font-weight: 600; width: 52px; flex: none; }
.item .t { display: flex; flex-direction: column; min-width: 0; }
.item .t b { font-size: 15px; }

/* Lygio ekranas */
.hero { display: flex; align-items: center; gap: 18px; }
.hero .lvl { width: 96px; height: 96px; font-size: 60px; box-shadow: 0 0 0 6px var(--card), 0 0 0 8px var(--accent); }
.ladder { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 12px; border-radius: 14px; }
.step.here { background: var(--card); border: 1px solid var(--accent); }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 18px; border: 1.5px solid var(--line-strong); color: var(--muted); flex: none; }
.step.done .n, .step.here .n { background: var(--accent); border: 0; color: var(--bg); }
.step.locked .nm { color: var(--muted); }
.step .nm { flex: 1; font-weight: 600; }
.badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.badge { background: var(--card); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.badge span { width: 52px; height: 52px; border-radius: 50%; background: var(--line); color: #6E6C7A; display: flex; align-items: center; justify-content: center; }

/* Skirtukai */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: calc(76px + var(--bottom)); padding: 0 8px var(--bottom); background: var(--bg); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; }
.tabs button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); min-height: 56px; justify-content: center; cursor: pointer; }
.tabs button[aria-current="page"] { color: var(--accent); }
.mic-circle { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px var(--bg); }
.mic-circle svg { stroke: var(--bg); width: 26px; height: 26px; stroke-width: 2.2; }

/* Pranešimas */
#toast { position: fixed; left: 20px; right: 20px; bottom: calc(var(--bottom) + 92px); z-index: 20; padding: 14px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 600; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
#toast.show { opacity: 1; transform: none; }
#toast.bad { background: var(--warn); }

/* Kraunama */
.skeleton { height: 120px; border-radius: 20px; background: linear-gradient(90deg, var(--card), #1F1F28, var(--card)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } #toast { transition: none; } }
