:root {
  color-scheme: light;
  --bg: #ffffff;
  --card: #ffffff;
  --card-border: #000000;
  --text: #000000;
  --muted: #666666;
  --accent: #000000;
  --accent-soft: rgba(0, 0, 0, 0.05);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.heart-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.background-heart {
  position: absolute;
  left: var(--left);
  bottom: var(--bottom);
  color: rgba(0, 0, 0, var(--alpha));
  font-size: var(--size);
  line-height: 1;
  transform: translate3d(0, 0, 0) rotate(var(--tilt));
  animation: floatUp var(--duration) linear forwards;
  will-change: transform, opacity;
  user-select: none;
}

.card {
  position: relative;
  z-index: 1;
  width: min(92vw, 460px);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
  animation: rise 420ms ease-out both;
}

.card--gate {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  font-family: "Fjalla One", sans-serif;
}

.card--reveal {
  display: none;
}

.reveal-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: none; /* Controlled by JS */
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--bg);
  z-index: 100;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

/* Mobile: Switch to Vertical Scrolling */
@media (max-width: 767px) {
  .reveal-container {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }

  .horizontal-page {
    flex: 0 0 100vh;
    width: 100vw;
    height: 100vh;
    padding: 60px 20px;
  }

  .vertical-title-container {
    padding-bottom: 20px;
  }

  .library-title.rotated {
    transform: none;
    letter-spacing: 0.2em;
    font-size: 2.5rem;
  }

  .music-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-bottom: 120px;
  }
}

.reveal-container::-webkit-scrollbar {
  display: none;
}

.horizontal-page {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
  padding: 40px;
}

.quote-content {
  max-width: 800px;
  text-align: center;
  font-family: "Alumni Sans", sans-serif;
}

.main-quote {
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 24px;
}

.quote-subtext {
  font-family: "Alumni Sans", sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 160ms ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quote-subtext:hover {
  color: var(--text);
}

.split-content {
  display: flex;
  align-items: center;
  gap: clamp(20px, 5vw, 60px);
  width: min(90%, 1000px);
  text-align: left;
}

.content-left {
  flex: 0 0 clamp(200px, 35vw, 400px);
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #f0f0f0;
  border: 1px solid var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
}

.main-photo,
.main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%); /* Force monochromatic look */
}

.placeholder-icon {
  font-size: 3rem;
  opacity: 0.2;
}

.content-right {
  flex: 1;
  font-family: "Antic", sans-serif;
}

.romantic-text {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 20px;
}

.gallery-trigger {
  font-family: "Antic", sans-serif;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--text);
  background: none;
  border: none;
  border-bottom: 2px solid var(--text);
  padding: 4px 0;
  cursor: pointer;
  transition: opacity 160ms ease;
  text-transform: lowercase;
}

.gallery-trigger:hover {
  opacity: 0.6;
}

.music-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  padding-bottom: 90px; /* Space for fixed bottom bar */
}

.vertical-title-container {
  flex: 0 0 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-right: 1px solid rgba(0,0,0,0.1);
}

.library-title.rotated {
  font-family: "NCL Gasdrifo Demo", sans-serif;
  font-size: clamp(2.5rem, 10vh, 5rem);
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-90deg);
  margin: 0;
}

.music-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 60px;
}

.song-list-panel {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.song-stack {
  display: flex;
  flex-direction: column;
  gap: 1px; /* Minimalist line between cards */
  background: #000000; /* Create lines using background and gap */
  border: 1px solid #000000;
}

.song-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 16px 24px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
  border: none; /* Borders handled by stack background */
}

.song-card:hover {
  background: #f9f9f9;
}

.song-card.active {
  background: #000000;
  color: #ffffff;
}

.song-info-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.song-card h3 {
  font-family: "Antonio", sans-serif;
  font-size: 1.2rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.song-card p {
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  margin: 0;
  opacity: 0.7;
}

.song-duration {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.song-card.active .song-duration {
  opacity: 1;
}

.bottom-player-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: #ffffff;
  border-top: 1px solid #000000;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  align-items: center;
  padding: 0 40px;
  z-index: 10;
}

.bar-track-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#localTrackName {
  font-family: "Antonio", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.artist-muted {
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
}

.bar-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

.control-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms ease;
}

