@font-face {
  font-family: "Typo Round";
  src: url("./fonts/Typo_Round_Regular_Demo.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Sci Fied";
  src: url("./fonts/scifie.ttf") format("truetype");
}

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

/* Custom Cursor */
*,
*::before,
*::after {
  cursor: url("cursor.cur"), auto !important;
}

a,
button,
input,
[role="button"],
*:hover {
  cursor: url("cursor.cur"), auto !important;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #0b3b5b;
  background: #ffffff url("./images/windows_xp_14.jpg") no-repeat center center fixed;
  background-size: cover;
  font-family: "Typo Round", sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* =========================================================
   FLOATING CLOUDS LAYER
========================================================= */
.clouds-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 55vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.cloud {
  position: absolute;
  width: 160px;
  height: 50px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 100px;
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
  animation: drift linear infinite;
  will-change: transform;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud::before {
  width: 70px;
  height: 70px;
  top: -35px;
  left: 25px;
}

.cloud::after {
  width: 90px;
  height: 90px;
  top: -45px;
  left: 65px;
}

.cloud-1 { top: 6%; transform: scale(0.9); opacity: 0.85; animation-duration: 42s; animation-delay: -5s; }
.cloud-2 { top: 16%; transform: scale(1.3); opacity: 0.95; animation-duration: 32s; animation-delay: -18s; }
.cloud-3 { top: 28%; transform: scale(0.65); opacity: 0.75; animation-duration: 55s; animation-delay: -28s; }
.cloud-4 { top: 10%; transform: scale(1.1); opacity: 0.9; animation-duration: 38s; animation-delay: -35s; }
.cloud-5 { top: 22%; transform: scale(0.8); opacity: 0.8; animation-duration: 48s; animation-delay: -10s; }

@keyframes drift {
  0% { left: -250px; }
  100% { left: 100vw; }
}

/* =========================================================
   AERO GLASS MAIN CONTAINER
========================================================= */
.song-panel {
  position: relative;
  z-index: 5;
  width: min(100%, 640px); /* Slightly refined width for better proportions */
  margin-right: 220px;     /* Pushes the song panel away from the CD player */
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 28px;
 

  /* Frosted Glass Body */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.5) 45%,
    rgba(215, 238, 255, 0.45) 50%,
    rgba(195, 228, 255, 0.75) 100%
  );
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);

  /* Glossy Bevel Rim Lighting */
  border-top: 2px solid rgba(255, 255, 255, 0.95);
  border-left: 1.5px solid rgba(255, 255, 255, 0.7);
  border-right: 1.5px solid rgba(255, 255, 255, 0.5);
  border-bottom: 2px solid rgba(135, 185, 220, 0.8);

  box-shadow:
    0 16px 40px rgba(0, 45, 90, 0.22),
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    inset 0 -2px 6px rgba(70, 150, 220, 0.2);
}

/* Header & Back Link */
.song-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.heading-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.35rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0b3b5b;
  text-decoration: none;
  border-radius: 20px;

  /* Mini Aero Pill */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(215, 238, 255, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(135, 185, 220, 0.8);
  box-shadow: 0 2px 6px rgba(0, 50, 100, 0.1);
  transition: transform 0.15s ease, background 0.15s ease;
}

.home-link:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #ffffff 0%, rgba(185, 225, 255, 0.8) 100%);
}

/* Title with 3D Aero Gradient Effect */
h1#page-title {
  margin: 0;
  font-family: "Typo Round", sans-serif;
  font-size: clamp(2.2rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 1px;
  color: #fbfcfbb7;
  text-shadow: 
    0 2px 0 #fbfbfb,
    0 4px 0 #d1d9de,
    0 6px 0 #0379c3,
    0 8px 10px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

/* =========================================================
   CD PLAYER
========================================================= */
.cd-player {
  position: relative;
  z-index: 5;
  width: 220px;
  flex: 0 0 auto;
  color: #000000;
}

.cd-player-brand,
.cd-player-footer,
.cd-display-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.cd-player-brand {
  padding: 2px 3px 6px;
  text-shadow: 0 1px #fff;
}

.cd-player-brand span:last-child {
  padding: 2px 6px;
  color: #0b3b5b;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #9dc4e4;
  border-radius: 8px;
}

.cd-case {
  position: relative;
  width: 85%;
  margin-left: 15%;
  aspect-ratio: 1;
  isolation: isolate;
}

.cd-case::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, #d8e4e6, #8ba2b3 32%, #d4e2df 70%, #9cb2b8);
  border: 2px solid #dce7e8;
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px #657b8c, 0 6px 12px rgba(0, 30, 60, 0.25);
}

