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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(70, 50, 80, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(60, 45, 70, 0.4) 0%, transparent 50%),
    linear-gradient(165deg, #201820 0%, #281f28 40%, #1a1520 100%);
  color: #f8f6f4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 25% 25%, rgba(220, 200, 180, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(200, 180, 220, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
  pointer-events: none;
  animation: breathe 12s ease-in-out infinite;
}

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

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 85% 30%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 45% 70%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 75% 85%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 25% 90%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 90% 55%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 10% 60%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 60% 15%, rgba(255, 255, 255, 0.3), transparent);
  pointer-events: none;
  animation: sparkle 6s ease-in-out infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(32, 24, 40, 0.4) 70%, rgba(26, 18, 32, 0.85) 100%),
    linear-gradient(to top, rgba(26, 18, 32, 0.6) 0%, transparent 15%),
    linear-gradient(to bottom, rgba(26, 18, 32, 0.6) 0%, transparent 15%),
    linear-gradient(to left, rgba(26, 18, 32, 0.6) 0%, transparent 15%),
    linear-gradient(to right, rgba(26, 18, 32, 0.6) 0%, transparent 15%);
  z-index: 0;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.5; }
  25% { opacity: 0.9; }
  50% { opacity: 0.4; }
  75% { opacity: 0.85; }
}

.container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

h1 {
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #c0b8b0;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.video-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  isolation: isolate;
}

.video-wrap::before {
  content: '';
  position: absolute;
  inset: -45px;
  border-radius: 55px;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    transparent 25%,
    rgba(50, 20, 32, 0.04) 40%,
    rgba(45, 18, 28, 0.12) 50%,
    rgba(42, 16, 26, 0.25) 60%,
    rgba(38, 14, 24, 0.45) 70%,
    rgba(34, 12, 22, 0.65) 80%,
    rgba(30, 10, 20, 0.8) 90%);
  z-index: 1;
  filter: blur(6px);
}

.video-wrap::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  pointer-events: none;
  z-index: 2;
  box-shadow:
    inset 0 0 30px 12px rgba(48, 18, 28, 0.5),
    inset 0 0 50px 25px rgba(42, 16, 26, 0.4),
    inset 0 0 75px 40px rgba(36, 14, 24, 0.3),
    inset 0 0 110px 60px rgba(30, 12, 22, 0.2),
    inset 0 0 150px 80px rgba(26, 10, 20, 0.1);
}

video {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(145deg, #100c12 0%, #0a080c 100%);
  border-radius: 12px;
  border: none;
  display: block;
  position: relative;
  z-index: 0;
}

.room-code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  padding: 1rem 0;
  position: relative;
  background: linear-gradient(135deg, #f0e6d8 0%, #d4c4b0 25%, #c8b8a4 50%, #d4c4b0 75%, #f0e6d8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-shimmer 5s linear infinite;
  filter: drop-shadow(0 0 20px rgba(220, 200, 180, 0.3));
}

@keyframes text-shimmer {
  to { background-position: 200% center; }
}

.room-code::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 150%;
  height: 2px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: light-sweep 4s ease-in-out infinite;
  opacity: 0;
}

@keyframes light-sweep {
  0%, 100% { opacity: 0; left: 0%; }
  50% { opacity: 1; }
  99% { left: 100%; }
}

.label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #7a7068;
}

button {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: linear-gradient(145deg, rgba(30, 25, 35, 0.6), rgba(20, 15, 25, 0.8));
  color: #e8e0d8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 3rem;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  z-index: 10;
}

button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.15) 45%, rgba(255, 255, 255, 0.05) 50%, transparent 55%);
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

button::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.05));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

button:hover::before {
  transform: translateX(100%);
}

button:hover::after {
  opacity: 1;
}

button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 50px rgba(220, 200, 180, 0.12),
    0 0 100px rgba(200, 180, 220, 0.06),
    inset 0 0 30px rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

#status {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: #605850;
  text-transform: lowercase;
  transition: all 0.5s ease;
}

