* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  background: #111;
}

img { image-rendering: -webkit-optimize-contrast; }

@keyframes scrollLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes cdSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes particleFall {
  0% { top: -10%; }
  100% { top: 110%; }
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #111;
  background-image: url('../assets/sgon26-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 48px 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.column {
  width: 100%;
  max-width: 672px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* 1. Carousel */
.carousel-card {
  width: 100%;
  max-width: 672px;
  background: rgba(0, 0, 0, .2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .4);
  padding: 24px 0;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 0 24px;
  animation: scrollLoop 22s linear infinite;
}

.carousel-track img {
  width: 190px;
  height: 240px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .4);
  flex-shrink: 0;
}

/* 2. Music player */
.music-card {
  width: 100%;
  max-width: 672px;
  background: rgba(0, 0, 0, .3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .4);
  padding: 32px;
}

.music-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.album-art {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
  flex-shrink: 0;
}

.music-info { min-width: 0; }

.music-title {
  margin: 0;
  font-weight: 600;
  font-size: 19px;
  color: #f3f2f2;
}

.music-artist {
  margin: 4px 0 0;
  font-size: 15px;
  color: #9a9a9a;
}

.play-row {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #f3f2f2;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.play-btn:hover { background: rgba(255, 255, 255, .16); }

.lyrics {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lyric-line {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-style: italic;
  font-weight: 500;
  font-size: 19px;
  color: #d4d4d4;
  text-align: center;
}

/* 3. Broken CD trigger */
.broken-cd-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  margin: 16px 0;
}

.broken-cd-btn {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform .5s ease;
}
.broken-cd-btn:hover { transform: scale(1.1); }

.broken-cd-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, .2));
  opacity: .8;
  transition: opacity .2s ease;
}
.broken-cd-btn:hover .broken-cd-img { opacity: 1; }

/* 4. Spinning CD + caption */
.cd-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 64px;
  margin-bottom: 80px;
  position: relative;
  z-index: 20;
}

.cd-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-box {
  position: relative;
  width: min(90vw, 320px);
  height: min(90vw, 320px);
  cursor: pointer;
}
@media (min-width: 768px) {
  .cd-box {
    width: min(90vw, 380px);
    height: min(90vw, 380px);
  }
}

.cd-case {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, .5));
}

.cd-disc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  clip-path: circle(46% at 50% 50%);
  animation: cdSpin 12s linear infinite;
}

.cd-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12%;
  height: 12%;
  border: 4px solid rgba(17, 17, 17, .4);
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
}

.caption-btn {
  margin-top: 24px;
  padding: 12px 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #d4d4d4;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 1.8vw, 17px);
  letter-spacing: .05em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .5);
  transition: all .3s ease;
}
.caption-btn:hover {
  background: rgba(0, 0, 0, .7);
  transform: scale(1.05);
}

/* 5. Letter */
.letter-card {
  width: 100%;
  max-width: 672px;
  background: rgba(15, 15, 15, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .5);
  padding: 40px;
}

.letter-inner {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .9s ease, opacity .6s ease;
}
.letter-inner.open {
  max-height: 9000px;
  opacity: 1;
}

.letter-text {
  text-align: left;
  color: #e5e5e5;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.9;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: .01em;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.letter-text p { margin: 0; }
.letter-text .justify {
  text-align: justify;
  text-wrap: pretty;
}

/* Lily particles */
.particle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.lily-particle {
  position: absolute;
  top: -15%;
  opacity: .8;
  pointer-events: none;
  animation-name: particleFall;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}
.lily-particle img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* 6. Cinematic quote modal */
.modal-overlay[hidden] {
  display: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 16px;
  animation: fadeIn 1.5s ease;
}

.modal-frame {
  position: relative;
  max-width: 672px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(255, 200, 0, .2);
  border: 1px solid rgba(255, 255, 255, .1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 20;
  background: none;
  border: none;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  padding: 8px;
  transition: color .2s ease;
}
.modal-close:hover { color: #fff; }

.modal-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .3;
  mix-blend-mode: screen;
}

.modal-quote-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 48px;
  text-align: center;
}

.modal-quote {
  margin: 0;
  color: #e5e5e5;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.8;
  white-space: pre-wrap;
  letter-spacing: .02em;
  font-style: italic;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5));
}
