/* styles.css - Complete styling for Maik Müller DJ Website */

/* ===== CSS Variables ===== */
:root {
  --color-black: #1a1a1a;
  --color-white: #f5f5f5;
  --color-black-matte: #0d0d0d;
  --color-white-matte: #e8e8e8;
  --color-gray-dark: #333333;
  --color-gray-light: #f5f5f5;
  --color-accent: #39ff14;
  --color-neon-yellow: #39ff14;
  --color-vinyl: #1a1a1a;
  --font-primary: 'Orbitron', 'Arial Black', sans-serif;
  --font-secondary: 'Rajdhani', 'Arial', sans-serif;
  --transition-speed: 0.4s;
  --border-radius: 8px;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.3);
  --glow-effect: 0 0 20px rgba(57, 255, 20, 0.6);
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: var(--font-secondary);
  background-color: #000000;
  color: var(--color-white);
}

/* ===== Screen Reader Only ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
  white-space: nowrap;
}

/* ===== Video Background ===== */
#video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.7;
}

/* ===== Three.js Canvas Container ===== */
#three-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#three-canvas-container canvas {
  display: none;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

/* ===== Loader ===== */
#loader-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--color-white);
  z-index: 2;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-content p {
  font-size: 1.2rem;
  font-weight: 500;
}

/* ===== Audio Control (Central) ===== */
.audio-control-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 120px));
  z-index: 100;
}

.audio-play-button {
  background: rgba(13, 13, 13, 0.9);
  border: 2px solid var(--color-white-matte);
  color: var(--color-white-matte);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.audio-play-button:hover {
  background: rgba(245, 245, 245, 0.1);
  border-color: var(--color-accent);
  transform: scale(1.1);
  box-shadow: var(--glow-effect);
}

.audio-play-button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.audio-play-button.playing {
  border-color: var(--color-accent);
  animation: pulse 2s ease-in-out infinite alternate;
}

.audio-play-button.loading {
  animation: spin 1s linear infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 5px rgba(57, 255, 20, 0.5); }
  100% { box-shadow: 0 0 25px rgba(57, 255, 20, 0.8), 0 0 50px rgba(57, 255, 20, 0.4); }
}

.audio-wave {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  height: 8px;
  align-items: flex-end;
}

.wave-bar {
  width: 2px;
  height: 2px;
  background: var(--color-accent);
  transition: height 0.1s ease;
}

.audio-wave.active .wave-bar {
  animation: wave 0.8s ease-in-out infinite alternate;
}

.audio-wave.active .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-wave.active .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-wave.active .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-wave.active .wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0% { height: 2px; }
  100% { height: 8px; }
}

/* ===== Social Links (Left Edge) ===== */
.social-links-vertical {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 100;
}

.social-link-vertical {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(13, 13, 13, 0.9);
  border: 2px solid var(--color-white-matte);
  border-radius: 50%;
  color: var(--color-white-matte);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(10px);
}

.social-link-vertical:hover,
.social-link-vertical:focus {
  background: rgba(245, 245, 245, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: scale(1.1);
  box-shadow: var(--glow-effect);
}

.social-link-vertical svg {
  width: 24px;
  height: 24px;
}

/* ===== Menu Container (Bottom-Right) ===== */
.menu-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
}

