/* =============== GLOBAL =============== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #020617;
  color: #e5e7eb;
}

.hidden {
  display: none !important;
}

.screen {
  min-height: 100vh;
}

/* =============== INTRO =============== */
.intro-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(circle at top, #111827 0%, #020617 45%, #000 100%);
}

.intro-inner {
  max-width: 640px;
  text-align: center;
}

.intro-title {
  font-size: clamp(32px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.intro-title span {
  color: #0046ff;
}

.intro-text {
  font-size: 16px;
  color: #94a3b8;
  margin-bottom: 24px;
}

/* Primary button */
.primary-btn {
  padding: 11px 24px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, #38bdf8, #0ea5e9);
  color: #f9fafb;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(15,23,42,0.9);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* === INPUT APPEARING IN INTRO === */
.intro-form {
  margin-top: 20px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.97);
  transition: opacity .35s ease, transform .35s cubic-bezier(.15,.75,.35,1.2);
}

.intro-form-appear {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0px) scale(1) !important;
}

.intro-input-wrap {
  width: 100%;
  position: relative;
  margin-bottom: 14px;
}

.intro-input-wrap span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 15px;
}

#handle-input {
  width: 100%;
  padding: 12px 14px 12px 36px;
  background: #020617;
  color: #e2e8f0;
  border-radius: 12px;
  border: 1px solid #334155;
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
}

#handle-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.38);
}

.error-msg {
  margin-top: 8px;
  font-size: 13px;
  color: #f97373;
}

/* =============== HANDLE SCREEN =============== */
.handle-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 80px;
  background: radial-gradient(circle at top, #0f172a 0%, #020617 50%, #000 100%);
}

.handle-panel {
  width: 100%;
  max-width: 420px;
  padding: 24px 22px 22px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top, rgba(56,189,248,0.26), transparent 60%),
    rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.4);
  box-shadow: 0 20px 48px rgba(15,23,42,0.9);
}

.handle-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.handle-input-wrap {
  display: flex;
  align-items: center;
  background: #020617;
  border-radius: 12px;
  border: 1px solid #334155;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.handle-input-wrap span {
  margin-right: 4px;
  color: #64748b;
}

#handle-input::placeholder {
  color: #64748b;
}

.handle-panel .primary-btn {
  width: 100%;
  margin-top: 4px;
}

/* =============== LOADING =============== */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, #020617 0%, #000 100%);
}

.loading-inner {
  text-align: center;
}

