:root {
  --bg: #0e0e12;
  --accent1: #e879f9;
  --accent2: #22d3ee;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(232,121,249,0.15), transparent 60%),
    radial-gradient(1000px 500px at 90% 10%, rgba(34,211,238,0.12), transparent 55%),
    radial-gradient(800px 800px at 50% 120%, rgba(167,139,250,0.10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: #f5f5f5;
  min-height: 100vh;
}

/* film grain */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* glassmorphism panels */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* shimmering title */
.title-shimmer {
  background: linear-gradient(90deg, #e879f9, #22d3ee, #f472b6, #a78bfa, #e879f9);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }

/* infinity badge */
.inf-badge {
  background: rgba(232,121,249,0.15);
  border: 1px solid rgba(232,121,249,0.4);
  color: #f0abfc;
  animation: pulseGlow 2.4s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(232,121,249,0.4); }
  50% { box-shadow: 0 0 14px 3px rgba(232,121,249,0.5); }
}

/* the screen / player */
.screen {
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.6) 100%),
    #050507;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
}

/* dropzone */
.dropzone {
  border: 2px dashed rgba(255,255,255,0.15);
  transition: all 0.2s;
  background: rgba(0,0,0,0.2);
}
.dropzone:hover { border-color: rgba(232,121,249,0.5); }
.dropzone.drag-over {
  border-color: var(--accent2);
  background: rgba(34,211,238,0.08);
  transform: scale(1.01);
}

/* generate button */
.generate-btn {
  background: linear-gradient(120deg, #e879f9, #f472b6, #22d3ee);
  background-size: 200% 100%;
  animation: btnFlow 4s ease infinite;
  box-shadow: 0 6px 24px rgba(232,121,249,0.4);
}
.generate-btn:hover { box-shadow: 0 8px 32px rgba(34,211,238,0.5); }
@keyframes btnFlow { 0%,100%{background-position:0 0;} 50%{background-position:100% 0;} }

/* control buttons */
.ctrl-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e5e5;
  padding: 0.5rem 0.9rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-family: 'Space Mono', monospace;
  transition: all 0.15s;
}
.ctrl-btn:hover { background: rgba(232,121,249,0.15); border-color: rgba(232,121,249,0.4); }
.ctrl-btn:active { transform: scale(0.96); }

/* film reel spinner */
.reel {
  width: 48px; height: 48px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent1);
  border-right-color: var(--accent2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
.toast { animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity:0; transform: translate(-50%, 20px); } to { opacity:1; transform: translate(-50%, 0); } }

/* confetti */
.confetti-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti-bit {
  position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* scrollbar */
::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: rgba(232,121,249,0.3); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

textarea:focus, input:focus { outline: none; }
textarea { color: #f5f5f5; }