/* ==========================================================================
   Vice Clock — GTA VI styl
   ========================================================================== */

:root {
  --size: clamp(230px, min(58vmin, 51vh), 450px);
  --radius: 18px;
  --font-display: "Arial Black", "Segoe UI Black", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ink: #fff6ff;
  --ink-dim: #b9a8cf;
  --hud-bg: rgba(18, 10, 34, 0.68);
  --hud-line: rgba(255, 255, 255, 0.14);
  --panel-bg: rgba(18, 10, 34, 0.6);
  --chip-bg: rgba(255, 255, 255, 0.07);
  --shadow: 0 26px 60px -28px rgba(0, 0, 0, 0.9);

  --accent: #ff4fa3;
  --accent-2: #29e7e0;
  --glow: rgba(255, 79, 163, 0.5);

  --dial-a: #150c28;
  --dial-b: #2b1147;
  --dial-text: #f7eaff;
  --dial-muted: #b79bd4;
  --second: #ff2d6f;

  --hour-fill: linear-gradient(180deg, #f3e9ff 0%, #a693c2 48%, #453155 100%);
  --minute-fill: linear-gradient(180deg, #ffffff 0%, #cbb9dd 45%, #58406b 100%);
  --hand-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);

  --sky-1: #ffb27a;
  --sky-2: #b2529e;
  --sky-3: #2b124a;
  --sun: #ffd58a;
  --sun-glow: rgba(255, 156, 108, 0.55);
  --far-building: #3b2058;
  --near-building: #1b1030;
  --window: rgba(255, 211, 133, 0.75);
  --water-1: rgba(255, 120, 170, 0.45);
  --water-2: rgba(41, 231, 224, 0.22);
  --star-op: 0;
  --palm: #120a20;

  color-scheme: dark;
}

html[data-dial="gold"] {
  --dial-a: #1d1305;
  --dial-b: #422a09;
  --dial-text: #fff3d2;
  --dial-muted: #d8b878;
  --second: #ff8a1f;
}

html[data-dial="chrome"] {
  --dial-a: #0d1622;
  --dial-b: #2b3b50;
  --dial-text: #eaf7ff;
  --dial-muted: #9fb6cc;
  --second: #ff4040;
}

html[data-dial="blood"] {
  --dial-a: #1c0509;
  --dial-b: #460912;
  --dial-text: #ffe9ec;
  --dial-muted: #d98b9a;
  --second: #ff2d4b;
}

html[data-hands="glow"] {
  --hour-fill: linear-gradient(180deg, #7bfff3, #16b8c4 70%, #0b6573);
  --minute-fill: linear-gradient(180deg, #ffc0e2, #ff4fa3 65%, #8d1c58);
  --hand-shadow: 0 0 14px var(--glow), 0 0 4px rgba(255, 255, 255, 0.6);
}

html[data-hands="gold-hands"] {
  --hour-fill: linear-gradient(180deg, #fff3bf, #e0a92b 52%, #7b4d08);
  --minute-fill: linear-gradient(180deg, #fff9d8, #f5c447 55%, #8a5a0d);
  --hand-shadow: 0 0 12px rgba(255, 194, 71, 0.4), 0 3px 10px rgba(0, 0, 0, 0.5);
}

html[data-ui="noir"] {
  --hud-bg: rgba(6, 5, 9, 0.88);
  --panel-bg: rgba(8, 5, 10, 0.84);
  --hud-line: rgba(255, 63, 89, 0.35);
  --chip-bg: rgba(255, 63, 89, 0.09);
  --accent: #ff3f59;
  --glow: rgba(255, 63, 89, 0.45);
}

html[data-ui="minimal"] {
  --hud-bg: rgba(14, 9, 24, 0.32);
  --panel-bg: rgba(14, 9, 24, 0.28);
  --hud-line: rgba(255, 255, 255, 0.08);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --ink-dim: rgba(255, 255, 255, 0.62);
}

html[data-daypart="dawn"] {
  --sky-1: #ffc48a;
  --sky-2: #e77b9d;
  --sky-3: #4b2261;
  --sun: #ffe6b0;
  --sun-glow: rgba(255, 186, 128, 0.6);
  --far-building: #673363;
  --near-building: #2c163a;
  --star-op: 0.15;
}

html[data-daypart="day"] {
  --sky-1: #49bcdf;
  --sky-2: #85d2dc;
  --sky-3: #f6c7a6;
  --sun: #fff3cb;
  --sun-glow: rgba(255, 248, 205, 0.5);
  --far-building: #6a6a94;
  --near-building: #333050;
  --window: rgba(255, 255, 255, 0.32);
  --star-op: 0;
  --palm: #1c1630;
}

html[data-daypart="dusk"] {
  --sky-1: #ff6f91;
  --sky-2: #a6338f;
  --sky-3: #180c36;
  --sun: #ffb066;
  --sun-glow: rgba(255, 105, 121, 0.6);
  --far-building: #4a235f;
  --near-building: #1b1030;
  --star-op: 0.55;
}

html[data-daypart="night"] {
  --sky-1: #170b31;
  --sky-2: #0d0a26;
  --sky-3: #040614;
  --sun: #d8c8ff;
  --sun-glow: rgba(126, 99, 214, 0.35);
  --far-building: #28164a;
  --near-building: #0d091c;
  --window: rgba(255, 214, 130, 0.95);
  --water-1: rgba(255, 79, 163, 0.35);
  --water-2: rgba(41, 231, 224, 0.3);
  --star-op: 1;
  --palm: #05030d;
}

/* --- Základ --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.8vh, 18px);
  padding: clamp(10px, 2vw, 20px);
  color: var(--ink);
  font-family: var(--font-body);
  background: #05030d;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* --- Pozadí Vice City ----------------------------------------------------- */

.city {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 46%, var(--sky-3) 78%, #080615 100%);
  transition: background 1.2s ease;
}

.city__sky {
  position: absolute;
  inset: 0 0 38% 0;
  background:
    radial-gradient(70% 80% at 50% 100%, rgba(255, 196, 140, 0.25), transparent 70%),
    repeating-linear-gradient(96deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 12px);
}

.city__sun {
  position: absolute;
  left: 50%;
  top: 41%;
  width: clamp(150px, 24vmin, 300px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--sun), rgba(255, 112, 138, 0.85));
  box-shadow: 0 0 90px 45px var(--sun-glow);
  opacity: 0.92;
  transition: background 1.2s ease, box-shadow 1.2s ease;
}

.city__sun::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-linear-gradient(180deg, transparent 0 14px, rgba(40, 12, 60, 0.35) 14px 19px);
  mask-image: linear-gradient(180deg, transparent 45%, #000 100%);
}

.stars {
  position: absolute;
  inset: 0 0 40% 0;
  opacity: var(--star-op);
  transition: opacity 1s ease;
}

.stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px #fff;
  animation: twinkle var(--t, 3s) ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26%;
  height: 30vh;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0 2%;
  opacity: 0.95;
}

.skyline--far {
  bottom: 26%;
  filter: blur(1px);
  opacity: 0.75;
}

.skyline--near {
  bottom: 24%;
  height: 22vh;
}

.building {
  flex: 1 1 auto;
  min-width: 14px;
  max-width: 74px;
  height: var(--h);
  background: var(--far-building);
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 8px 0 16px -12px rgba(255, 255, 255, 0.3);
  position: relative;
}

.skyline--near .building {
  background: var(--near-building);
}

.building::after {
  content: "";
  position: absolute;
  inset: 8px 4px 0;
  background-image:
    repeating-linear-gradient(180deg, var(--window) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(90deg, transparent 0 5px, var(--near-building) 5px 8px);
  opacity: 0.65;
}

.building--antenna::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 2px;
  height: var(--a, 20px);
  background: var(--far-building);
}

.water {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 30%;
  background:
    repeating-linear-gradient(180deg, var(--water-1) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, rgba(11, 6, 28, 0.5), rgba(4, 3, 12, 0.96) 55%);
  transform: perspective(300px) rotateX(18deg);
  transform-origin: center top;
  animation: water-shift 7s linear infinite alternate;
}

.water::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 48%, var(--water-2) 50%, transparent 52%);
  filter: blur(10px);
}

.palm {
  position: absolute;
  bottom: 8%;
  width: 150px;
  height: 300px;
  opacity: 0.9;
}

.palm--left {
  left: -26px;
  transform: scale(0.9) rotate(-4deg);
}

.palm--right {
  right: -34px;
  bottom: 3%;
  transform: scale(1.05) scaleX(-1) rotate(3deg);
}

.palm::before {
  content: "";
  position: absolute;
  left: 62px;
  bottom: 0;
  width: 20px;
  height: 74%;
  background: var(--palm);
  border-radius: 45% 45% 12% 12%;
  transform: skewX(-5deg);
  box-shadow: inset -5px 0 0 rgba(255, 255, 255, 0.04);
}

.palm i {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 110px;
  height: 26px;
  background: var(--palm);
  border-radius: 100% 12% 100% 12%;
  transform-origin: 0 50%;
}

.palm i:nth-child(1) { transform: rotate(-160deg) scaleX(0.9); }
.palm i:nth-child(2) { transform: rotate(-118deg) scaleX(1.05); }
.palm i:nth-child(3) { transform: rotate(-75deg) scaleX(0.85); }
.palm i:nth-child(4) { transform: rotate(-28deg) scaleX(1.05); }
.palm i:nth-child(5) { transform: rotate(15deg) scaleX(0.85); }
.palm i:nth-child(6) { transform: rotate(55deg) scaleX(0.7); }

.city__grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -12%;
  height: 34%;
  background:
    repeating-linear-gradient(90deg, rgba(255, 79, 163, 0.2) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(41, 231, 224, 0.16) 0 1px, transparent 1px 34px);
  transform: perspective(280px) rotateX(62deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(180deg, transparent, #000 45%);
}

/* --- Hlavička ------------------------------------------------------------- */

.hud {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--hud-line);
  border-radius: 14px;
  background: var(--hud-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--accent), #7d1d86);
  box-shadow: 0 0 20px var(--glow);
}

.brand__mark span {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-30deg);
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(15px, 2.1vw, 22px);
  line-height: 1;
  letter-spacing: 0.04em;
  font-style: italic;
  text-transform: uppercase;
  text-shadow: 0 0 18px var(--glow);
}