.loading-orb {
  width: 80px;
  height: 80px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: radial-gradient(circle, #38bdf8, #0ea5e9);
  box-shadow: 0 0 40px rgba(56,189,248,0.7);
  animation: pulseOrb 1.4s ease-in-out infinite;
}

@keyframes pulseOrb {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

.loading-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.loading-subtitle {
  font-size: 15px;
  color: #94a3b8;
}

/* =============== SLIDES (WRAPPED) =============== */
.slide {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  opacity: 0;
  transform: scale(0.96);
  filter: blur(1px);
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}

/* background variations */
.slide-posts {
  background: radial-gradient(circle at top left, #4c1d95 0%, #020617 60%, #000 100%);
}
.slide-views {
  background: radial-gradient(circle at top right, #0f766e 0%, #020617 60%, #000 100%);
}
.slide-likes {
  background: radial-gradient(circle at top, #b91c1c 0%, #020617 60%, #000 100%);
}
.slide-engagement {
  background: radial-gradient(circle at bottom left, #a21caf 0%, #020617 60%, #000 100%);
}
.slide-score {
  background: radial-gradient(circle at center, #0369a1 0%, #020617 60%, #000 100%);
}
.slide-arch {
  background: radial-gradient(circle at top, #7c2d12 0%, #020617 60%, #000 100%);
}
.slide-rank {
  background: radial-gradient(circle at bottom right, #eab308 0%, #020617 60%, #000 100%);
}

/* dot grid */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(148,27,255,0.4) 1px, transparent 0);
  background-size: 4px 4px;
  opacity: 0.2;
  mix-blend-mode: screen;
  pointer-events: none;
}

.slide--active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.slide--transition-out {
  opacity: 0 !important;
  transform: scale(1.04) !important;
  filter: blur(2px) !important;
}

.slide-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  text-align: left;
}

.slide-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.slide-number {
  font-size: clamp(72px, 15vw, 140px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: #f9fafb;
  text-shadow: 0 0 18px rgba(15,23,42,0.9);
}

.slide-number.small {
  font-size: clamp(48px, 10vw, 88px);
}

.slide-caption {
  font-size: 18px;
  max-width: 540px;
  line-height: 1.4;
  color: #f9fafb;
  margin-bottom: 24px;
}

.slide-value {
  background: rgba(255,255,255,0.14);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

/* =============== FINAL SCREEN (SUMMARY + CARD) =============== */
.final-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 40px;
  background:
    radial-gradient(circle at top, rgba(56,189,248,0.2), transparent 60%),
    #020617;
  position: relative;
}

.final-inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  width: 100%;
  max-width: 1100px;
}

/* summary text */
.final-summary {
  max-width: 420px;
  font-size: 16px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.final-summary.show {
  opacity: 1;
  transform: translateY(0);
}

.final-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.final-line {
  margin: 4px 0;
  opacity: 0;
  transform: translateX(-12px);
  animation: finalLine .55s ease forwards;
}

.final-line:nth-of-type(2) { animation-delay: .08s; }
.final-line:nth-of-type(3) { animation-delay: .16s; }
.final-line:nth-of-type(4) { animation-delay: .24s; }
.final-line:nth-of-type(5) { animation-delay: .32s; }
.final-line:nth-of-type(6) { animation-delay: .40s; }
.final-line:nth-of-type(7) { animation-delay: .48s; }

@keyframes finalLine {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.final-line strong {
  color: #38bdf8;
}

/* again button */
.again-btn {
  margin-top: 28px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
}

/* responsive */
@media (max-width: 900px) {
  .final-inner {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .final-summary {
    max-width: 100%;
  }
}

/* =============== CARD (HOLOGRAM) =============== */
.collectible-card {
  position: relative;
  width: min(360px, 90vw);
  padding: 18px;
  border-radius: 18px;
  border: 3px solid #38bdf8;
  background:
    radial-gradient(circle at 0 0, rgba(56,189,248,0.2), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(168,85,247,0.18), transparent 60%),
    #020617;
  box-shadow: 0 0 30px rgba(56,189,248,0.6);
  overflow: hidden;
}

.collectible-card::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  height: 40%;
  top: -40%;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(148, 227, 255, 0.8),
    transparent
  );
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: holoScan 1.8s ease-out 0.4s forwards;
}

.hologram-enter {
  animation: holoEnter 0.7s ease-out forwards;
}

@keyframes holoEnter {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    filter: blur(10px);
  }
  40% {
    opacity: 1;
    transform: scale(1.03) translateY(0);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: none;
  }
}

@keyframes holoScan {
  0% {
    opacity: 0;
    transform: translateY(-120%);
  }
  15% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateY(140%);
  }
}

.cc-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cbd5f5;
  margin-bottom: 10px;
  opacity: 0.85;
}

.cc-avatar img {
  width: 100%;
  border-radius: 14px;
  border: 2px solid rgba(15,23,42,0.9);
  box-shadow: 0 0 18px rgba(15,23,42,0.9);
  object-fit: cover;
}

.cc-info {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
}

.cc-bars {
  margin-top: 12px;
}

.bar {
  margin-top: 6px;
  padding: 6px 6px 5px;
  border-radius: 8px;
  background: rgba(15,23,42,0.9);
  border: 1px solid #1e293b;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cbd5f5;
}

.bar-fill {
  margin-top: 4px;
  height: 6px;
  border-radius: 4px;
  background: #38bdf8;
}

.cc-stats {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  font-size: 12px;
  color: #e5e7eb;
}

.cc-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 10px;
  opacity: 0.7;
}

/* FLOATING SKINS BACKGROUND — ABOVE GRADIENTS, BELOW CONTENT */
#bg-floating {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;

  z-index: 1;          /* ⬅ Canvas теперь над фоновыми градиентами */
  pointer-events: none;

  opacity: 0.5;       /* чуть лучше видно */
}

.final-buttons {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.small-btn {
  padding: 8px 18px;
  font-size: 14px;
}
