/* ===== RESET DASAR ===== */
* {
  box-sizing: border-box;
}

/* ===== BODY / BACKGROUND ===== */
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f1c2e, #1b2f4a);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #f5f0e8;
}

/* ===== CARD / BOX TENGAH ===== */
.card {
  background: linear-gradient(180deg, #3a4b63, #2f3e52);
  padding: 40px;
  border-radius: 30px;
  width: 330px;
  text-align: center;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Card khusus surat */
.card.long {
  width: 380px;
  background: linear-gradient(180deg, #425673, #344860);
  padding: 45px 35px;
}

/* ===== JUDUL ===== */
h1, h2 {
  color: #e6dccf;
  margin-top: 0;
}

.card.long h2 {
  margin-bottom: 26px;
  letter-spacing: 0.6px;
}

/* ===== TEKS UMUM ===== */
.text,
.hint {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 15px;
}

/* ===== INPUT PASSWORD ===== */
input {
  width: 100%;
  padding: 12px;
  border-radius: 20px;
  border: none;
  margin-bottom: 15px;
  text-align: center;
  background: #e6dccf;
  color: #1e2a38;
  font-size: 14px;
}

/* ===== BUTTON ===== */
button,
.btn {
  background: #e6dccf;
  color: #1e2a38;
  padding: 12px 26px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

button:hover,
.btn:hover {
  transform: scale(1.05);
  opacity: 0.95;
}

/* ===== MINI GAME HEART ===== */
#heart {
  font-size: 48px;
  cursor: pointer;
  margin: 20px 0;
}

/* Pop animation */
.pop {
  animation: pop 0.3s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Floating hearts */
.floating-heart {
  position: absolute;
  font-size: 18px;
  animation: floatUp 1.2s ease forwards;
  pointer-events: none;
}

@keyframes floatUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-60px); }
}

/* ===== LETTER / SURAT (FINAL FIX) ===== */
.letter {
  text-align: center;
}

.letter p {
  margin: 0 0 16px 0;
  line-height: 1.9;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: #f2eee8;
}

/* ===== TANDA TANGAN ===== */
.sign {
  margin-top: 36px;
  font-size: 13px;
  opacity: 0.85;
  font-style: italic;
}

/* ===== UTIL ===== */
.hidden {
  display: none;
}

/* ===== RESPONSIVE (HP) ===== */
@media (max-width: 480px) {
  .card {
    width: 90%;
    padding: 36px 28px;
  }

.hearts {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* biar nggak ganggu klik */
  overflow: visible;
}

.heart {
  position: absolute;
  font-size: 16px;
  opacity: 0;
  animation: rise 2s forwards;
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(0.5);
    opacity: 0;
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1);
  }
  100% {
    transform: translateY(-60px) scale(1.2);
    opacity: 0;
  }
}
  .card.long {
    width: 92%;
    padding: 40px 26px;
  }

  .letter p {
    font-size: 13.5px;
  }
}