.brand__name em {
  color: var(--accent-2);
  font-style: italic;
}

.brand__sub {
  margin-top: 4px;
  color: var(--ink-dim);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hud__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid rgba(69, 230, 130, 0.35);
  background: rgba(5, 32, 18, 0.72);
  box-shadow: 0 0 22px rgba(48, 209, 110, 0.16), var(--shadow);
  backdrop-filter: blur(12px);
  white-space: nowrap;
}

.wallet__bill {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 50%;
  background: #45d673;
  color: #062a14;
  font-family: var(--font-display);
  font-size: 13px;
}

.wallet__amount {
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 20px);
  font-style: italic;
  color: #7dffab;
  font-variant-numeric: tabular-nums;
}

.wallet__currency {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #9bd8ad;
}

.wallet.is-bump {
  animation: bump 0.38s cubic-bezier(0.2, 1.6, 0.5, 1);
}

.hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--hud-line);
  border-radius: 12px;
  background: var(--hud-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.hud-btn svg {
  width: 17px;
  height: 17px;
}

.hud-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(255, 79, 163, 0.16);
}

.hud-btn--icon {
  width: 40px;
  padding: 0;
  justify-content: center;
}

.icon-slash,
.icon-waves {
  display: none;
}

.hud-btn.is-muted .icon-slash {
  display: block;
}