.viewers-panel {
  position: fixed;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  z-index: 10;
}

.viewers-title {
  font-size: 0.55rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #6a6058;
  margin-bottom: 0.5rem;
  padding-right: 0.25rem;
}

.viewer-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.viewer-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  transform: translateX(20px);
  animation: viewer-enter 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.viewer-item.leaving {
  animation: viewer-leave 0.4s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes viewer-enter {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes viewer-leave {
  to { opacity: 0; transform: translateX(20px) scale(0.9); }
}

.viewer-name {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: #c8c0b8;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.viewer-gem {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f4f0 20%, #e8dcd0 40%, #d0c4b8 70%, #a89888 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.6),
    0 0 24px rgba(220, 200, 180, 0.4),
    0 0 36px rgba(200, 180, 220, 0.2);
  animation: viewer-gem-pulse 2.5s ease-in-out infinite;
  position: relative;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7));
}

.viewer-gem::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: viewer-wave 2.5s ease-out infinite;
}

.viewer-gem::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 25%, rgba(255, 255, 255, 1) 45%, rgba(255, 255, 255, 0.5) 55%, transparent 75%);
  clip-path: inherit;
  animation: viewer-gem-shine 2.5s ease-in-out infinite;
}

@keyframes viewer-gem-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6), 0 0 24px rgba(220, 200, 180, 0.4), 0 0 36px rgba(200, 180, 220, 0.2);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.8), 0 0 36px rgba(220, 200, 180, 0.5), 0 0 54px rgba(200, 180, 220, 0.3);
  }
}

@keyframes viewer-gem-shine {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.9; }
}

@keyframes viewer-wave {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
}

.viewer-item:nth-child(1) .viewer-gem { animation-delay: 0s; }
.viewer-item:nth-child(2) .viewer-gem { animation-delay: 0.4s; }
.viewer-item:nth-child(3) .viewer-gem { animation-delay: 0.8s; }
.viewer-item:nth-child(4) .viewer-gem { animation-delay: 1.2s; }
.viewer-item:nth-child(5) .viewer-gem { animation-delay: 1.6s; }
.viewer-item:nth-child(6) .viewer-gem { animation-delay: 2s; }

.viewer-item:nth-child(1) { animation-delay: 0s; }
.viewer-item:nth-child(2) { animation-delay: 0.1s; }
.viewer-item:nth-child(3) { animation-delay: 0.2s; }
.viewer-item:nth-child(4) { animation-delay: 0.3s; }
.viewer-item:nth-child(5) { animation-delay: 0.4s; }
.viewer-item:nth-child(6) { animation-delay: 0.5s; }

.viewers-empty {
  font-size: 0.6rem;
  font-style: italic;
  letter-spacing: 0.1em;
  color: #4a4440;
}

.footer {
  position: fixed;
  bottom: 2rem;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(200, 190, 180, 0.2);
  font-style: italic;
}

.hidden { display: none; }

.info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  position: relative;
  z-index: 10;
}

.divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  margin: 0.75rem 0;
  position: relative;
}

.divider::after {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: divider-shine 4s ease-in-out infinite;
  opacity: 0;
}

@keyframes divider-shine {
  0%, 100% { opacity: 0; transform: scaleX(0.3); }
  50% { opacity: 0.8; transform: scaleX(1); }
}

.gem {
  width: 20px;
  height: 20px;
  position: relative;
  animation: diamond-float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 25px rgba(200, 220, 255, 0.6));
}

/* Main diamond body with faceted gradient */
.gem .diamond-body {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(230, 240, 255, 0.9) 15%, rgba(200, 220, 240, 0.85) 30%, rgba(180, 200, 230, 0.8) 50%, rgba(160, 180, 210, 0.7) 70%, rgba(140, 160, 190, 0.6) 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation: diamond-brilliance 2s ease-in-out infinite;
}

