/* Custom Reset & Variables */
:root {
  --color-bg: #070707;
  --color-card-bg: rgba(15, 15, 15, 0.6);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.6);
  --color-accent: #c3a375; /* Premium soft gold/bronze */
  --color-accent-rgb: 195, 163, 117;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Outfit', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, html {
  width: 100%;
  height: 100%;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  position: relative;
}

/* Viewport stability for mobile devices */
body {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ambient Radial Glow for Depth */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 40%, rgba(30, 22, 16, 0.4) 0%, rgba(5, 5, 5, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Main Container */
.player-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 450px;
  height: 100dvh;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

/* Header */
.header {
  margin-top: 1rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--color-text-primary);
  text-indent: 0.25em; /* Compensate for letter-spacing offset */
}

.subtitle {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--color-accent);
  margin-top: 0.2rem;
  text-indent: 0.4em;
}

/* Visualizer Wrapper (Centered circle area) */
.visualizer-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#visualizerCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Play/Pause Button */
.play-btn {
  position: relative;
  z-index: 2;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(18, 18, 18, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  outline: none;
}

.play-btn:hover {
  border-color: rgba(var(--color-accent-rgb), 0.4);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.6),
    0 0 15px rgba(var(--color-accent-rgb), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.play-btn:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 
    0 5px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.btn-icon {
  width: 28px;
  height: 28px;
  fill: var(--color-accent);
  transition: transform 0.3s ease;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Speaker & Voice Info */
.voice-info {
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.speaker-name {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.25;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.status-text {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

/* Footer styling */
.footer {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 0.5rem;
}

/* Fallback screen */
.fallback-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-bg);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.fallback-content {
  max-width: 400px;
}

.fallback-content h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.fallback-content p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Micro-animations */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--color-accent-rgb), 0.2);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(var(--color-accent-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--color-accent-rgb), 0);
  }
}

.btn-pulse {
  animation: pulseGlow 2s infinite;
}

/* Transparent tap gate — covers full screen, catches first touch anywhere */
.tap-gate {
  position: fixed;
  inset: 0;              /* top:0 right:0 bottom:0 left:0 */
  z-index: 500;          /* Above everything */
  cursor: pointer;
  /* Completely transparent — player is visible through it */
  background: transparent;
  /* Touch-action: manipulation prevents the 300ms click delay on mobile */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Status text hint when waiting for first touch */
.status-text {
  cursor: default;
  transition: color 0.3s;
}

/* Pulsing animation for "Tap to hear" hint */
@keyframes statusPulse {
  0%, 100% { opacity: 1;   color: var(--color-accent); }
  50%       { opacity: 0.5; color: var(--color-text-secondary); }
}