.hud-btn.is-muted .icon-waves {
  display: none;
}

/* --- Scéna a hodiny ------------------------------------------------------- */

.stage {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vh, 16px);
  position: relative;
  z-index: 5;
}

.clock-wrap {
  position: relative;
  width: var(--size);
  height: var(--size);
  flex: 0 0 auto;
}

.aura {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  filter: blur(18px);
  opacity: 0.55;
  animation: breathe 5s ease-in-out infinite;
}

.clock {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

.bezel {
  position: absolute;
  inset: -3.2%;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #22152f, #8c779c 12%, #241a33 28%, #d6c2e6 47%, #261730 63%, #6d587f 82%, #1a1126);
  box-shadow:
    0 30px 70px -25px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 45px -5px var(--glow);
}

.bezel::after {
  content: "";
  position: absolute;
  inset: 2.6%;
  border-radius: 50%;
  background: #0a0612;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.9);
}

.dial {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(72% 66% at 34% 20%, rgba(255, 255, 255, 0.09), transparent 62%),
    radial-gradient(circle at 50% 55%, var(--dial-b), var(--dial-a) 74%);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--accent) 75%, transparent),
    inset 0 0 38px rgba(0, 0, 0, 0.75);
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

.dial::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--dial-text) 18%, transparent);
}