/* Top facet highlight */
.gem .facet-top {
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(220, 235, 255, 0.7) 50%, transparent 100%);
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  animation: facet-shimmer 2.5s ease-in-out infinite;
}

/* Left facet */
.gem .facet-left {
  position: absolute;
  top: 25%;
  left: 0;
  width: 50%;
  height: 50%;
  background: linear-gradient(90deg, rgba(180, 200, 240, 0.6) 0%, rgba(220, 235, 255, 0.8) 50%, transparent 100%);
  clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
  animation: facet-shimmer 2.5s ease-in-out infinite 0.3s;
}

/* Right facet */
.gem .facet-right {
  position: absolute;
  top: 25%;
  right: 0;
  width: 50%;
  height: 50%;
  background: linear-gradient(-90deg, rgba(200, 180, 220, 0.5) 0%, rgba(235, 225, 255, 0.7) 50%, transparent 100%);
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
  animation: facet-shimmer 2.5s ease-in-out infinite 0.6s;
}

/* Bottom facet */
.gem .facet-bottom {
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 50%;
  background: linear-gradient(0deg, rgba(160, 170, 200, 0.4) 0%, rgba(200, 210, 230, 0.6) 50%, transparent 100%);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  animation: facet-shimmer 2.5s ease-in-out infinite 0.9s;
}

/* Center fire/brilliance */
.gem .diamond-fire {
  position: absolute;
  top: 35%;
  left: 35%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 240, 220, 0.8) 30%, rgba(255, 200, 150, 0.4) 60%, transparent 100%);
  border-radius: 50%;
  animation: fire-pulse 1.5s ease-in-out infinite;
}

/* Prismatic rainbow dispersion */
.gem .diamond-prism {
  position: absolute;
  inset: -2px;
  background:
    conic-gradient(from 0deg at 50% 50%,
      rgba(255, 100, 100, 0.3) 0deg,
      rgba(255, 200, 100, 0.3) 60deg,
      rgba(200, 255, 100, 0.3) 120deg,
      rgba(100, 255, 200, 0.3) 180deg,
      rgba(100, 200, 255, 0.3) 240deg,
      rgba(200, 100, 255, 0.3) 300deg,
      rgba(255, 100, 100, 0.3) 360deg);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0;
  animation: prism-flash 3s ease-in-out infinite;
  mix-blend-mode: overlay;
}

/* Wave rings */
.gem .wave-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.gem .wave-ring:nth-child(7) {
  width: 40px;
  height: 40px;
  animation: wave-expand 2.5s ease-out infinite;
}

.gem .wave-ring:nth-child(8) {
  width: 60px;
  height: 60px;
  animation: wave-expand 2.5s ease-out infinite 0.5s;
}

.gem .wave-ring:nth-child(9) {
  width: 80px;
  height: 80px;
  animation: wave-expand 2.5s ease-out infinite 1s;
}

@keyframes diamond-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}

@keyframes diamond-brilliance {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.3) saturate(1.2);
  }
}

@keyframes facet-shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes fire-pulse {
  0%, 100% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes prism-flash {
  0%, 70%, 100% { opacity: 0; transform: rotate(0deg); }
  75%, 85% { opacity: 0.8; }
  80% { opacity: 1; transform: rotate(30deg); }
}

@keyframes wave-expand {
  0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

.corner {
  position: fixed;
  width: 60px;
  height: 60px;
  opacity: 0.4;
}

.corner::before, .corner::after {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, #f0e6d8, #c8b8a4, #a09080);
}

.corner .diamond {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #fff 0%, #f8f4f0 25%, #f0e6d8 50%, #c8b8a4 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.8),
    0 0 25px rgba(220, 200, 180, 0.5);
  animation: corner-diamond 3s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.corner .diamond::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: corner-wave 3s ease-out infinite;
}

@keyframes corner-diamond {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}

@keyframes corner-wave {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

/* Dynamic starfield canvas */
#starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Scattered gemstones - realistic 3D diamonds */
.scattered-gems {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Realistic mini diamond with facets */
.scattered-gems .gem-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
  animation: gem-glitter 4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 12px rgba(200, 220, 255, 0.5));
}

.scattered-gems .gem-particle .mini-body {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(220, 235, 255, 0.9) 25%, rgba(180, 200, 240, 0.85) 50%, rgba(150, 170, 210, 0.7) 100%);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.scattered-gems .gem-particle .mini-facet {
  position: absolute;
  top: 0;
  left: 25%;
  width: 50%;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(200, 220, 255, 0.6) 100%);
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  animation: mini-shimmer 2s ease-in-out infinite;
}

.scattered-gems .gem-particle .mini-fire {
  position: absolute;
  top: 30%;
  left: 30%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 220, 180, 0.6) 50%, transparent 100%);
  border-radius: 50%;
  animation: mini-fire 1.5s ease-in-out infinite;
}

