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

:root {
  color-scheme: dark;
  --bg: #0b0b16;
  --text: #f6f5ff;
  --muted: rgba(246, 245, 255, 0.7);
  --accent: #9cff6b;
  --accent-2: #7c6bff;
  --accent-3: #ff8ab3;
  --glass: rgba(255, 255, 255, 0.08);
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

.fullscreen-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.fullscreen-fab:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.hero-bar {
  position: fixed;
  top: 28px;
  left: 40px;
  right: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Unbounded", sans-serif;
  z-index: 5;
}

.hero-logo {
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.dots {
  position: fixed;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 6;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.slides {
  position: relative;
  z-index: 2;
}

.slide {
  min-height: 100vh;
  padding: 120px 8vw 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(124, 107, 255, 0.25), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255, 138, 179, 0.25), transparent 60%);
}

/* Slide 1 Special Layout */
#slide-1 {
  transition: background 1.2s cubic-bezier(0.25, 0.1, 0.25, 1); /* Slower, smoother background change */
}

#slide-1.solid-purple-light {
  background: #7c6bff;
}

#slide-1.solid-purple-dark {
  background: #4a3b89;
}

.phase-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.8s ease;
  width: 100%;
  padding: 0 20px;
  transform: translateY(20px) scale(0.95); /* Default exit state */
  filter: blur(10px);
}

.phase-content h1 {
  font-size: clamp(42px, 6vw, 72px);
}

/* Typing cursor effect */
.typing-text {
  display: inline;
  overflow: visible;
  white-space: normal;
  position: relative;
}

.typing-text::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--accent); }
}

/* Phase 1: Intro */
.phase-1-content {
  transform: translateX(0) scale(1);
  filter: blur(0);
}

#slide-1.phase-1 .phase-1-content {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  position: relative;
  pointer-events: auto;
}

/* Phase 2: Horizontal Scroll Effect */
.phase-2-content {
  transform: translateX(100px) scale(0.95); /* Start from right */
}

#slide-1.phase-2 .phase-2-content {
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  position: relative;
  pointer-events: auto;
}

/* When in Phase 2, Phase 1 exits to left */
#slide-1.phase-2 .phase-1-content {
  transform: translateX(-100px) scale(0.9);
  opacity: 0;
  filter: blur(10px);
}

/* Phase 3: Dark Transition */
.phase-3-content {
  text-align: left;
  align-items: center;
  transform: translateY(40px) scale(0.95); /* Enter from below */
}

.phase-3-content h2 {
  max-width: 800px;
  text-align: left;
}

#slide-1.phase-3 .phase-3-content {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  position: relative;
  pointer-events: auto;
  transition-delay: 0.2s; /* Slight delay for content to enter after BG starts */
}

/* Specific Exit for Phase 2 when going to Phase 3 */
#slide-1.phase-3 .phase-2-content {
  transform: translateY(-40px) scale(1.1); /* Move up and grow slightly (dissolve effect) */
  opacity: 0;
  filter: blur(20px);
}

/* Phase 4: Stats (Original) */
.stats-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0, 0.2, 1);
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#slide-1.phase-4 .stats-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

#slide-1.phase-4 .metric-card {
  opacity: 1;
  transform: translateY(0);
}

/* Explicitly hide other phases when one is active to prevent overlap */
#slide-1:not(.phase-1) .phase-1-content,
#slide-1:not(.phase-2) .phase-2-content,
#slide-1:not(.phase-3) .phase-3-content,
#slide-1:not(.phase-4) .stats-content {
  position: absolute !important;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  /* Ensure transitions still play */
}

.slide-inner {
  max-width: 1100px;
  width: 100%;
  display: grid;
  gap: 24px;
  position: relative;
  z-index: 10; /* Ensure content is above background/decorations */
}

