/* 🖤 Import Font Gothic Romantic dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg-dark: #0b0b0d;        /* Hitam pekat gothic */
  --card-bg: #16161a;       /* Abu-abu gelap elegan untuk kartu */
  --text-light: #f5f5f7;     /* Putih gading untuk teks */
  --text-muted: #a0a0ab;     /* Abu-abu pudar untuk subteks */
  --accent-white: #ffffff;   /* Putih murni untuk aksen & border */
  --border-color: #2d2d35;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Cormorant Garamond', Georgia, serif;
  text-align: center;
  overflow-x: hidden;
}

/* 🖤 Typo & Headings */
h1, h2, h3 {
  font-family: 'Cinzel', serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-white);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

h1 { font-size: 2.5rem; margin-bottom: 10px; }
h2 { font-size: 1.8rem; margin-bottom: 25px; }

p {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* 🖤 Layout Sections */
section {
  min-height: 100vh;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#letter {
  justify-content: flex-start;
  padding-top: 80px;
}

/* 🖤 Gothic Buttons */
button {
  background: transparent;
  color: var(--accent-white);
  border: 1px solid var(--accent-white);
  padding: 12px 30px;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s ease;
  margin-top: 15px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

button:hover {
  background-color: var(--accent-white);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* 💌 Letter Card */
.letter-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-white);
  padding: 45px 35px;
  max-width: 680px;
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
  position: relative;
  text-align: left;
}

.letter-card p {
  font-size: 1.15rem;
  line-height: 1.85;
  color: var(--text-light);
  margin-bottom: 22px;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.letter-card p:first-child {
  font-size: 1.3rem;
  font-style: italic;
  color: #ffffff;
  margin-bottom: 25px;
}

.letter-card p:last-child {
  text-align: right;
  font-style: italic;
  font-size: 1.2rem;
  color: #ffffff;
  margin-top: 30px;
  margin-bottom: 0;
}

.letter-card p strong {
  color: #ffffff;
  font-weight: 600;
}

/* 📸 Dark Polaroid Gallery */
.polaroid-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: flex-start;
  max-width: 950px;
}

.polaroid {
  background: #18181c;
  border: 1px solid #33333d;
  color: var(--accent-white);
  padding: 12px 12px 20px 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.9);
  transform: rotate(-2deg);
  width: 250px;
  height: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.polaroid:nth-child(even) {
  transform: rotate(2deg);
}

.polaroid:hover {
  transform: scale(1.05) rotate(0deg);
  box-shadow: 0 12px 30px rgba(255, 255, 255, 0.18);
  z-index: 10;
}

.polaroid img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  display: block;
  filter: grayscale(25%) contrast(110%);
}

.polaroid p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  margin-top: 12px;
  margin-bottom: 0;
  color: var(--text-light);
  text-align: center;
}

/* 🎥 Video Modal (Whisper of Our Eternity) */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  position: relative;
  border: 1px solid var(--accent-white);
  background: var(--card-bg);
  padding: 30px 15px 15px 15px;
  border-radius: 6px;
  width: auto;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.95);
}

.modal-content video {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  color: var(--accent-white);
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 101;
  transition: color 0.3s ease;
  line-height: 1;
}

.close-btn:hover {
  color: #ff4d4d;
}

/* ✨ Stars Animation */
#stars-container {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  animation: pulse infinite alternate;
}

@keyframes pulse {
  0% { opacity: 0.2; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.4); }
}

/* 📱 Responsive Adjustments */
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .polaroid { width: 160px; }
  .polaroid img { height: 160px; }
}

/* 🎥 Video Section Styling Extensions */
.video-desc {
  max-width: 500px;
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 25px;
  color: var(--text-muted);
}

.play-video-btn {
  letter-spacing: 3px;
  padding: 14px 35px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(22, 22, 26, 0.6);
  backdrop-filter: blur(5px);
}

.play-video-btn:hover {
  background: #ffffff;
  color: #0b0b0d;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
}

/* ✉️ Open When Styling */
.section-subtitle {
  font-style: italic;
  margin-bottom: 30px;
  color: var(--text-muted);
}

.envelope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 650px;
  width: 100%;
}

.envelope-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 20px;
  font-size: 1.1rem;
  text-transform: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.envelope-btn:hover {
  border-color: var(--accent-white);
  transform: translateY(-3px);
}

/* Modal Box khusus surat Open When */
.letter-modal-box {
  position: relative;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--accent-white);
  padding: 35px 25px 25px 25px;
  background: var(--card-bg);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.letter-modal-box h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--accent-white);
}

.letter-modal-box p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-light);
  font-style: italic;
}

/* 🌙 Closing Section Styling */
#closing {
  padding: 60px 20px 80px 20px;
}

.closing-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  max-width: 650px;
  width: 100%;
  padding: 40px 30px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.closing-card p {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-light);
}

.closing-card .final-vow {
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-white);
  margin-top: 25px;
  margin-bottom: 30px;
}

/* Tombol Seal Promise */
.vow-btn {
  background: transparent;
  border: 1px solid var(--accent-white);
  padding: 14px 30px;
  font-size: 1rem;
  letter-spacing: 2px;
  transition: all 0.4s ease;
}

.vow-btn:hover {
  background: var(--accent-white);
  color: var(--bg-dark);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Styling Container & Foto Pop-up Open When */
.letter-img-container {
  width: 100%;
  max-width: 100%;
  margin: 15px 0;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.letter-img-container img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  filter: grayscale(20%) contrast(105%);
  transition: transform 0.5s ease;
}

.letter-img-container img:hover {
  transform: scale(1.02);
}