.menu-cluster {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menu-item {
  background: rgba(13, 13, 13, 0.9);
  border: 2px solid var(--color-white-matte);
  color: var(--color-white-matte);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.menu-item:hover,
.menu-item:focus {
  background: rgba(245, 245, 245, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-dark);
}

.menu-item svg {
  width: 20px;
  height: 20px;
}

.menu-label {
  white-space: nowrap;
}

/* ===== Overlays ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.overlay-content {
  background: linear-gradient(135deg, var(--color-black-matte) 0%, var(--color-gray-dark) 100%);
  border: 2px solid var(--color-white-matte);
  border-radius: var(--border-radius);
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  max-width: 600px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-dark);
}

.overlay-header {
  padding: 20px 30px;
  border-bottom: 1px solid rgba(245, 245, 245, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overlay-header h2 {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  color: var(--color-white);
  margin: 0;
}

.overlay-close {
  background: none;
  border: none;
  color: var(--color-white-matte);
  font-size: 2rem;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.overlay-close:hover,
.overlay-close:focus {
  background: rgba(245, 245, 245, 0.1);
  color: var(--color-accent);
  transform: scale(1.1);
}

.overlay-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

/* ===== Overlay Body Scrollbar ===== */
.overlay-body::-webkit-scrollbar {
  width: 8px;
}

.overlay-body::-webkit-scrollbar-track {
  background: rgba(245, 245, 245, 0.1);
  border-radius: 4px;
}

.overlay-body::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

.overlay-body::-webkit-scrollbar-thumb:hover {
  background: rgba(57, 255, 20, 0.8);
}

/* ===== Music Overlay Specific ===== */
.music-player-extended {
  text-align: center;
}

.track-info h3 {
  font-family: var(--font-primary);
  margin-bottom: 10px;
  color: var(--color-white);
}

.track-info p {
  color: var(--color-white-matte);
  margin-bottom: 20px;
}

.player-controls {
  margin: 20px 0;
}

.music-links {
  margin-top: 20px;
}

.soundcloud-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ff5500, #ff7700);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
  font-weight: 500;
}

.soundcloud-link:hover {
  background: linear-gradient(135deg, #ff7700, #ff9900);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 85, 0, 0.4);
}

.music-player-placeholder {
  padding: 20px;
  background: rgba(245, 245, 245, 0.05);
  border-radius: var(--border-radius);
  text-align: center;
  color: var(--color-white-matte);
}

/* ===== Booking Overlay Specific ===== */
.booking-content h3 {
  font-family: var(--font-primary);
  margin-bottom: 15px;
  color: var(--color-white);
}

.booking-content p {
  margin-bottom: 20px;
  line-height: 1.6;
  color: var(--color-white-matte);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.contact-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: rgba(245, 245, 245, 0.05);
  border: 2px solid var(--color-white-matte);
  border-radius: var(--border-radius);
  color: var(--color-white);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  font-weight: 500;
}

.contact-button:hover,
.contact-button:focus {
  background: rgba(245, 245, 245, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-dark);
}

.contact-button.primary {
  background: linear-gradient(135deg, var(--color-accent), rgba(57, 255, 20, 0.8));
  border-color: var(--color-accent);
  color: var(--color-black);
}

.contact-button.primary:hover {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.8), var(--color-accent));
  box-shadow: var(--glow-effect);
}

.booking-note {
  margin-top: 30px;
  padding: 20px;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: var(--border-radius);
}

.booking-note p {
  margin-bottom: 10px;
  color: var(--color-white);
}

.booking-note ul {
  margin-left: 20px;
  color: var(--color-white-matte);
}

.booking-note li {
  margin-bottom: 8px;
  line-height: 1.4;
}

/* ===== Legal Overlay Specific ===== */
.legal-content h3,
.legal-content h4 {
  font-family: var(--font-primary);
  color: var(--color-white);
  margin-top: 25px;
  margin-bottom: 15px;
}

.legal-content h3 {
  font-size: 1.3rem;
}

.legal-content h4 {
  font-size: 1.1rem;
}

.legal-content p,
.legal-content li {
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--color-white-matte);
}

.legal-content ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.legal-content a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--transition-speed) ease;
}

.legal-content a:hover,
.legal-content a:focus {
  border-bottom-color: var(--color-accent);
  text-shadow: 0 0 5px rgba(57, 255, 20, 0.5);
}

.legal-note {
  margin-top: 30px;
  padding: 15px;
  background: rgba(245, 245, 245, 0.05);
  border-radius: var(--border-radius);
  text-align: center;
}

.legal-note em {
  color: var(--color-white-matte);
  font-style: italic;
}

