/* ═══════════════════════════════════════════════════════════════════════
   hppy App Release Party Visualizer — Design System & Styles
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand Tokens (hppy 2026 Styleguide) */
  --hppy-navy: #222d5a;
  --hppy-navy-rgb: 34, 45, 90;
  --hppy-navy-dark: #121833;
  --hppy-navy-deep: #0a0d1c;
  --hppy-navy-70: #4e5680;
  --hppy-navy-45: #7a80a6;

  --hppy-safran: #fab800;
  --hppy-safran-rgb: 250, 184, 0;
  --hppy-safran-70: #fccd4d;
  --hppy-safran-45: #fddf8c;
  --hppy-safran-20: #fef1cc;
  --hppy-safran-glow: rgba(250, 184, 0, 0.4);

  --hppy-white: #ffffff;
  --hppy-glass-bg: rgba(25, 34, 70, 0.68);
  --hppy-glass-border: rgba(250, 184, 0, 0.22);
  --hppy-card-bg: rgba(18, 24, 51, 0.85);

  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 30px rgba(250, 184, 0, 0.25);
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);

  --ease-spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--hppy-navy-deep);
  color: var(--hppy-white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fullscreen Background Canvases */
.fullscreen-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#ambient-canvas {
  z-index: 0;
  opacity: 0.85;
}

#confetti-canvas {
  z-index: 100;
}

/* Floating Emoji Rain Overlay */
.floating-emojis-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.floating-emoji {
  position: absolute;
  bottom: -50px;
  font-size: 38px;
  user-select: none;
  animation: floatUp 4.5s ease-out forwards;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-80px) scale(1.2) rotate(10deg);
  }
  80% {
    opacity: 0.9;
    transform: translateY(-80vh) scale(1) rotate(-15deg);
  }
  100% {
    transform: translateY(-105vh) scale(0.8) rotate(20deg);
    opacity: 0;
  }
}

/* Main Container */
.party-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

/* Top Navigation / Brand Header */
.party-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--hppy-glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--hppy-glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-smooth), opacity 0.4s ease;
}

.party-header.hidden-hud {
  transform: translateY(-110%);
  opacity: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(34, 45, 90, 0.9);
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(250, 184, 0, 0.35);
  box-shadow: 0 0 16px rgba(250, 184, 0, 0.2);
}

.brand-logo {
  height: 28px;
  width: auto;
  color: var(--hppy-safran);
  filter: drop-shadow(0 0 6px rgba(250, 184, 0, 0.5));
}

.party-tag {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--hppy-safran);
  background: rgba(250, 184, 0, 0.15);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(250, 184, 0, 0.3);
}

.chat-info-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 600;
  max-width: 280px;
}

.chat-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2dd36f;
  box-shadow: 0 0 8px #2dd36f;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Hype Gauge */
.hype-gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 220px;
}

.hype-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--hppy-safran);
  text-transform: uppercase;
}

.hype-rate {
  font-weight: 500;
  font-size: 11px;
  opacity: 0.8;
  color: var(--hppy-white);
}

.hype-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.hype-bar-fill {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, #fab800, #ff4961, #ff0077);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-spring);
  box-shadow: 0 0 10px rgba(250, 184, 0, 0.6);
}

/* Header Stats */
.header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
}

.stat-val {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--hppy-safran);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-toggles {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn:hover {
  color: var(--hppy-white);
  background: rgba(255, 255, 255, 0.08);
}

.mode-btn.active {
  background: var(--hppy-safran);
  color: var(--hppy-navy);
  box-shadow: 0 2px 10px rgba(250, 184, 0, 0.4);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--hppy-white);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(250, 184, 0, 0.2);
  border-color: var(--hppy-safran);
  transform: scale(1.08);
}

/* ── STAGE & VIEWS ───────────────────────────────────────────────────────── */
.party-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.party-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
  transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth), visibility 0.4s;
  pointer-events: none;
}

.party-view.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* ── MODE 1: STREAM WATERFALL ────────────────────────────────────────────── */
.stream-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  scroll-behavior: smooth;
}

.stream-container::-webkit-scrollbar {
  width: 6px;
}

