/* ============================================================
   Hello App — Holographic Edition
   Тёмная тема, glassmorphism, голографические градиенты
   ============================================================ */

:root {
  --accent-1: #22d3ee;
  --accent-2: #818cf8;
  --accent-3: #e879f9;

  /* Перекрашиваются из app.js при смене палитры */
  --blob-1: rgba(34, 211, 238, 0.5);
  --blob-2: rgba(129, 140, 248, 0.5);
  --blob-3: rgba(232, 121, 249, 0.34);
  --orb-glow: rgba(129, 140, 248, 0.35);
  --dot: #a5b4fc;
  --sheen: linear-gradient(
    100deg,
    #67e8f9 0%,
    #a5b4fc 22%,
    #f0abfc 40%,
    #fde68a 55%,
    #f0abfc 70%,
    #a5b4fc 86%,
    #67e8f9 100%
  );

  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.32);

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  background: #05060a;
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* ---------- Аврора-фон ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  filter: blur(90px);
  opacity: 0.85;
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora__blob--1 {
  width: 55vmax;
  height: 55vmax;
  left: -12vmax;
  top: -14vmax;
  background: radial-gradient(circle at 30% 30%, var(--blob-1), transparent 65%);
  animation: drift1 26s var(--ease-out) infinite alternate;
}

.aurora__blob--2 {
  width: 48vmax;
  height: 48vmax;
  right: -14vmax;
  top: 8vmax;
  background: radial-gradient(circle at 60% 40%, var(--blob-2), transparent 65%);
  animation: drift2 32s var(--ease-out) infinite alternate;
}

.aurora__blob--3 {
  width: 50vmax;
  height: 50vmax;
  left: 22vmax;
  bottom: -22vmax;
  background: radial-gradient(circle at 50% 50%, var(--blob-3), transparent 65%);
  animation: drift3 38s var(--ease-out) infinite alternate;
}

@keyframes drift1 {
  to { transform: translate(14vmax, 10vmax) scale(1.18) rotate(18deg); }
}
@keyframes drift2 {
  to { transform: translate(-12vmax, 14vmax) scale(0.86) rotate(-22deg); }
}
@keyframes drift3 {
  to { transform: translate(-16vmax, -12vmax) scale(1.22) rotate(14deg); }
}

/* ---------- Частицы и виньетка ---------- */
#bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- Сцена ---------- */
.stage {
  position: relative;
  z-index: 3;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 26px 28px 34px;
}

/* ---------- Верхняя панель ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: stretch;
  justify-content: center;
  animation: rise 1s var(--ease-out) both;
}

.topbar__brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.topbar__tag {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------- Герой ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: auto;
}

.hero__orb {
  width: min(46vmin, 360px);
  height: min(46vmin, 360px);
  margin-bottom: 14px;
  filter: drop-shadow(0 0 40px var(--orb-glow));
  animation: orb-in 1.6s var(--ease-out) both;
}

.hero__title {
  font-size: clamp(44px, 10vw, 118px);
  font-weight: 700;
  /* v7: line-height < 1 + background-clip:text обрезали нижний хвост
     буквы «g» — глиф выходил за бокс элемента, а фон (он же видимый
     текст, т.к. color: transparent) рисуется только внутри бокса.
     Даём запас по высоте: line-height >= 1 + padding снизу. */
  line-height: 1.12;
  letter-spacing: -0.04em;
  padding-bottom: 0.12em;

  /* Голографический градиент текста (перекрашивается из app.js) */
  background: var(--sheen);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    holosheen 7s linear infinite,
    rise 1.2s 0.15s var(--ease-out) both;
  will-change: background-position;
}

.hero__title-dot {
  color: var(--dot);
  -webkit-text-fill-color: currentColor;
  background: none;
}

.hero__subtitle {
  margin-top: 14px;
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  animation: rise 1.2s 0.35s var(--ease-out) both;
}

.hero__hint {
  margin-top: 26px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  animation: rise 1.2s 0.55s var(--ease-out) both;
}

@keyframes holosheen {
  0%   { background-position: 0% center; }
  100% { background-position: -220% center; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes orb-in {
  from { opacity: 0; transform: scale(0.7); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Нижний док ---------- */
.dock {
  display: flex;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: rise 1.2s 0.7s var(--ease-out) both;
}

.dock__swatch {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  outline-offset: 3px;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    opacity 0.35s var(--ease-out);
}

.dock__swatch:hover {
  transform: translateY(-3px) scale(1.08);
}

.dock__swatch:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
}

.dock__swatch--aurora {
  background: conic-gradient(from 210deg, #22d3ee, #818cf8, #e879f9, #22d3ee);
}

.dock__swatch--nebula {
  background: conic-gradient(from 210deg, #fb7185, #a855f7, #60a5fa, #fb7185);
}

.dock__swatch--chrome {
  background: conic-gradient(from 210deg, #f8fafc, #facc15, #2dd4bf, #f8fafc);
}

.dock__swatch {
  opacity: 0.55;
  box-shadow: 0 0 0 0 transparent;
}

.dock__swatch.is-active {
  opacity: 1;
  transform: scale(1.12);
  box-shadow:
    0 0 18px 2px rgba(255, 255, 255, 0.35),
    0 0 30px 4px currentColor;
}

.dock__swatch--aurora.is-active { color: #67e8f9; }
.dock__swatch--nebula.is-active  { color: #c084fc; }
.dock__swatch--chrome.is-active  { color: #facc15; }

/* ---------- Доступность ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Holo-ship (MBA83 CDO02) ---------- */
#ship {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Holo-battle (НЛО XEN-07 + космический бой) ---------- */
#battle {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Летающая тарелка (клик → игра) ---------- */
.saucer {
  position: fixed;
  right: 30px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--accent-1, #22d3ee);
  text-decoration: none;
  cursor: pointer;
  animation: saucer-levitate 6.5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px currentColor);
  transition: filter 0.4s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.saucer:hover {
  filter: drop-shadow(0 0 24px currentColor);
}

.saucer__svg {
  width: 120px;
  height: auto;
}

.saucer__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 5px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.saucer:hover .saucer__label {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.32);
}

@keyframes saucer-levitate {
  0%   { transform: translateY(0) rotate(-3deg); }
  50%  { transform: translateY(-16px) rotate(3deg); }
  100% { transform: translateY(0) rotate(-3deg); }
}

@media (max-width: 640px) {
  .saucer { right: 18px; bottom: 16px; }
  .saucer__svg { width: 88px; }
}