.badge {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

h1,
h2 {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  line-height: 1.1;
}

h1 {
  font-size: clamp(42px, 6vw, 72px);
}

h2 {
  font-size: clamp(36px, 4vw, 56px);
}

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

.lead {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--muted);
  max-width: 700px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.metric-card {
  background: var(--glass);
  padding: 20px;
  border-radius: 18px;
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.metric-card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.metric-card.accent-card {
  background: linear-gradient(135deg, rgba(156, 255, 107, 0.2), rgba(124, 107, 255, 0.2));
  border-color: rgba(156, 255, 107, 0.3);
}

.metric-card.accent-card .metric-value {
  color: var(--accent);
}

.metric-card,
.list-card,
.trophy,
.phrase-item,
.sticker-card,
.share-card,
.quote-card,
.stack-card,
.highlight {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
}

.metric-note {
  font-size: 12px;
  color: var(--muted);
}

.dream-scroll-container {
  display: flex;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  overflow: hidden;
  height: 24px;
  position: relative;
  align-items: center;
}

.static-text {
  white-space: nowrap;
}

.scrolling-words-mask {
  height: 24px;
  overflow: hidden;
  position: relative;
  flex: 1;
}

.scrolling-words {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

.scrolling-words span {
  display: block;
  height: 24px;
  line-height: 24px;
  white-space: nowrap;
  color: var(--accent);
}

.scroll-hint {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
  animation: float 2.4s ease-in-out infinite;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  backdrop-filter: blur(12px);
}

.highlight {
  margin-top: 20px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.4), rgba(255, 138, 179, 0.35));
  display: grid;
  gap: 6px;
}

.highlight-title {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.highlight-value {
  font-size: 28px;
  font-weight: 700;
}

.highlight-note {
  color: rgba(255, 255, 255, 0.7);
}

.list-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.list-card {
  padding: 20px;
  border-radius: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.list-icon {
  font-size: 22px;
  line-height: 1;
  margin-top: 2px;
}

.list-info {
  display: grid;
  gap: 6px;
}

.list-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.list-value {
  font-size: 20px;
  font-weight: 600;
}

.list-desc {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.list-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: block;
}

.wave-metric {
  margin-top: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.stack-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(16, 16, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stack-top {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.stack-main {
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0;
}

.stack-note {
  color: var(--muted);
}

.quote-card {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  max-width: 800px;
  margin: 0 auto;
}

.quote-text {
  font-size: clamp(14px, 1.8vw, 18px);
  line-height: 1.6;
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

.quote-author {
  margin-top: 16px;
  text-align: right;
  font-size: 14px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.subtitle {
  color: var(--muted);
  font-size: 16px;
}

.trophy-grid {
  display: grid;
  gap: 16px;
}

.trophy {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
}

.trophy span {
  font-size: 28px;
  line-height: 1;
}

.trophy-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--accent-2);
}

.trophy:has(.trophy-img) span {
  display: none;
}

.trophy-title {
  font-weight: 600;
  font-size: 18px;
}

.trophy-note {
  color: var(--muted);
  font-size: 14px;
}

.progress {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #9cff6b, #7c6bff);
  animation: fill 2s ease-out;
}

.top-phrases {
  display: grid;
  gap: 12px;
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 24px;
}

.phrase-item {
  padding: 12px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phrase-item:hover {
  transform: translateX(10px);
  background: rgba(255, 255, 255, 0.1);
}

.click-hint {
  font-size: 16px;
  animation: bounce-right 1.5s infinite;
  opacity: 0.8;
}

@keyframes bounce-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

.accent-phrase {
  color: #c084fc; /* Фиолетовый оттенок */
  background: rgba(192, 132, 252, 0.15);
  border-color: rgba(192, 132, 252, 0.3);
}

.horror-trigger {
  color: #ff4d4d;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: wavy;
  transition: opacity 0.2s ease;
}

.horror-trigger:hover {
  opacity: 0.8;
}

.horror-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.horror-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.horror-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(255, 0, 0, 0.2);
  animation: shake 0.5s infinite;
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}
.phrase-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.phrase-sheet-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.phrase-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 85vh; /* Covers most of screen */
  background: #1a1a24;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.5);
}

.phrase-sheet.is-open {
  transform: translateY(0);
}

.phrase-sheet-handle-area {
  height: 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  flex-shrink: 0;
}

.phrase-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 99px;
}

.phrase-sheet-content {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  overscroll-behavior-y: contain; /* Prevent scroll chaining to body */
}

.video-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-container:hover .video-controls,
.video-container.playing .video-controls {
  opacity: 1;
}

/* Always show controls on touch devices when paused, or tap to toggle */
.video-container.paused .video-controls {
  opacity: 1;
}

.play-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  font-size: 14px;
  padding-left: 2px; /* optical adjustment for play icon */
}

.play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.progress-bar-container {
  flex-grow: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  overflow: hidden;
  cursor: pointer;
}

.video-progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.1s linear;
}

/* Big center play button overlay when paused */
.video-container::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.video-container.paused::after {
  opacity: 1;
}

.sticker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  background: none;
  border: none;
  backdrop-filter: none;
}

.sticker-link {
  position: relative;
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sticker-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticker-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.sticker-link:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.sticker-link:hover .sticker-overlay {
  opacity: 1;
}

.sticker-stat {
  font-size: 18px;
  color: var(--muted);
  font-weight: 500;
}

.chart {
  display: grid;
  gap: 12px;
  max-width: 360px;
}

.chart-item {
  display: grid;
  gap: 6px;
}

.chart-label {
  font-size: 14px;
  color: var(--muted);
}

.chart-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.chart-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--value);
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8ab3, #7c6bff);
}