.stream-container::-webkit-scrollbar-thumb {
  background: rgba(250, 184, 0, 0.3);
  border-radius: 3px;
}

/* Message Card */
.message-card {
  width: 100%;
  max-width: 820px;
  background: var(--hppy-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transform-origin: center top;
  animation: cardEntrance 0.55s var(--ease-spring) forwards;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.message-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(250, 184, 0, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(250, 184, 0, 0.2);
}

.message-card.is-new {
  border-color: var(--hppy-safran);
  box-shadow: 0 0 35px rgba(250, 184, 0, 0.35), 0 12px 36px rgba(0, 0, 0, 0.5);
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 17px;
  color: var(--hppy-navy);
  background: linear-gradient(135deg, var(--hppy-safran), var(--hppy-safran-70));
  border: 2px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--hppy-white);
}

.message-time {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.new-badge {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.1em;
  background: var(--hppy-safran);
  color: var(--hppy-navy);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  animation: pulseNew 1.5s infinite;
}

@keyframes pulseNew {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); box-shadow: 0 0 12px var(--hppy-safran); }
}

.card-body {
  font-size: 20px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
  word-break: break-word;
}

/* Image Attachment Gallery */
.card-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.media-thumbnail {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  position: relative;
  aspect-ratio: 16 / 10;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(250, 184, 0, 0.3);
}

.media-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.media-thumbnail:hover img {
  transform: scale(1.06);
}

/* Reaction Pills */
.card-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.reaction-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--hppy-white);
  animation: reactionPop 0.4s var(--ease-spring);
}

.reaction-pill.highlight {
  background: rgba(250, 184, 0, 0.2);
  border-color: var(--hppy-safran);
  color: var(--hppy-safran);
}

@keyframes reactionPop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: auto;
  position: relative;
}

.empty-logo {
  height: 50px;
  margin-bottom: 24px;
  filter: drop-shadow(0 0 20px rgba(250, 184, 0, 0.4));
}

.empty-state h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--hppy-white);
}

.empty-state p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Primary Button */
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--hppy-safran);
  color: var(--hppy-navy);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(250, 184, 0, 0.4);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(250, 184, 0, 0.6);
}

/* ── MODE 2: DJ SPOTLIGHT ────────────────────────────────────────────────── */
.spotlight-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 24px 20px;
  position: relative;
}

.spotlight-glow-fx {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(250, 184, 0, 0.25) 0%, rgba(34, 45, 90, 0) 70%);
  filter: blur(60px);
  pointer-events: none;
}

.spotlight-hero-card {
  width: 100%;
  max-width: 960px;
  background: rgba(20, 27, 58, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: var(--radius-xl);
  border: 2px solid var(--hppy-safran);
  padding: 40px 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(250, 184, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: auto;
  position: relative;
  z-index: 5;
  animation: heroPulse 4s infinite ease-in-out;
}

@keyframes heroPulse {
  0%, 100% { border-color: var(--hppy-safran); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 50px rgba(250, 184, 0, 0.35); }
  50% { border-color: #ff4961; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 70px rgba(255, 73, 97, 0.45); }
}

.spotlight-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.spotlight-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  background: var(--hppy-safran);
  color: var(--hppy-navy);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(250, 184, 0, 0.5);
  overflow: hidden;
}

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

.spotlight-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotlight-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--hppy-white);
}

.spotlight-time {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.spotlight-badge {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.12em;
  padding: 6px 16px;
  background: rgba(250, 184, 0, 0.2);
  color: var(--hppy-safran);
  border: 1px solid var(--hppy-safran);
  border-radius: var(--radius-full);
}

.spotlight-text {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--hppy-white);
  word-break: break-word;
}

.spotlight-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-height: 320px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.spotlight-reactions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Bottom Ticker Bar */
.ticker-bar {
  width: 100%;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ticker-label {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.1em;
  background: var(--hppy-safran);
  color: var(--hppy-navy);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-right: 16px;
  flex-shrink: 0;
}

.ticker-content {
  white-space: nowrap;
  overflow: hidden;
  animation: marquee 25s linear infinite;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ── MODE 3: LIVING MESSAGE CLOUD (TAG CLOUD) ────────────────────────── */
.cloud-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 40px 70px;
}

.cloud-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 184, 0, 0.2) 0%, rgba(34, 45, 90, 0.25) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  animation: cloudAmbientPulse 8s ease-in-out infinite alternate;
}