.scattered-gems .gem-particle .mini-prism {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 45deg, rgba(255, 120, 120, 0.4), rgba(255, 220, 120, 0.4), rgba(120, 255, 180, 0.4), rgba(120, 180, 255, 0.4), rgba(200, 120, 255, 0.4), rgba(255, 120, 120, 0.4));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0;
  mix-blend-mode: overlay;
  animation: mini-prism-flash 4s ease-in-out infinite;
}

.scattered-gems .gem-particle .mini-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: mini-wave-expand 4s ease-out infinite;
}

.scattered-gems .gem-particle .mini-wave:nth-child(6) {
  width: 50px;
  height: 50px;
  animation-delay: 0.5s;
}

@keyframes gem-glitter {
  0%, 100% { opacity: 0; transform: scale(0.7) rotate(0deg); }
  15% { opacity: 0.7; transform: scale(1) rotate(5deg); }
  30% { opacity: 1; transform: scale(1.2) rotate(-3deg); }
  50% { opacity: 0.8; transform: scale(1.1) rotate(8deg); }
  70% { opacity: 0.9; transform: scale(1.15) rotate(-5deg); }
  85% { opacity: 0.5; transform: scale(0.9) rotate(3deg); }
}

@keyframes mini-shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes mini-fire {
  0%, 100% { transform: scale(0.7); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
}

@keyframes mini-prism-flash {
  0%, 60%, 100% { opacity: 0; }
  70%, 80% { opacity: 0.7; transform: rotate(20deg); }
}

@keyframes mini-wave-expand {
  0% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

/* Twinkling stars with cross beams */
.scattered-gems .star {
  position: absolute;
  width: 6px;
  height: 6px;
  opacity: 0;
  animation: star-twinkle 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) drop-shadow(0 0 16px rgba(200, 220, 255, 0.8));
}

.scattered-gems .star .star-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 4px #fff, 0 0 8px rgba(200, 220, 255, 0.8);
}

.scattered-gems .star .star-beam-h {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.9) 60%, transparent);
  transform: translate(-50%, -50%);
  animation: beam-pulse 3s ease-in-out infinite;
}

.scattered-gems .star .star-beam-v {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.9) 60%, transparent);
  transform: translate(-50%, -50%);
  animation: beam-pulse 3s ease-in-out infinite 0.2s;
}

.scattered-gems .star .star-beam-d1 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: beam-pulse 3s ease-in-out infinite 0.4s;
}

.scattered-gems .star .star-beam-d2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: translate(-50%, -50%) rotate(-45deg);
  animation: beam-pulse 3s ease-in-out infinite 0.6s;
}

.scattered-gems .star .star-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: star-wave-expand 3s ease-out infinite;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  25% { opacity: 1; transform: scale(1.3); }
  50% { opacity: 0.4; transform: scale(0.9); }
  75% { opacity: 0.9; transform: scale(1.1); }
}

@keyframes beam-pulse {
  0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scaleX(0.6); }
  50% { opacity: 1; transform: translate(-50%, -50%) scaleX(1.2); }
}