.control-btn:hover {
  transform: scale(1.1);
}

.control-btn .icon {
  font-size: 1.4rem;
}

.play-btn .icon {
  font-size: 2rem;
}

.bar-progress-area {
  display: flex;
  justify-content: flex-end;
}

.time-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
}

.seek-slider {
  width: 150px;
  height: 3px;
  appearance: none;
  background: #e0e0e0;
  outline: none;
}

.seek-slider::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  background: #000000;
  border-radius: 50%;
  cursor: pointer;
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 60px 20px;
}

.close-gallery {
  position: fixed;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid var(--text);
  color: var(--text);
  padding: 8px 16px;
  font-family: "Fjalla One", sans-serif;
  cursor: pointer;
  z-index: 210;
}

.gallery-content {
  width: min(90%, 1200px);
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.gallery-title {
  font-family: "NCL Gasdrifo Demo", sans-serif;
  font-size: clamp(3rem, 10vw, 6rem);
  color: var(--text);
  text-align: center;
  margin: 0;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  aspect-ratio: 1;
  background: #f9f9f9;
  border: 1px solid var(--text);
  transition: transform 300ms ease, background 300ms ease;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%); /* Force monochromatic look */
}

.gallery-item:hover {
  background: #f0f0f0;
  transform: scale(1.02);
}

.pin-form {
  margin-top: 32px;
  display: grid;
  gap: 24px;
}

.otp-container {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.otp-container input {
  width: 50px;
  height: 60px;
  border-radius: 0;
  border: 1px solid #000000;
  background: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  outline: none;
  transition: box-shadow 160ms ease;
  font-family: "Fjalla One", sans-serif;
}

.otp-container input:focus {
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.pin-form button {
  min-height: 52px;
  font-family: "Fjalla One", sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  color: white;
  background: #000000;
  border: 1px solid #000000;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.pin-form button:hover {
  opacity: 0.8;
}

.error {
  min-height: 1.25em;
  margin-top: 10px;
  color: #000000;
  font-size: 0.94rem;
  font-family: "Fjalla One", sans-serif;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes floatUp {
  0% {
    transform: translate3d(0, 0, 0) rotate(var(--tilt));
    opacity: 0;
  }
  10% {
    opacity: var(--alpha);
  }
  100% {
    transform: translate3d(var(--drift), -128vh, 0) rotate(calc(var(--tilt) + var(--spin)));
    opacity: 0;
  }
}

.love-letter {
  text-align: center;
  max-width: 700px;
  padding: 40px;
  animation: rise 1s ease-out;
}

.banner-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: clamp(250px, 35vh, 500px);
  margin-bottom: 60px;
  border-top: 1px solid var(--text);
  border-bottom: 1px solid var(--text);
  overflow: hidden;
  line-height: 0;
}

.banner-image {
  width: 100%;
  height: 100%;
  filter: grayscale(100%);
  display: block;
  object-fit: cover;
  object-position: center;
}

.big-red-heart {
  font-size: clamp(5rem, 15vw, 10rem);
  color: #ff0000;
  filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.2));
  animation: heartPulse 2s infinite ease-in-out;
  margin-bottom: 20px;
}

.love-message {
  font-family: "Prata", serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--text);
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.poem-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.poem-line {
  font-family: "Prata", serif;
  font-style: italic;
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--muted);
  line-height: 1.6;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .music-container {
    flex-direction: column;
    padding-bottom: 120px;
  }
  
  .vertical-title-container {
    flex: 0 0 80px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }
  
  .library-title.rotated {
    transform: none;
    font-size: 2rem;
  }
  
  .bottom-player-bar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 15px 20px;
    gap: 10px;
  }
  
  .bar-controls {
    order: 1;
  }
  
  .bar-track-info {
    order: 2;
    text-align: center;
  }
  
  .bar-progress-area {
    order: 3;
    justify-content: center;
  }
}
