/* ==========================================================================
   OUR JOURNEY - CORE STYLES & THEME
   ========================================================================== */

:root {
  --bg-dark: #07070a;
  --bg-deep: #0e0e14;
  --bg-card: rgba(22, 22, 30, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --bg-glass-heavy: rgba(18, 18, 24, 0.88);
  
  --color-primary: #ffffff;
  --color-primary-glow: rgba(255, 255, 255, 0.25);
  --color-secondary: #a0a5b5;
  --color-gold: #e2c08d;
  --color-gold-glow: rgba(226, 192, 141, 0.25);
  --color-text-main: #f8f9fa;
  --color-text-muted: #8e90a6;
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-heading: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.15);
  
  --safe-top: env(safe-area-inset-top, 20px);
  --safe-bottom: env(safe-area-inset-bottom, 20px);
  --safe-left: env(safe-area-inset-left, 16px);
  --safe-right: env(safe-area-inset-right, 16px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  background-color: var(--bg-dark);
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.03), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(226, 192, 141, 0.04), transparent 45%);
}

/* Background Particle Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Black Fade Cinematic Transition Curtain */
#black-fade-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: opacity 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

#black-fade-curtain.active {
  opacity: 1;
  pointer-events: auto;
}

/* Application Container */
#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

/* Screen Views */
.view-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.view-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

/* Top Glass Navigation Header */
.top-header {
  position: absolute;
  top: var(--safe-top);
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-subtle);
}

/* Audio Player Pill Widget */
.music-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4px 12px 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.3s ease;
}

.music-widget:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.vinyl-disc {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 35%, #444 36%, #111 60%, #333 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.6);
  animation: spin 3.5s linear infinite;
  animation-play-state: paused;
}

.music-widget.playing .vinyl-disc {
  animation-play-state: running;
}

.vinyl-center {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 12px;
}

.wave-bars span {
  width: 2px;
  height: 4px;
  background: #ffffff;
  border-radius: 1px;
  transition: height 0.2s ease;
  opacity: 0.8;
}

.music-widget.playing .wave-bars span:nth-child(1) { animation: wave 1.1s ease-in-out infinite alternate; }
.music-widget.playing .wave-bars span:nth-child(2) { animation: wave 0.8s ease-in-out 0.2s infinite alternate; }
.music-widget.playing .wave-bars span:nth-child(3) { animation: wave 1.3s ease-in-out 0.4s infinite alternate; }
.music-widget.playing .wave-bars span:nth-child(4) { animation: wave 0.9s ease-in-out 0.1s infinite alternate; }

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 70vh;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.lightbox-close {
  position: absolute;
  top: calc(var(--safe-top) + 12px);
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes wave {
  0% { height: 3px; }
  100% { height: 12px; }
}
