/* NYE 2025 - Dress to Impress Theme */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --gold: #d4af37;
  --gold-light: #f4d03f;
  --champagne: #f7e7ce;
  --neon-pink: #ff2d95;
  --neon-purple: #9d4edd;
  --neon-blue: #00d4ff;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --border: rgba(212, 175, 55, 0.2);
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Animated background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(157, 78, 221, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 45, 149, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  padding: 20px 0 30px;
}

.title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.sparkle {
  display: block;
  color: var(--champagne);
  text-shadow: 0 0 20px rgba(247, 231, 206, 0.5);
  animation: sparkle 2s ease-in-out infinite;
}

.highlight {
  display: block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 2.5rem;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.4));
}

@keyframes sparkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.subtitle {
  font-size: 1rem;
  color: var(--neon-pink);
  text-transform: uppercase;
  letter-spacing: 8px;
  text-shadow: 0 0 10px var(--neon-pink);
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #666;
  transition: all 0.3s;
}

.status-dot.connected {
  background: #00ff88;
  box-shadow: 0 0 10px #00ff88;
}

.status-dot.streaming {
  background: var(--neon-pink);
  box-shadow: 0 0 10px var(--neon-pink);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.guest-count {
  color: var(--gold);
  font-weight: 600;
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 24px;
}

#localVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.9);
  transition: opacity 0.3s;
}

.video-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.join-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 48px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  border: none;
  border-radius: 16px;
  color: var(--bg-dark);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.join-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
}

.join-btn:active {
  transform: scale(0.98);
}

.btn-icon {
  font-size: 2rem;
}

.video-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.video-status.visible {
  opacity: 1;
}

.stop-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 16px;
  background: rgba(255, 45, 95, 0.9);
  border: none;
  border-radius: 20px;
  color: white;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.stop-btn:hover {
  background: rgba(255, 45, 95, 1);
  transform: scale(1.05);
}

.stop-btn.hidden {
  display: none;
}

/* BPM Section */
.bpm-section {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
  flex: 1;
}

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
}

.bpm-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.bpm-value {
  font-size: 4rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 45, 149, 0.4));
  transition: transform 0.1s;
}

.bpm-value.beat {
  transform: scale(1.1);
}

.bpm-label {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* BPM Mode Buttons */
.bpm-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.mode-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.mode-btn.active {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.mode-icon {
  font-size: 1.2rem;
}

/* Control Panels */
.control-panel {
  text-align: center;
}

.control-panel.hidden {
  display: none;
}

/* Tap Button */
.tap-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  border: none;
  color: white;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 4px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 0 0 30px rgba(157, 78, 221, 0.4);
}

.tap-btn:hover {
  box-shadow: 0 0 50px rgba(255, 45, 149, 0.6);
}

.tap-btn:active,
.tap-btn.active {
  transform: scale(0.95);
  box-shadow: 0 0 60px rgba(255, 45, 149, 0.8);
}

.tap-hint {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Fixed BPM Controls */
.bpm-input-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.bpm-adjust {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.bpm-adjust:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
}

.bpm-adjust:active {
  transform: scale(0.95);
}

#bpmInput {
  width: 100px;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.5rem;
  text-align: center;
}

#bpmInput:focus {
  outline: none;
  border-color: var(--gold);
}

#bpmSlider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-dark);
  -webkit-appearance: none;
  appearance: none;
}

#bpmSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Audio Visualization */
.audio-viz {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 80px;
  margin-bottom: 16px;
}

.audio-bar {
  width: 12px;
  background: linear-gradient(to top, var(--neon-pink), var(--neon-purple));
  border-radius: 6px;
  animation: audioBar 0.5s ease-in-out infinite;
}

.audio-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.audio-bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.audio-bar:nth-child(3) { height: 80%; animation-delay: 0.2s; }
.audio-bar:nth-child(4) { height: 50%; animation-delay: 0.3s; }
.audio-bar:nth-child(5) { height: 40%; animation-delay: 0.4s; }

@keyframes audioBar {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.5); }
}

.audio-hint {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 380px) {
  .title {
    font-size: 1.6rem;
  }
  .highlight {
    font-size: 2rem;
  }
  .bpm-value {
    font-size: 3rem;
  }
  .tap-btn {
    width: 120px;
    height: 120px;
    font-size: 1.2rem;
  }
}

/* Full party indicator */
.status-bar.full .guest-count {
  color: var(--neon-pink);
  animation: pulse 1s infinite;
}
