/**
 * ============================================================
 * IDEA 4: VINTAGE GRAMOPHONE (BLUE BOTANICAL REDESIGN)
 * ============================================================
 */

/* 1. Vintage Gramophone Player Container */
.gramophone-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 36px 0 28px 0;
  width: 100%;
}

/* Luxury Ivory & Gold Botanical Deck (Harmonious with stationery) */
.gramophone-deck {
  position: relative;
  width: clamp(300px, 88vw, 345px);
  height: clamp(300px, 88vw, 345px);
  background: radial-gradient(circle at 50% 45%, #FFFFFF 0%, #FAF7F0 60%, #EBF2F6 100%);
  border-radius: 32px;
  border: 2px solid rgba(212, 175, 55, 0.75);
  outline: 3px solid rgba(168, 195, 211, 0.4);
  outline-offset: 4px;
  box-shadow: 
    0 24px 56px rgba(82, 111, 125, 0.22),
    0 4px 14px rgba(70, 84, 90, 0.08),
    inset 0 0 0 2px rgba(255, 253, 248, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gramophone-deck:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 28px 64px rgba(82, 111, 125, 0.28),
    0 6px 18px rgba(70, 84, 90, 0.12),
    inset 0 0 0 2px rgba(255, 253, 248, 0.95);
}

/* 4 Botanical Gilded Corner Motifs */
.deck-corner-motif {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  opacity: 0.75;
  z-index: 4;
}

.deck-corner-tl { top: 10px; left: 10px; }
.deck-corner-tr { top: 10px; right: 10px; transform: scaleX(-1); }
.deck-corner-bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.deck-corner-br { bottom: 10px; right: 10px; transform: scale(-1); }

/* Botanical Floral Accents around Turntable Deck */
.deck-decor-hydrangea {
  position: absolute;
  bottom: -20px;
  left: -22px;
  width: clamp(92px, 26vw, 115px);
  pointer-events: none;
  z-index: 7;
  filter: drop-shadow(0 6px 14px rgba(82, 111, 125, 0.32));
  transform-origin: bottom left;
}

.deck-decor-sage {
  position: absolute;
  bottom: -16px;
  right: -18px;
  width: clamp(75px, 22vw, 92px);
  pointer-events: none;
  z-index: 7;
  transform: rotate(18deg);
  filter: drop-shadow(0 4px 10px rgba(82, 111, 125, 0.2));
}

.deck-decor-butterfly {
  position: absolute;
  top: -18px;
  left: 18px;
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 8;
  transform: rotate(-15deg);
  filter: drop-shadow(0 4px 8px rgba(82, 111, 125, 0.3));
  animation: deckButterflyFlutter 4s ease-in-out infinite alternate;
}

@keyframes deckButterflyFlutter {
  0%   { transform: translateY(0) rotate(-15deg) scale(1); }
  100% { transform: translateY(-4px) rotate(-10deg) scale(1.06); }
}

/* Vinyl Record */
.vinyl-disc {
  position: relative;
  width: clamp(270px, 80vw, 305px);
  height: clamp(270px, 80vw, 305px);
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 50% 50%,
    #141E24 0px,
    #253540 1.5px,
    #141E24 3px,
    #1E2C34 4.5px
  );
  box-shadow: 
    0 16px 42px rgba(0, 0, 0, 0.52),
    inset 0 0 16px rgba(0, 0, 0, 0.9),
    0 0 0 1.5px rgba(212, 175, 55, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  -webkit-transform-origin: 50% 50%;
  z-index: 2;
  cursor: pointer;
}

.vinyl-disc.spinning {
  animation: vinylRotate 3.5s linear infinite !important;
  -webkit-animation: vinylRotate 3.5s linear infinite !important;
}

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

@-webkit-keyframes vinylRotate {
  0%   { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

/* Gilded Botanical Ornament Ring on Vinyl Disc Body */
.vinyl-ornament-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.vinyl-ornament-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Center Label with Couple Photo (Even larger picture disc) */
.vinyl-label {
  position: relative;
  width: clamp(198px, 58vw, 226px);
  height: clamp(198px, 58vw, 226px);
  border-radius: 50%;
  background: #FFFDF8;
  border: 3.5px solid #D4AF37;
  overflow: hidden;
  box-shadow: 
    0 0 0 2px rgba(255, 253, 248, 0.95),
    0 0 18px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.vinyl-couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  filter: contrast(1.05) saturate(1.1);
  pointer-events: none;
}

.vinyl-spindle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #1E2C33 25%, #D4AF37 55%, #1E2C33 100%);
  border: 1.5px solid #FFFDF8;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
  z-index: 4;
  pointer-events: none;
}

/* Tonearm Assembly */
.tonearm-assembly {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 52px;
  height: 156px;
  transform-origin: top right;
  -webkit-transform-origin: top right;
  transform: rotate(-22deg);
  -webkit-transform: rotate(-22deg);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 5;
}

.tonearm-assembly.active {
  transform: rotate(20deg);
  -webkit-transform: rotate(20deg);
}

.tonearm-pivot {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37, #AA7C11);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tonearm-rod {
  position: absolute;
  top: 12px;
  right: 11px;
  width: 4px;
  height: 128px;
  background: linear-gradient(to right, #B8964D, #ECC880, #8A6D30);
  border-radius: 2px;
}

.tonearm-head {
  position: absolute;
  bottom: 8px;
  right: 4px;
  width: 16px;
  height: 22px;
  background: #2E424D;
  border-radius: 2px;
  transform: rotate(-15deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* Vinyl Status & Soundwaves */
.gramophone-caption {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

/* Podcast Badge */
.podcast-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 20px;
  font-family: var(--font-serif);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #8A6D30;
  text-transform: uppercase;
  margin-bottom: 2px;
  box-shadow: 0 1px 4px rgba(212, 175, 55, 0.1);
}

.podcast-badge-icon {
  font-size: 0.8rem;
  line-height: 1;
}

.gramophone-song-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-weight: 600;
  color: #384A54;
  letter-spacing: 0.04em;
  max-width: 90%;
  line-height: 1.4;
}

/* Podcast Visualizer & Waveform */
.podcast-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(245, 248, 250, 0.85);
  border: 1px solid rgba(139, 166, 184, 0.3);
  border-radius: 24px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.podcast-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.wave-bar {
  width: 3px;
  height: 6px;
  background: #A0B7C6;
  border-radius: 2px;
  transition: height 0.25s ease, background 0.3s ease;
}

/* Default bar height variations when idle */
.wave-bar:nth-child(1) { height: 6px; }
.wave-bar:nth-child(2) { height: 10px; }
.wave-bar:nth-child(3) { height: 14px; }
.wave-bar:nth-child(4) { height: 8px; }
.wave-bar:nth-child(5) { height: 16px; }
.wave-bar:nth-child(6) { height: 12px; }
.wave-bar:nth-child(7) { height: 18px; }
.wave-bar:nth-child(8) { height: 14px; }
.wave-bar:nth-child(9) { height: 16px; }
.wave-bar:nth-child(10) { height: 10px; }
.wave-bar:nth-child(11) { height: 15px; }
.wave-bar:nth-child(12) { height: 9px; }
.wave-bar:nth-child(13) { height: 13px; }
.wave-bar:nth-child(14) { height: 7px; }
.wave-bar:nth-child(15) { height: 11px; }
.wave-bar:nth-child(16) { height: 5px; }

/* Active animated soundwave while podcast is playing */
.podcast-visualizer.playing .wave-bar {
  background: linear-gradient(to top, #4E7D96, #D4AF37);
  animation: podcastWave 1s ease-in-out infinite alternate;
}

.podcast-visualizer.playing .wave-bar:nth-child(odd) {
  animation-duration: 0.8s;
}
.podcast-visualizer.playing .wave-bar:nth-child(2n) {
  animation-delay: 0.15s;
  animation-duration: 1.1s;
}
.podcast-visualizer.playing .wave-bar:nth-child(3n) {
  animation-delay: 0.28s;
  animation-duration: 0.9s;
}
.podcast-visualizer.playing .wave-bar:nth-child(4n) {
  animation-delay: 0.42s;
  animation-duration: 1.25s;
}

@keyframes podcastWave {
  0% {
    height: 4px;
    opacity: 0.6;
  }
  50% {
    height: 18px;
    opacity: 1;
  }
  100% {
    height: 8px;
    opacity: 0.85;
  }
}

.podcast-timer {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #4A5F6B;
  letter-spacing: 0.05em;
}

.gramophone-status-cue {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--color-deep-blue-grey);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gramophone-status-cue .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8BA6B8;
}

.gramophone-status-cue.playing .dot {
  background: #D4AF37;
  box-shadow: 0 0 8px #D4AF37;
  animation: pulseDot 1.2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .deck-decor-hydrangea, .deck-decor-butterfly, .gramophone-status-cue.playing .dot {
    animation: none !important;
  }
}