@keyframes cloudAmbientPulse {
  0% { transform: translate(-50%, -50%) scale(0.85); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.cloud-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  gap: 16px 20px;
  max-width: 1440px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 20px;
  position: relative;
  z-index: 5;
  scrollbar-width: none;
}

.cloud-cluster::-webkit-scrollbar {
  display: none;
}

/* Base Cloud Tag */
.cloud-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(22, 30, 64, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(250, 184, 0, 0.3);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(250, 184, 0, 0.1);
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  position: relative;
  animation: tagBreathe 4s ease-in-out infinite;
}

.cloud-tag:nth-child(2n) {
  animation-duration: 4.6s;
  animation-delay: -0.8s;
}

.cloud-tag:nth-child(3n) {
  animation-duration: 5.2s;
  animation-delay: -1.6s;
}

.cloud-tag:nth-child(5n) {
  animation-duration: 3.8s;
  animation-delay: -2.4s;
}

@keyframes tagBreathe {
  0%, 100% {
    transform: scale(1) translateY(0);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 14px rgba(250, 184, 0, 0.12);
  }
  50% {
    transform: scale(1.04) translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 26px rgba(250, 184, 0, 0.32);
    border-color: rgba(250, 184, 0, 0.6);
  }
}

.cloud-tag:hover {
  transform: scale(1.12) translateY(-6px) !important;
  z-index: 50;
  border-color: var(--hppy-safran);
  background: rgba(34, 45, 90, 0.96);
  box-shadow: 0 0 35px rgba(250, 184, 0, 0.6), 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* Hierarchy Sizes */
.cloud-tag.is-hero {
  order: -1;
  background: linear-gradient(135deg, rgba(34, 45, 90, 0.96), rgba(46, 58, 107, 0.96));
  border: 2.5px solid var(--hppy-safran);
  padding: 16px 28px;
  font-size: 20px;
  box-shadow: 0 0 50px rgba(250, 184, 0, 0.65), 0 14px 40px rgba(0, 0, 0, 0.6);
  animation: heroTagEntrance 0.65s var(--ease-spring) forwards, heroPulseGlow 3s infinite ease-in-out 0.65s;
  z-index: 20;
}

@keyframes heroTagEntrance {
  0% {
    opacity: 0;
    transform: scale(0.2) translateY(50px);
  }
  65% {
    opacity: 1;
    transform: scale(1.22) translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes heroPulseGlow {
  0%, 100% {
    transform: scale(1) translateY(0);
    box-shadow: 0 0 45px rgba(250, 184, 0, 0.6), 0 14px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--hppy-safran);
  }
  50% {
    transform: scale(1.06) translateY(-8px);
    box-shadow: 0 0 75px rgba(250, 184, 0, 0.85), 0 20px 50px rgba(0, 0, 0, 0.7);
    border-color: #ffd534;
  }
}

.cloud-tag.is-recent {
  padding: 12px 22px;
  font-size: 16px;
  border-color: rgba(250, 184, 0, 0.55);
  background: rgba(28, 38, 78, 0.92);
}

.cloud-tag.is-standard {
  padding: 10px 18px;
  font-size: 15px;
}

.cloud-tag.is-compact {
  padding: 8px 14px;
  font-size: 13px;
  opacity: 0.9;
}

/* Card-style Photo Tag in Cloud */
.cloud-tag.has-photo {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  border-radius: 20px;
  padding: 12px;
  background: rgba(18, 25, 55, 0.94);
}

.cloud-tag-photo-frame {
  width: 240px;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(250, 184, 0, 0.4);
  background: #000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.cloud-tag.is-hero .cloud-tag-photo-frame {
  width: 360px;
  height: 230px;
  border-radius: 18px;
  border: 3px solid var(--hppy-safran);
  box-shadow: 0 0 35px rgba(250, 184, 0, 0.5);
}

.cloud-tag-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cloud-photo-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cloud-tag-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* Inside Tag Elements */
.cloud-tag-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.cloud-tag.is-hero .cloud-tag-avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
  border: 2px solid var(--hppy-safran);
}

.cloud-tag-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cloud-tag-text {
  color: var(--hppy-white);
  font-weight: 500;
  word-break: break-word;
  line-height: 1.35;
}

.cloud-tag.is-hero .cloud-tag-text {
  font-weight: 600;
  color: #ffffff;
}

.cloud-tag-reactions {
  display: flex;
  gap: 4px;
  font-size: 13px;
  margin-left: auto;
}

/* Legend Pill */
.cloud-legend {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(34, 45, 90, 0.8);
  backdrop-filter: blur(16px);
  padding: 8px 24px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(250, 184, 0, 0.3);
  font-size: 13px;
  font-weight: 600;
  color: var(--hppy-safran);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.pulse-dot-safran {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hppy-safran);
  box-shadow: 0 0 10px var(--hppy-safran);
  animation: pulseDot 2s infinite ease-in-out;
}

/* ── MODE 4: PROJECTOR SPLIT ─────────────────────────────────────────────── */
.split-layout {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 24px;
  padding: 24px 32px;
  overflow: hidden;
}

.split-hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-hero-card {
  background: var(--hppy-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(250, 184, 0, 0.3);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.split-logo {
  height: 42px;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 16px rgba(250, 184, 0, 0.4));
}

.split-brand h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--hppy-white);
  margin-bottom: 6px;
}

.split-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
}