@keyframes star-wave-expand {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.5); }
}

/* Diamond gem positions */
.gem-particle:nth-child(1) { top: 8%; left: 12%; animation-delay: 0s; }
.gem-particle:nth-child(2) { top: 15%; right: 18%; animation-delay: 0.5s; }
.gem-particle:nth-child(3) { top: 28%; left: 6%; animation-delay: 1s; }
.gem-particle:nth-child(4) { top: 42%; right: 8%; animation-delay: 1.5s; }
.gem-particle:nth-child(5) { top: 58%; left: 4%; animation-delay: 0.3s; }
.gem-particle:nth-child(6) { top: 72%; right: 6%; animation-delay: 2s; }
.gem-particle:nth-child(7) { top: 85%; left: 10%; animation-delay: 1.2s; }
.gem-particle:nth-child(8) { top: 92%; right: 15%; animation-delay: 1.8s; }

/* Star positions */
.star:nth-child(9) { top: 10%; left: 35%; animation-delay: 0.2s; }
.star:nth-child(10) { top: 22%; right: 30%; animation-delay: 1.1s; }
.star:nth-child(11) { top: 48%; left: 2%; animation-delay: 0.7s; }
.star:nth-child(12) { top: 65%; right: 3%; animation-delay: 2.2s; }
.star:nth-child(13) { top: 82%; left: 25%; animation-delay: 0.9s; }
.star:nth-child(14) { top: 35%; left: 94%; animation-delay: 1.6s; }
.star:nth-child(15) { top: 55%; right: 25%; animation-delay: 2.5s; }
.star:nth-child(16) { top: 5%; right: 12%; animation-delay: 0.4s; }

.corner.tl { top: 25px; left: 25px; }
.corner.tl::before { width: 1px; height: 30px; }
.corner.tl::after { width: 30px; height: 1px; }
.corner.tl .diamond { top: -2px; left: -2px; animation-delay: 0s; }

.corner.tr { top: 25px; right: 25px; }
.corner.tr::before { width: 1px; height: 30px; right: 0; }
.corner.tr::after { width: 30px; height: 1px; right: 0; }
.corner.tr .diamond { top: -2px; right: -2px; animation-delay: 1s; }

.corner.bl { bottom: 25px; left: 25px; }
.corner.bl::before { width: 1px; height: 30px; bottom: 0; }
.corner.bl::after { width: 30px; height: 1px; bottom: 0; }
.corner.bl .diamond { bottom: -2px; left: -2px; animation-delay: 2s; }

.corner.br { bottom: 25px; right: 25px; }
.corner.br::before { width: 1px; height: 30px; bottom: 0; right: 0; }
.corner.br::after { width: 30px; height: 1px; bottom: 0; right: 0; }
.corner.br .diamond { bottom: -2px; right: -2px; animation-delay: 3s; }

/* Watch page specific styles */
.join-form {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

input {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 1rem;
  letter-spacing: 0.3em;
  text-align: center;
  background: linear-gradient(145deg, rgba(30, 25, 35, 0.4), rgba(20, 15, 25, 0.6));
  color: #e8e0d8;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  width: 150px;
  outline: none;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(5px);
}

input::placeholder {
  color: rgba(200, 190, 180, 0.3);
  letter-spacing: 0.2em;
}

input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 30px rgba(220, 200, 180, 0.1);
  background: linear-gradient(145deg, rgba(35, 30, 40, 0.5), rgba(25, 20, 30, 0.7));
}

.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  padding: 1rem 1.5rem;
  background: linear-gradient(145deg, rgba(30, 25, 35, 0.9), rgba(20, 15, 25, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c0b8b0;
  opacity: 0;
  transform: translateY(-10px);
  animation: notifIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  z-index: 100;
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.notification.live {
  border-color: rgba(255, 255, 255, 0.15);
  color: #e8e0d8;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(220, 200, 180, 0.1);
}

@keyframes notifIn {
  to { opacity: 1; transform: translateY(0); }
}