.finale {
  text-align: center;
}

/* Vibe Slide Specific */
#vibe-overlay {
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

#vibe-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

#vibe-subtitle {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
  max-width: 600px;
  position: relative; /* Ensure z-index works */
  z-index: 20; /* Ensure it's above overlay */
}

#vibe-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.share-card {
  margin: 24px auto;
  padding: 32px 24px 40px; /* More bottom padding to prevent clipping */
  width: 100%;
  max-width: 360px; /* Limits width to reasonable phone size */
  aspect-ratio: 9/16; /* Enforce 9:16 vertical ratio */
  border-radius: 24px;
  background: linear-gradient(135deg, #1a1a2e, #2a1a3e);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px; /* Slightly reduced gap */
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Background decoration for share card */
.share-card::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(156, 255, 107, 0.2), transparent 70%);
  filter: blur(40px);
}

.share-card::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(124, 107, 255, 0.2), transparent 70%);
  filter: blur(40px);
}

.share-header {
  position: relative;
  z-index: 2;
  text-align: left;
}

.share-logo {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.share-title {
  font-family: "Unbounded", sans-serif;
  font-size: 32px;
  line-height: 1.1;
  color: #9cff6b;
  text-shadow: 0 0 30px rgba(156, 255, 107, 0.4);
  /* background-clip removed for better compatibility */
}

.share-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex-grow: 1;
  align-content: center;
}

.share-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.share-item.wide-item {
  grid-column: span 2;
}

.share-item.highlight-item {
  background: linear-gradient(135deg, rgba(124, 107, 255, 0.25), rgba(30, 30, 50, 0.4));
  border: 1px solid rgba(124, 107, 255, 0.4);
  box-shadow: 0 0 20px rgba(124, 107, 255, 0.2), inset 0 0 15px rgba(124, 107, 255, 0.1);
}

.share-item.green-item {
  background: linear-gradient(135deg, rgba(156, 255, 107, 0.15), rgba(30, 30, 50, 0.4));
  border: 1px solid rgba(156, 255, 107, 0.3);
}

.green-item .share-value {
  color: #9cff6b;
}

.share-item.vibe-item {
  background: #0a0a12;
  border: 1px solid rgba(124, 107, 255, 0.3);
  padding: 10px;
}

.vibe-battle-canvas {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  display: block;
}

