/* ==========================================================================
   Dollblush - Index Page Styles (Beach Theme)
   ========================================================================== */

/* Beach sunset gradient background */
body.secret-page {
  background:
    radial-gradient(120% 80% at 85% 15%, rgba(255, 154, 108, 0.08) 0%, transparent 60%),
    radial-gradient(90% 70% at 15% 75%, rgba(102, 204, 204, 0.06) 0%, transparent 65%),
    radial-gradient(80% 60% at 60% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, #ffeaa7 0%, #fab1a0 25%, #e17055 50%, #2d3436 80%, #0b1426 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  color: #f4f1e8;
  animation: subtle-wave-flow 12s ease-in-out infinite alternate;
}

@keyframes subtle-wave-flow {
  0% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  100% { background-position: 5% 3%, -3% 2%, 2% -2%, 0% 0%; }
}

/* Hero Section */
.hero-romance {
  position: relative;
  min-height: 300vh;
  padding: 0;
  margin: 0;
  background:
    radial-gradient(80% 120% at 75% 20%, rgba(255, 154, 108, 0.22) 0%, transparent 65%),
    radial-gradient(70% 100% at 25% 85%, rgba(102, 204, 204, 0.18) 0%, transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #ffeaa7 0%, #fab1a0 20%, #e17055 45%, #2d3436 75%, #0b1426 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: scroll;
  overflow: visible;
  animation: subtle-wave-flow 12s ease-in-out infinite alternate;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 8rem;
  padding-top: 8rem;
  width: 100%;
}

@keyframes gentle-shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.02); }
}

/* Hero Card */
.hero-card {
  width: 100%;
  max-width: 900px;
  background: linear-gradient(180deg, rgba(27, 38, 44, 0.80), rgba(11, 20, 38, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4), 0 4px 20px rgba(102, 204, 204, 0.1);
  backdrop-filter: blur(6px) saturate(130%);
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-card:hover {
  background: linear-gradient(180deg, rgba(27, 38, 44, 0.85), rgba(11, 20, 38, 0.92));
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.5),
    0 8px 30px rgba(102, 204, 204, 0.2),
    0 0 40px rgba(255, 154, 108, 0.08);
  backdrop-filter: blur(10px) saturate(140%);
  transform: translateY(-2px);
}

.hero-card h1 {
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 0.75rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-card h1 .accent {
  color: #ff9a6c;
}

.hero-card p.lead {
  color: #e8dcc0;
}

.hero-card p {
  color: #f4f1e8;
}

/* Unified Content Area */
.unified-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem 2rem 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 300vh;
}

.content-section {
  margin-bottom: 8rem;
  position: relative;
  z-index: 2;
}

/* Scene Card */
.scene {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  line-height: 1.9;
  font-size: 1.1rem;
  color: #f4f1e8;
  padding: 2.5rem;
  background: linear-gradient(180deg,
    rgba(11, 20, 38, 0.72) 0%,
    rgba(11, 20, 38, 0.62) 30%,
    rgba(11, 20, 38, 0.52) 60%,
    rgba(11, 20, 38, 0.42) 100%);
  border-radius: 16px;
  backdrop-filter: blur(1px);
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.scene:hover {
  background: linear-gradient(180deg,
    rgba(11, 20, 38, 0.78) 0%,
    rgba(11, 20, 38, 0.68) 30%,
    rgba(11, 20, 38, 0.58) 60%,
    rgba(11, 20, 38, 0.48) 100%);
  backdrop-filter: blur(8px) saturate(115%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.35),
    0 0 30px rgba(102, 204, 204, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.scene p {
  margin: 0 0 1.15rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Typing cursor for letter */
.letter.typing::after {
  content: '|';
  display: inline;
  animation: letter-cursor-blink 0.8s infinite;
  margin-left: 1px;
}

@keyframes letter-cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ==========================================================================
   Ocean Sound Toggle
   ========================================================================== */

.ocean-toggle {
  position: fixed;
  bottom: 2rem;
  right: 3rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 20, 38, 0.8);
  color: #66cccc;
  font-size: 1.2rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ocean-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.ocean-toggle.active {
  background: #66cccc;
  color: #0b1426;
  box-shadow: 0 8px 25px rgba(102, 204, 204, 0.3);
}

.ocean-toggle.active:hover {
  box-shadow: 0 10px 30px rgba(102, 204, 204, 0.4);
}

/* ==========================================================================
   Password Overlay
   ========================================================================== */

.password-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0a0e1a 0%, #0d1220 40%, #0b1426 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(0);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.2s cubic-bezier(0.4, 0, 0.2, 1),
              backdrop-filter 1.2s ease;
  overflow: hidden;
}

.password-overlay .star-galaxy {
  position: absolute;
  top: 0;
  left: 0;
  width: 200vw;
  height: 200vh;
  animation: camera-pan 90s ease-in-out 1s infinite;
}

@keyframes camera-pan {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-100vw, -100vh); }
}

.password-overlay .star {
  position: absolute;
  filter: drop-shadow(0 0 3px currentColor)
          drop-shadow(0 0 6px currentColor)
          drop-shadow(0 0 10px currentColor)
          drop-shadow(0 0 14px currentColor);
  animation: star-fade-in 1s ease-out forwards;
}

.password-overlay .star > div {
  position: relative;
  width: 100%;
  height: 100%;
}

.password-overlay .star > div::before,
.password-overlay .star > div::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: currentColor;
}

.password-overlay .star > div::before {
  clip-path: polygon(
    50% 0%,
    52% 30%,
    55% 50%,
    52% 70%,
    50% 100%,
    48% 70%,
    45% 50%,
    48% 30%
  );
}

.password-overlay .star > div::after {
  clip-path: polygon(
    50% 0%,
    52% 30%,
    55% 50%,
    52% 70%,
    50% 100%,
    48% 70%,
    45% 50%,
    48% 30%
  );
  transform: rotate(90deg);
}

.password-container {
  position: relative;
  z-index: 100;
  text-align: center;
  padding: 3rem;
  max-width: 550px;
  width: 90%;
}

.password-title {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(102, 204, 204, 0.3);
  line-height: 1.4;
}

.password-input-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.password-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  background: rgba(11, 20, 38, 0.85);
  border: 2px solid rgba(102, 204, 204, 0.3);
  border-radius: 12px;
  color: #f4f1e8;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
}

