/* ============================================================
   «Вынеси меня» — дизайн-система (тёмный navy + бирюза)
   ============================================================ */

:root {
  --bg: #0c1a24;
  --surface: #122633;
  --surface-2: #17303f;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef4f6;
  --dim: #8ca3af;
  --faint: rgba(140, 163, 175, 0.45);

  --teal: #00c2cb;
  --cyan: #22d3ee;
  --pink: #ff4d8d;
  --violet: #8b7cff;
  --lime: #a3e635;
  --danger: #ff5470;

  --grad: linear-gradient(100deg, #00c2cb, #22d3ee);
  --teal-soft: rgba(0, 194, 203, 0.13);

  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;

  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 6px 24px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* мягкая подсветка фона */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50vmax 50vmax at 10% -10%, rgba(0, 194, 203, 0.09), transparent 60%),
    radial-gradient(45vmax 45vmax at 110% 30%, rgba(139, 124, 255, 0.07), transparent 60%),
    radial-gradient(50vmax 50vmax at 30% 115%, rgba(34, 211, 238, 0.06), transparent 60%),
    var(--bg);
}

/* плывущие цветные пятна — подложка для «жидкого стекла» */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg);
  overflow: hidden;
}

.bg-blobs i {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: blob-drift 26s ease-in-out infinite alternate;
}
.bg-blobs i:nth-child(1) { background: rgba(0, 194, 203, 0.16); top: -22%; left: -15%; }
.bg-blobs i:nth-child(2) { background: rgba(139, 124, 255, 0.13); bottom: -25%; right: -10%; animation-delay: -8s; animation-duration: 32s; }
.bg-blobs i:nth-child(3) { background: rgba(34, 211, 238, 0.12); top: 40%; left: 55%; animation-delay: -16s; animation-duration: 38s; opacity: 0.36; }

@keyframes blob-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vw, -6vh) scale(1.15); }
  100% { transform: translate(-6vw, 7vh) scale(0.95); }
}

/* стеклянная поверхность (жидкое стекло) поверх плывущих пятен */
.card.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05) 55%, rgba(255, 255, 255, 0.09));
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 14px 40px rgba(0, 0, 0, 0.3);
}

/* ---------- QR на весь экран (админка, Настройки) ---------- */

.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 16, 23, 0.55);
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  cursor: pointer;
}

.qr-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: clamp(18px, 3vmin, 34px);
  background: linear-gradient(160deg, rgba(0, 194, 203, 0.5), rgba(139, 124, 255, 0.45) 55%, rgba(34, 211, 238, 0.5));
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.5), 0 0 160px rgba(0, 194, 203, 0.3);
}

.qr-overlay img {
  width: min(64vh, 76vw, 780px);
  height: min(64vh, 76vw, 780px);
  background: #ffffff;
  border-radius: 22px;
  padding: clamp(12px, 2vmin, 22px);
  display: block;
}

.qr-overlay-url {
  font-weight: 900;
  font-size: clamp(16px, 2.4vw, 30px);
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(6, 20, 28, 0.5);
  word-break: break-all;
  text-align: center;
}

.qr-overlay-hint {
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.08em;
}

::selection { background: rgba(0, 194, 203, 0.35); }

.hidden { display: none !important; }

/* ---------- типографика ---------- */

.display {
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--dim); }
.small { font-size: 13px; }

/* логотип шоу (белый png) — на тёмном фоне используется как есть */
.img-logo { display: block; }

/* ---------- карточки ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { background: #1c3a4c; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  border: none;
  background: var(--grad);
  color: #06222b;
  box-shadow: 0 8px 26px rgba(0, 194, 203, 0.28);
}
.btn-primary:hover { box-shadow: 0 10px 34px rgba(0, 194, 203, 0.4); background: var(--grad); }

.btn-danger { border-color: rgba(255, 84, 112, 0.4); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 84, 112, 0.1); }

.btn-ghost { background: transparent; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: var(--r-sm); }

/* ---------- поля ввода ---------- */

.input, .textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus, .textarea:focus {
  border-color: rgba(0, 194, 203, 0.7);
  box-shadow: 0 0 0 4px rgba(0, 194, 203, 0.14);
}

.input::placeholder, .textarea::placeholder { color: var(--faint); }

.label {
  display: block;
  margin: 0 0 8px 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- тосты — стеклянная капсула с иконкой ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px) scale(0.92);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  background: rgba(18, 38, 51, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(0, 194, 203, 0.3);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  max-width: min(90vw, 480px);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%);
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad);
  color: #06222b;
  flex-shrink: 0;
}
#toast.err { border-color: rgba(255, 84, 112, 0.4); color: #ffd7de; }
#toast.err .toast-ic { background: linear-gradient(100deg, #ff5470, #ff7a9c); color: #fff; }

/* ---------- скроллбар ---------- */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- анимации ---------- */

@keyframes pop-in {
  0% { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-teal {
  0%, 100% { box-shadow: 0 8px 26px rgba(0, 194, 203, 0.28); }
  50% { box-shadow: 0 8px 38px rgba(34, 211, 238, 0.45); }
}

.pop-in { animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