.qr-code-box {
  background: var(--hppy-white);
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px rgba(250, 184, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.qr-code-frame svg {
  display: block;
  width: 190px;
  height: 190px;
}

.qr-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  color: var(--hppy-navy);
  letter-spacing: 0.05em;
}

.party-metrics-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.party-metrics-card h3 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hppy-safran);
  margin-bottom: 12px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.metric-val {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  color: var(--hppy-white);
}

.metric-lbl {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.split-stream-panel {
  height: 100%;
  overflow-y: auto;
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── PHOTO LIGHTBOX ──────────────────────────────────────────────────────── */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 13, 28, 0.92);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-card {
  max-width: 90vw;
  max-height: 90vh;
  background: var(--hppy-navy);
  border-radius: var(--radius-xl);
  border: 2px solid var(--hppy-safran);
  box-shadow: 0 0 60px rgba(250, 184, 0, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  padding: 20px 24px;
  background: rgba(0, 0, 0, 0.4);
}

.lightbox-author {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--hppy-safran);
  font-size: 16px;
  margin-bottom: 4px;
}

.lightbox-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

/* ── SETTINGS DRAWER ─────────────────────────────────────────────────────── */
.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: rgba(18, 24, 51, 0.96);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid var(--hppy-glass-border);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 500;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-spring);
}

.settings-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-header h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--hppy-safran);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.drawer-section h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hppy-safran);
  margin-bottom: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.party-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--hppy-white);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.party-input:focus {
  border-color: var(--hppy-safran);
  box-shadow: 0 0 8px rgba(250, 184, 0, 0.3);
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.segmented-control {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 6px;
}

.segment-btn {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.segment-btn.active {
  background: var(--hppy-safran);
  color: var(--hppy-navy);
}

.simulation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sim-btn {
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: var(--hppy-white);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-btn:hover {
  background: rgba(250, 184, 0, 0.2);
  border-color: var(--hppy-safran);
  color: var(--hppy-safran);
}

.section-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  line-height: 1.4;
}

.shortcuts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcuts-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: var(--hppy-safran);
}

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────────────────── */
.party-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.party-toast {
  background: rgba(20, 27, 58, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hppy-safran);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(250, 184, 0, 0.3);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--hppy-white);
  animation: toastIn 0.3s var(--ease-spring) forwards;
}

@keyframes toastIn {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ── RESPONSIVENESS & BEAMER OPTIMIZATIONS ───────────────────────────────── */
@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .split-hero-panel {
    display: none;
  }
}