.password-input::placeholder {
  color: rgba(244, 241, 232, 0.4);
}

.password-input:focus {
  border-color: rgba(102, 204, 204, 0.6);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(102, 204, 204, 0.2);
  background: rgba(11, 20, 38, 0.95);
}

.password-input.shake {
  animation: input-shake 0.5s ease;
}

@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

.password-error {
  color: #ff9a6c;
  font-size: 0.95rem;
  margin-top: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.password-error.show {
  opacity: 1;
}

.password-hint {
  color: rgba(244, 241, 232, 0.5);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

body.password-locked {
  overflow: hidden !important;
  height: 100vh;
}

.password-overlay.unlocking {
  opacity: 0;
  transform: scale(1.1);
  backdrop-filter: blur(20px);
  pointer-events: none;
}

/* Ensure content stays above stars */
.unified-content,
.hero-card,
.scene,
.letter-card {
  position: relative;
  z-index: 3;
}

/* Compositing fixes */
.scene { will-change: transform; transform: translateZ(0); }
.ocean-toggle { will-change: transform; transform: translateZ(0); }

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large desktop (1440p+) */
@media (min-width: 1600px) {
  .unified-content {
    padding: 3rem 3rem 8rem;
  }

  .hero-content {
    margin-bottom: 10rem;
    padding-top: 10rem;
  }

  .hero-card {
    max-width: 1000px;
    padding: 3rem;
  }

  .scene {
    max-width: 1100px;
    padding: 3rem;
    font-size: 1.15rem;
  }

  .letter-wrap {
    max-width: 1000px;
  }

  .content-section {
    margin-bottom: 10rem;
  }
}

/* Standard desktop (1080p - 1440p) */
@media (min-width: 1200px) and (max-width: 1599px) {
  .unified-content {
    padding: 2rem 4rem 6rem;
  }

  .hero-content {
    padding-top: 6rem;
    margin-bottom: 6rem;
  }

  .hero-card {
    max-width: 850px;
    padding: 2rem 2.5rem;
  }

  .scene {
    max-width: 900px;
    padding: 2rem;
    font-size: 1.08rem;
  }

  .letter-wrap {
    max-width: 850px;
  }

  .content-section {
    margin-bottom: 6rem;
  }
}

/* Tablet screens */
@media (min-width: 768px) and (max-width: 1199px) {
  .unified-content {
    padding: 1.5rem 3rem 5rem;
  }

  .hero-content {
    padding-top: 4rem;
    margin-bottom: 4rem;
  }

  .hero-card {
    max-width: 700px;
    padding: 1.5rem 2rem;
  }

  .scene {
    max-width: 750px;
    padding: 1.5rem;
    font-size: 1.05rem;
  }

  .content-section {
    margin-bottom: 4rem;
  }
}

/* Mobile devices */
@media (max-width: 767px) {
  .hero-romance {
    min-height: 200vh;
  }

  .unified-content {
    padding: 1rem 1rem 4rem;
    min-height: 200vh;
  }

  .hero-content {
    padding-top: 3rem;
    margin-bottom: 3rem;
  }

  .hero-card {
    max-width: 95%;
    padding: 1.25rem 1.5rem;
  }

  .scene {
    max-width: 95%;
    padding: 1.25rem;
    font-size: 1rem;
  }

  .content-section {
    margin-bottom: 3rem;
  }

  .letter-card {
    border-radius: 12px;
  }

  .ocean-toggle {
    bottom: 1.5rem;
    right: 2.3rem;
    width: 55px;
    height: 55px;
    font-size: 1.1rem;
  }

  /* Mobile: remove backdrop-filter and reduce heavy shadows */
  .hero-card, .scene {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
  }

  .hero-card:hover, .scene:hover {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none;
  }

  .letter-card:hover {
    transform: none;
  }

  .password-container {
    padding: 2rem 1.5rem;
  }

  .password-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .password-input {
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
  }
}