.dial::after {
  content: "VC";
  position: absolute;
  right: 17%;
  bottom: 21%;
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.062);
  font-style: italic;
  color: color-mix(in srgb, var(--accent-2) 65%, transparent);
  letter-spacing: 0.08em;
}

.face {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.tick {
  position: absolute;
  inset: 0;
  transform: rotate(calc(var(--i) * 6deg));
}

.tick::before {
  content: "";
  position: absolute;
  top: 4.2%;
  left: 50%;
  width: 2px;
  height: 2.4%;
  border-radius: 2px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--dial-text) 42%, transparent);
}

.tick--major::before {
  width: 4px;
  height: 4.4%;
  top: 3.6%;
  background: var(--dial-text);
  box-shadow: 0 0 8px var(--glow);
}

.numeral {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.066);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: var(--dial-text);
  text-shadow: 0 0 14px var(--glow);
  transform:
    translate(-50%, -50%)
    rotate(calc(var(--n) * 30deg))
    translateY(calc(var(--size) * -0.365))
    rotate(calc(var(--n) * -30deg));
}

.dial__brand,
.dial__sub {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
}

.dial__brand {
  top: 29%;
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.052);
  font-style: italic;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-shadow: 0 0 14px var(--glow);
}

.dial__sub {
  top: 67%;
  font-size: calc(var(--size) * 0.024);
  letter-spacing: 0.2em;
  color: var(--dial-muted);
}

.hands {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  transform: rotate(var(--angle, 0deg));
  will-change: transform;
}

.hand--hour {
  --w: calc(var(--size) * 0.034);
  width: var(--w);
  height: 23%;
  margin-left: calc(var(--w) / -2);
  border-radius: 999px 999px 6px 6px;
  background: var(--hour-fill);
  box-shadow: var(--hand-shadow);
  z-index: 2;
}

.hand--minute {
  --w: calc(var(--size) * 0.019);
  width: var(--w);
  height: 33%;
  margin-left: calc(var(--w) / -2);
  border-radius: 999px 999px 5px 5px;
  background: var(--minute-fill);
  box-shadow: var(--hand-shadow);
  z-index: 3;
}

.hand--second {
  --w: calc(var(--size) * 0.009);
  width: var(--w);
  height: 40%;
  margin-left: calc(var(--w) / -2);
  border-radius: 999px;
  background: var(--second);
  box-shadow: 0 0 12px var(--second);
  z-index: 5;
}

.hand--second::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: calc(var(--size) * 0.045);
  height: calc(var(--size) * 0.045);
  border-radius: 50%;
  background: var(--second);
  transform: translate(-50%, 42%);
  box-shadow: 0 0 10px var(--second);
}

.cap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 9%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 55%, #55204f 100%);
  box-shadow: 0 0 0 2px #12091f, 0 0 18px var(--glow);
}