/* ===== About Overlay Specific ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: start;
}

.about-text p {
  margin-bottom: 15px;
  line-height: 1.6;
  color: var(--color-white-matte);
}

.bio-highlight {
  margin: 20px 0;
  padding: 15px;
  background: rgba(57, 255, 20, 0.1);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: var(--border-radius);
  text-align: center;
}

.bio-highlight p {
  color: var(--color-white);
  font-weight: 500;
  margin: 0;
}

.flyer-preview {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.flyer-thumbnail {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  border: 2px solid var(--color-white-matte);
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

.flyer-thumbnail:hover {
  border-color: var(--color-accent);
  box-shadow: var(--glow-effect);
  transform: scale(1.02);
}

.flyer-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: rgba(245, 245, 245, 0.05);
  border: 2px solid var(--color-white-matte);
  border-radius: var(--border-radius);
  color: var(--color-white);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
  font-size: 0.9rem;
  text-align: center;
}

.flyer-download:hover,
.flyer-download:focus {
  background: rgba(245, 245, 245, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ===== Error Toast ===== */
.error-toast {
  position: fixed;
  top: 30px;
  right: 30px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-dark);
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all var(--transition-speed) ease;
  max-width: 400px;
  font-weight: 500;
}

.error-toast.show {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .audio-control-container {
    transform: translate(-50%, calc(-50% + 80px));
  }
  
  .audio-play-button {
    width: 70px;
    height: 70px;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .flyer-preview {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .social-links-vertical {
    left: 15px;
    gap: 12px;
  }
  
  .social-link-vertical {
    width: 45px;
    height: 45px;
  }
  
  .social-link-vertical svg {
    width: 20px;
    height: 20px;
  }
  
  .menu-container {
    bottom: 20px;
    right: 20px;
  }
  
  .menu-cluster {
    gap: 8px;
  }
  
  .menu-item {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  
  .menu-item svg {
    width: 18px;
    height: 18px;
  }
  
  .overlay-content {
    max-width: 95vw;
    margin: 20px;
  }
  
  .overlay-header {
    padding: 15px 20px;
  }
  
  .overlay-body {
    padding: 20px;
  }
  
  .contact-methods {
    gap: 10px;
  }
  
  .contact-button {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .audio-play-button {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .social-links-vertical {
    left: 10px;
    gap: 10px;
  }
  
  .social-link-vertical {
    width: 40px;
    height: 40px;
  }
  
  .social-link-vertical svg {
    width: 18px;
    height: 18px;
  }
  
  .menu-container {
    bottom: 15px;
    right: 15px;
  }
  
  .menu-cluster {
    flex-direction: column;
    gap: 6px;
  }
  
  .menu-item {
    padding: 8px 10px;
  }
  
  .menu-label {
    display: none;
  }
  
  .overlay-header h2 {
    font-size: 1.2rem;
  }
  
  .audio-control-container {
    transform: translate(-50%, calc(-50% + 60px));
  }
  
  .audio-play-button {
    width: 55px;
    height: 55px;
  }
}

/* ===== Accessibility & Motion Preferences ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .loader-spinner {
    animation: none;
  }
  
  .audio-play-button.playing {
    animation: none;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.6);
  }
  
  .audio-wave.active .wave-bar {
    animation: none;
    height: 6px;
  }
}

/* ===== High Contrast Mode ===== */
@media (prefers-contrast: high) {
  :root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-accent: #00ff00;
  }
  
  .overlay-content {
    background: #000000;
    border: 3px solid #ffffff;
  }
}

/* ===== Focus Indicators ===== */
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ===== Body State Classes ===== */
.overlay-open {
  overflow: hidden;
}

.mobile-optimized .audio-wave {
  display: none; /* Hide wave animation on mobile for performance */
}

.reduce-motion .audio-play-button.playing,
.reduce-motion .social-link-vertical:hover,
.reduce-motion .menu-item:hover {
  animation: none;
  transform: none;
}

/* ===== Fallback Content ===== */
.fallback-content {
  text-align: center;
  padding: 2rem;
}

.fallback-content h1 {
  font-family: var(--font-primary);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: white;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  margin-bottom: 1rem;
  user-select: none;
}

.fallback-content p {
  color: #ccc;
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.fallback-content a {
  color: var(--color-accent);
  text-decoration: none;
  margin: 0 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
}

.fallback-content a:hover {
  background: var(--color-accent);
  color: var(--color-black);
}