.cd-case::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, transparent 40%, transparent 65%, rgba(190, 230, 255, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  pointer-events: none;
}

.cd-disc {
  position: absolute;
  z-index: 0;
  top: 5%;
  left: -24%;
  display: block;
  visibility: hidden;
  width: 90%;
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(0, 30, 60, 0.35));
  animation: cd-spin 4s linear infinite;
  animation-play-state: paused;
}

.cd-player.is-playing .cd-disc {
  visibility: visible;
  animation-play-state: running;
}

.cd-cover {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  width: calc(100% - 19px);
  height: calc(100% - 8px);
  object-fit: cover;
  border: 1px solid #738a9d;
  border-radius: 3px;
}

.cd-hinge {
  position: absolute;
  z-index: 4;
  top: 4px;
  bottom: 4px;
  left: 3px;
  width: 12px;
  background: linear-gradient(90deg, #354752ad, #efffff66, #455b67ad);
  border: 1px solid #d3e1e3;
  border-radius: 3px;
}

.cd-display {
  margin-top: 30px; /* Increased from 10px for a bigger gap */
  padding: 8px 10px;
  color: #053b58;
  background: linear-gradient(#c8eff7, #defaf7);
  border: 1px solid #82b6cc;
  border-radius: 6px;
  box-shadow: inset 0 2px 4px rgba(40, 90, 130, 0.25), 0 1px 0 #fff;
}

.cd-display-status {
  justify-content: flex-start;
  font-size: 8px;
}

.cd-format {
  margin-left: auto;
  opacity: 0.7;
}

.cd-led {
  width: 6px;
  height: 6px;
  background: #8b9eac;
  border-radius: 50%;
}

.cd-player.is-playing .cd-led {
  background: #02c39a;
  box-shadow: 0 0 6px #02c39a;
}

.cd-display p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.cd-player-footer {
  padding: 8px 3px 2px;
  font-size: 7px;
}

.cd-speaker {
  width: 43px;
  height: 10px;
  background: repeating-linear-gradient(90deg, #8ba8bf 0 2px, transparent 2px 5px);
  border-radius: 5px;
}

@keyframes cd-spin {
  to { transform: rotate(360deg); }
}

/* =========================================================
   SONG LIST CARDS
========================================================= */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.song-row {
  display: flex;
  min-height: 76px;
  align-items: center;
  padding: 0.6rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 10px rgba(0, 40, 80, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.song-row:hover,
.song-row:focus-within {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(215, 240, 255, 0.7) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 80, 160, 0.16);
  border-color: #ffffff;
}

/* Selected row highlighted with aqua border and glow */
.song-row.selected {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(195, 235, 255, 0.7) 100%
  );
  border: 1.5px solid #3ab4e8;
  box-shadow:
    0 6px 16px rgba(0, 120, 215, 0.25),
    inset 0 1px 1px #fff;
}

.song-select {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 1rem;
  padding: 0;
  color: #0b3b5b;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.album-art {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: cover;
  border: 2px solid #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 40, 90, 0.2);
}

.song-name {
  display: flex;
  flex-direction: column;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0b3b5b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.song-name small {
  color: #4b6b85;
  font-size: 0.85rem;
  font-weight: 500;
}

/* =========================================================
   VOICE COACH PANEL & AERO BUTTON
========================================================= */
.voice-coach {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem 1.4rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(220, 242, 255, 0.55) 100%);
  border-top: 1.5px solid #ffffff;
  border-bottom: 1.5px solid rgba(135, 185, 220, 0.6);
  box-shadow: 0 6px 14px rgba(0, 50, 100, 0.08), inset 0 1px 1px #fff;
  margin-bottom: 1.5rem;
}

.coach-start-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.coach-start-controls p {
  color: #4b6b85;
  font-size: 0.92rem;
  font-weight: 600;
}

/* Frutiger Aero Voice Coach Pill Button */
.coach-button {
  padding: 0.65rem 1.35rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #0b3b5b;
  border-radius: 30px;
  cursor: pointer;
  border-top: 1.5px solid #fff;
  border-left: 1px solid rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1.5px solid rgba(135, 185, 220, 0.7);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(225, 245, 255, 0.6) 48%,
    rgba(168, 225, 255, 0.6) 52%,
    rgba(140, 215, 255, 0.8) 100%
  );
  box-shadow: 0 4px 10px rgba(0, 70, 130, 0.15), inset 0 1px 1px #fff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.coach-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 120, 215, 0.25);
}

.coach-copy p {
  font-family: sans-serif;
  font-size: 0.92rem;
  color: #3b5b75;
  line-height: 1.45;
}

.coach-transcript:not(:empty) {
  color: #06406b;
  font-style: italic;
  font-weight: 600;
}

/* =========================================================
   BIG "DANCE" CTA BUTTON (Matches .btn-ready from home)
========================================================= */
.dance-button {
  display: block;
  width: 100%;
  padding: 1.1rem 2rem;
  margin: 0 auto 0.75rem;
  font-family: "Sci Fied", "Typo Round", sans-serif;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #0b3b5b;
  text-align: center;
  border-radius: 40px;
  cursor: pointer;
  user-select: none;

  /* Frosted Aero Glass Gradient */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(215, 238, 255, 0.45) 50%,
    rgba(180, 225, 255, 0.75) 100%
  );
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);

  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1.5px solid rgba(135, 185, 220, 0.7);

  box-shadow:
    0 8px 22px rgba(0, 70, 130, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(70, 150, 220, 0.25);

  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dance-button:hover {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(235, 250, 255, 0.7) 48%,
    rgba(168, 225, 255, 0.7) 52%,
    rgba(120, 205, 255, 0.9) 100%
  );
  color: #032d47;
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    0 12px 28px rgba(0, 120, 215, 0.3),
    0 0 16px rgba(120, 215, 255, 0.5),
    inset 0 1px 2px rgba(255, 255, 255, 1);
}

.dance-button:active {
  transform: translateY(1px) scale(0.99);
}

.status {
  min-height: 1.2em;
  margin: 0;
  color: #4b6b85;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* =========================================================
   VOICE WAVE POPUP (Mic Active)
========================================================= */
.voice-wave {
  position: fixed;
  z-index: 20;
  bottom: 1.5rem;
  left: 1.5rem;
  display: flex;
  width: min(290px, calc(100vw - 3rem));
  height: 64px;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  overflow: hidden;
  border-radius: 20px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(215, 240, 255, 0.85) 100%
  );
  backdrop-filter: blur(12px);
  border: 1.5px solid #ffffff;
  box-shadow: 0 10px 25px rgba(0, 45, 90, 0.25);
  animation: wave-pop 180ms ease-out both;
}

.voice-wave[hidden] {
  display: none;
}

.wave-label {
  flex: 0 0 auto;
  color: #0b3b5b;
  font-family: "Sci Fied", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-shadow: 0 1px #fff;
}

.wave-bars {
  display: flex;
  min-width: 0;
  height: 40px;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.wave-bars span {
  width: 3px;
  min-width: 2px;
  height: 5px;
  background: linear-gradient(180deg, #3ab4e8 0%, #0575b3 100%);
  border-radius: 99px;
  box-shadow: 0 0 4px rgba(58, 180, 232, 0.6);
  transition: height 55ms linear;
}

.wave-glint {
  position: absolute;
  top: -35px;
  left: -55%;
  width: 35%;
  height: 150px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  pointer-events: none;
  transform: rotate(24deg);
  animation: wave-glint 2.4s ease-in-out infinite;
}

@keyframes wave-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wave-glint {
  0%, 25% { left: -55%; }
  75%, 100% { left: 125%; }
}

/* =========================================================
   RESPONSIVE ADJUSTMENTS
========================================================= */
@media (max-width: 1260px) {
  .song-panel {
    margin-right: 0;       /* Centers the panel normally on narrower screens */
    width: min(100%, 640px);
  }

  .cd-player {
    position: relative;    /* Stacks above the panel while staying in front of the clouds. */
    margin: 0 auto 1.5rem auto;
    width: 250px;
  }

  body {
    flex-direction: column;
  }
}