.glass {
  position: absolute;
  inset: 0;
  z-index: 7;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(60% 42% at 30% 14%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(140deg, rgba(255, 255, 255, 0.09), transparent 46%);
  mix-blend-mode: screen;
}

.pulse {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: 50%;
  border: 2px solid #45d673;
  opacity: 0;
  pointer-events: none;
}

.pulse.is-pulsing {
  animation: pulse 0.75s ease-out;
}

/* --- Odečet a ovládání ---------------------------------------------------- */

.panel {
  min-width: min(330px, 90vw);
  padding: 14px 26px 13px;
  text-align: center;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel__caption {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.time {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.4vw, 58px);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px var(--glow);
}

.meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.meta__sep {
  color: var(--accent);
}

.status {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.status[data-state="ok"] {
  color: #6ef2a1;
}

.status[data-state="error"] {
  color: #ff6b7f;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--hud-line);
  border-radius: 999px;
  background: var(--chip-bg);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chip small {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink-dim);
  font-size: 9px;
  letter-spacing: 0;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: 0 0 20px rgba(41, 231, 224, 0.2);
}

.chip--primary {
  border-color: rgba(69, 230, 130, 0.5);
  background: linear-gradient(120deg, rgba(34, 172, 91, 0.45), rgba(16, 89, 54, 0.5));
  box-shadow: 0 0 24px rgba(69, 230, 130, 0.16);
}

.chip--primary:hover {
  border-color: #6effa4;
  box-shadow: 0 0 26px rgba(69, 230, 130, 0.3);
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.hint {
  color: var(--ink-dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* --- Peníze --------------------------------------------------------------- */

.cash-layer {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

.cash {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 72px;
  height: 40px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0b3d1d;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(180deg, #45d673, #1c9a4d);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.16),
    0 12px 22px -8px rgba(0, 0, 0, 0.8),
    0 0 26px rgba(69, 230, 130, 0.32);
  color: #07341a;
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  animation: cash-float 2.4s ease-in-out infinite, cash-in 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  animation-delay: 0s, 0s;
}

.cash::before,
.cash::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(6, 58, 28, 0.45);
  border-radius: 3px;
  pointer-events: none;
}

.cash::after {
  inset: auto auto 3px 6px;
  width: 26px;
  height: 8px;
  border: 0;
  border-left: 2px solid rgba(6, 58, 28, 0.5);
  border-right: 2px solid rgba(6, 58, 28, 0.5);
}

.cash:hover {
  filter: brightness(1.16);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.35),
    0 14px 28px -8px rgba(0, 0, 0, 0.8),
    0 0 36px rgba(69, 230, 130, 0.6);
}

.cash.is-magnet {
  box-shadow:
    0 0 0 2px rgba(41, 231, 224, 0.5),
    0 12px 22px -8px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(41, 231, 224, 0.6);
}

.cash--100 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 45%),
    linear-gradient(180deg, #7de3a3, #2ba05d);
}

.cash--500 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(180deg, #ffd86b, #e39b21);
  border-color: #7d5306;
  color: #4a2e00;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 12px 22px -8px rgba(0, 0, 0, 0.8), 0 0 28px rgba(255, 200, 70, 0.4);
}

.cash--1000 {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(180deg, #79d8ff, #2b7fc4);
  border-color: #103f6b;
  color: #072844;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18), 0 12px 22px -8px rgba(0, 0, 0, 0.8), 0 0 28px rgba(90, 190, 255, 0.45);
}

.cash.is-leaving {
  animation: cash-out 0.45s ease-in forwards;
}

.cash.is-collected {
  animation: cash-collect 0.4s ease-out forwards;
  pointer-events: none;
}

.float-layer {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
}

.float-amount {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  color: #7dffab;
  text-shadow: 0 2px 8px #042510, 0 0 16px rgba(69, 230, 130, 0.7);
  animation: rise 1s ease-out forwards;
}

/* --- Obchod --------------------------------------------------------------- */

.shop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.shop.is-open {
  opacity: 1;
  visibility: visible;
}

.shop__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 2, 10, 0.78);
  backdrop-filter: blur(8px);
}

.shop__card {
  position: relative;
  width: min(900px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 79, 163, 0.45);
  border-radius: 20px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(255, 79, 163, 0.14), transparent 60%),
    rgba(13, 8, 26, 0.97);
  box-shadow: 0 0 0 1px rgba(41, 231, 224, 0.1), 0 40px 90px -20px rgba(0, 0, 0, 0.95), 0 0 60px -20px var(--glow);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.2, 1.2, 0.4, 1);
  overflow: hidden;
}

.shop.is-open .shop__card {
  transform: translateY(0) scale(1);
}

.shop__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hud-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.shop__close svg {
  width: 16px;
  height: 16px;
}

.shop__close:hover {
  background: rgba(255, 79, 163, 0.2);
  border-color: var(--accent);
}

.shop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 62px 16px 26px;
  border-bottom: 1px solid var(--hud-line);
}

.shop__eyebrow {
  color: var(--accent-2);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.shop__title {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: clamp(18px, 3vw, 27px);
  font-style: italic;
  letter-spacing: 0.03em;
  text-shadow: 0 0 20px var(--glow);
}

.shop__wallet {
  white-space: nowrap;
  padding: 8px 13px;
  border: 1px solid rgba(69, 230, 130, 0.35);
  border-radius: 10px;
  background: rgba(5, 32, 18, 0.6);
  color: #7dffab;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.shop__wallet span {
  font-family: var(--font-display);
  font-size: 15px;
}

.shop__wallet b {
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
}

.shop__tabs {
  display: flex;
  gap: 6px;
  padding: 12px 22px 0;
  overflow-x: auto;
}

.shop__tabs button {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-bottom-color: var(--hud-line);
  background: transparent;
  cursor: pointer;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.shop__tabs button:hover {
  color: var(--ink);
}

.shop__tabs button.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 14px var(--glow);
}

.shop__items {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
  padding: 18px 22px;
  scrollbar-color: var(--accent) transparent;
}

.item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--hud-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 79, 163, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.item.is-equipped {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 22px -12px var(--accent-2);
}

.item__preview {
  height: 62px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--swatch, #221436);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.item__preview::after {
  content: "";
  position: absolute;
  inset: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 4px;
}

.item__name {
  font-family: var(--font-display);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.item__desc {
  flex: 1;
  color: var(--ink-dim);
  font-size: 11px;
  line-height: 1.45;
}

.item__buy {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(69, 230, 130, 0.5);
  border-radius: 9px;
  background: rgba(23, 135, 72, 0.28);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.18s ease, transform 0.18s ease;
}

.item__buy:hover:not(:disabled) {
  background: rgba(49, 194, 108, 0.42);
  transform: translateY(-1px);
}

.item__buy:disabled {
  cursor: default;
  border-color: var(--hud-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-dim);
}

.item__buy.is-equipped {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(41, 231, 224, 0.1);
}

.item__buy.is-poor {
  border-color: rgba(255, 92, 112, 0.35);
  color: #ff91a0;
  background: rgba(255, 92, 112, 0.07);
}

.item__tag {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(41, 231, 224, 0.18);
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.item {
  position: relative;
}

.shop__foot {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--hud-line);
  color: var(--ink-dim);
  font-size: 11px;
  line-height: 1.5;
}

.shop__foot b {
  color: #7dffab;
}

/* --- Toast a efekty ------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  padding: 11px 18px;
  border: 1px solid var(--hud-line);
  border-radius: 10px;
  background: rgba(12, 7, 24, 0.94);
  box-shadow: var(--shadow), 0 0 30px -10px var(--glow);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  text-align: center;
  max-width: calc(100vw - 32px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body::before {
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 4px);
}

body::after {
  background: radial-gradient(circle at 50% 45%, transparent 38%, rgba(255, 79, 163, 0.16) 78%, rgba(41, 231, 224, 0.12) 100%);
}

html[data-fx="scanlines"] body::before {
  opacity: 0.5;
}

html[data-fx="bloom"] body::after {
  opacity: 1;
}

/* --- Animace -------------------------------------------------------------- */

@keyframes breathe {
  0%, 100% { opacity: 0.42; transform: scale(0.96); }
  50% { opacity: 0.68; transform: scale(1.04); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

@keyframes water-shift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 40px 0, 0 14px; }
}

@keyframes bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes pulse {
  0% { opacity: 0.9; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.25); }
}

@keyframes cash-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes cash-in {
  from { opacity: 0; scale: 0.4; }
  to { opacity: 1; scale: 1; }
}

@keyframes cash-out {
  to { opacity: 0; scale: 0.5; translate: 0 -18px; }
}

@keyframes cash-collect {
  to { opacity: 0; scale: 1.6; translate: 0 -40px; }
}

@keyframes rise {
  0% { opacity: 0; transform: translate(-50%, -20%) scale(0.7); }
  20% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -190%) scale(1); }
}

/* --- Responzivita --------------------------------------------------------- */

@media (max-width: 700px) {
  :root {
    --size: clamp(210px, min(72vw, 44vh), 340px);
  }

  .brand__sub,
  .wallet__currency,
  .hud-btn span {
    display: none;
  }

  .brand {
    padding: 7px 11px 7px 8px;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
  }

  .palm {
    transform: scale(0.65);
    transform-origin: bottom left;
  }

  .palm--right {
    transform: scale(0.6) scaleX(-1);
    transform-origin: bottom right;
  }

  .shop__head {
    padding: 18px 52px 14px 16px;
  }

  .shop__items {
    padding: 14px;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  :root {
    --size: clamp(210px, 46vh, 360px);
  }

  .panel {
    padding: 9px 20px;
  }

  .time {
    font-size: clamp(30px, 4.6vh, 44px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