.share-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.share-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.highlight-item .share-value {
  background: linear-gradient(90deg, #7c6bff, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.share-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}

.share-note {
  font-family: "Unbounded", sans-serif;
  font-size: 14px;
}

.share-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap; /* Prevent wrapping */
  padding-bottom: 2px; /* Ensure descenders aren't clipped */
}

.share-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: "Manrope", sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #0b0b16;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn.small {
  padding: 8px 14px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.share-result {
  margin-top: 18px;
  display: none;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.share-message {
  font-size: 14px;
  color: #9cff6b;
  background: rgba(156, 255, 107, 0.1);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(156, 255, 107, 0.2);
}

.hero,
.glow,
.deep,
.neon,
.aurora,
.velvet,
.solar,
.finale {
  background: radial-gradient(circle at 20% 20%, rgba(124, 107, 255, 0.25), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(255, 138, 179, 0.25), transparent 60%);
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none; /* Make sure overlay doesn't block clicks */
}

.slide.is-active::after {
  opacity: 1;
}

.slide-inner > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide.is-active .slide-inner > * {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes fill {
  from {
    width: 0;
  }
}

#vibe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 720px) {
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-align: center;
}

.vibe-cards {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 500px;
  margin: 24px auto 0;
}

.vibe-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  padding: 16px 20px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.vibe-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.vibe-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vibe-icon {
  font-size: 24px;
  line-height: 1;
}

.vibe-name {
  font-weight: 700;
  font-size: 16px;
  flex-grow: 1;
  text-align: left;
}

.vibe-percent {
  font-weight: 600;
  color: var(--muted);
}

.vibe-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.vibe-bar {
  height: 100%;
  width: 0; /* Animated to --width */
  background: var(--color);
  border-radius: 99px;
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px var(--color);
}

/* Specific bar styling for dark color visibility */
.vibe-bar[style*="#1a1a1a"] {
  background: #333;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

/* Generic Phased Content Styles */
.phased-item {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Ensure specificity overrides other visibility states */
.slide .phased-item:not(.visible) {
  opacity: 0 !important;
  transform: translateY(20px) !important;
  pointer-events: none !important;
}

.phased-item.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Ensure slide 1 items are hidden initially */
#slide-1 .phased-item {
    opacity: 0;
}

/* Specific Staggering is removed in favor of manual sequential reveal */

/* Add visual cue for scroll hint */
.scroll-hint.phased-content {
  margin-top: 32px;
  font-size: 14px;
  opacity: 0;
  animation: none;
}

.slide.phase-2-active .scroll-hint.phased-content {
  opacity: 0.6;
  animation: bounce 2s infinite 1s; /* Start bouncing after appear */
}

/* Vibe Phase 2 Overlay */
.vibe-overlay {
  position: absolute;
  inset: 0;
  background: #0a0a12;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.vibe-overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: blur(1.2px);
}

.vibe-battle-canvas {
  width: 100%;
  height: 60px;
  border-radius: 12px;
  display: block;
}

.vibe-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.vibe-result {
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vibe-overlay.visible .vibe-result {
  transform: scale(1);
}

.vibe-subtitle {
  margin-top: 16px;
  font-size: 18px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

.vibe-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.tap-hint {
  margin-top: 24px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
  animation: pulse 2s infinite;
  cursor: pointer;
}

/* Fireflies Animation */
.fireflies {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.fireflies span {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: firefly 4s infinite ease-in-out;
}

.fireflies span:nth-child(odd) {
  width: 6px;
  height: 6px;
  background: #ff6b9c; /* Pink */
  box-shadow: 0 0 12px #ff6b9c;
}

.fireflies span:nth-child(even) {
  width: 5px;
  height: 5px;
  background: #9cff6b; /* Green */
  box-shadow: 0 0 10px #9cff6b;
}

/* Randomize firefly positions and delays */
.fireflies span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.fireflies span:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; }
.fireflies span:nth-child(3) { top: 40%; left: 40%; animation-delay: 2s; }
.fireflies span:nth-child(4) { top: 80%; left: 20%; animation-delay: 0.5s; }
.fireflies span:nth-child(5) { top: 10%; left: 90%; animation-delay: 1.5s; }
.fireflies span:nth-child(6) { top: 70%; left: 50%; animation-delay: 2.5s; }
.fireflies span:nth-child(7) { top: 30%; left: 70%; animation-delay: 0.8s; }
.fireflies span:nth-child(8) { top: 50%; left: 10%; animation-delay: 1.2s; }
.fireflies span:nth-child(9) { top: 90%; left: 60%; animation-delay: 0.3s; }
.fireflies span:nth-child(10) { top: 15%; left: 30%; animation-delay: 1.8s; }

@keyframes firefly {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(20px, -40px) scale(0.5); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Animate bars when slide is active */
.slide.is-active .vibe-bar {
  width: var(--width);
}

@media (max-width: 720px) {
  body {
    overflow: hidden;
  }

  .slides {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }

  .slide {
    padding: 100px 8vw 64px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .hero-bar {
    left: 20px;
    right: 20px;
    top: 16px;
  }

  .dots {
    right: 16px;
    transform: translateY(-50%) scale(0.8);
    opacity: 0.9;
  }

  .share-metrics {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
