/* 1. Variabel Warna & Animasi */

:root {

  --color-primary: #d4a7b7; /* Dusty Pink */

  --color-secondary: #fdfaf7; /* Krem Sangat Muda (Kartu) */

  --color-text: #6a4c6a; /* Ungu Gelap Lembut */

  --color-overlay: rgba(253, 250, 247, 0.95); /* Overlay lebih solid */

  

  --font-heading: 'Great Vibes', cursive;

  --font-body: 'Montserrat', sans-serif;

  --size-names-mobile: 3.2rem; 

  

  --animation-duration: 1.5s;

}



.ring-icon {

  width: 80px;

  height: auto;

  display: block;

  margin: 0 auto 10px auto; 

  opacity: 0;

  animation: fadeIn 0.8s ease-out forwards;

  animation-delay: 0.5s;

}



/* Keyframes untuk Animasi Fade-In */

@keyframes fadeIn {

    from { opacity: 0; transform: translateY(15px); }

    to { opacity: 1; transform: translateY(0); }

}



/* KEYFRAMES UNTUK TEKS BERJALAN */

@keyframes scrollText {

    0% { transform: translateX(100%); }

    100% { transform: translateX(-100%); }

}



/* Reset Dasar dan FIX UNTUK NO SCROLL */

* {

  margin: 0;

  padding: 0;

  box-sizing: border-box;

}



/* FIX UTAMA: Mencegah scrolling pada halaman */

html, body {

    overflow: hidden; /* Menonaktifkan scroll */

    height: 100%; /* Memastikan elemen mengambil 100% tinggi viewport */

}



/* 2. Latar Belakang dengan FIX Alignment dan Background Image */

body {

  font-family: var(--font-body);

  color: var(--color-text);

  min-height: 100vh;

  display: flex;

  justify-content: center;

  

  /* FIX 2: Tengahkan Kartu Vertikal agar pas di tengah layar statis */

  align-items: center; 

  

  text-align: center;

  padding: 0; 

  overflow-x: hidden; 

  

  /* Perbaikan properti background-image */

  background-image: url('assets/Bg_Depan.png'); 

  background-size: cover; 

  background-position: center 20%; 

  background-repeat: no-repeat;

  background-attachment: fixed; 

  background-color: #fcebeb; 

}



/* 3. Kartu Undangan (Cover) dengan FIX HEIGHT */

.cover {

  max-width: 400px; 

  width: 90%; 

  

  /* FIX 3: Gunakan max-height untuk memastikan kartu tidak melebihi layar */

  max-height: 95vh; 

  /* Jika konten melebihi max-height, scroll hanya terjadi di dalam kartu */

  overflow-y: auto; 

  

  /* Hapus margin-top/bottom karena align-items: center di body sudah menengahkan */

  margin: auto; 

  

  /* Padding disesuaikan agar konten ringkas di HP */

  padding: 30px 25px; 

  border-radius: 20px; 

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); 

  position: relative; 

  overflow-x: hidden; /* Hanya Y yang diizinkan auto */

  border: 3px solid var(--color-primary); 

  animation: fadeIn var(--animation-duration) ease-out forwards;

  opacity: 0; 

  animation-delay: 0.2s;

}



/* --- OVERLAY KARTU --- */

.cover::before {

  content: '';

  position: absolute;

  top: 0;

  left: 0;

  right: 0;

  bottom: 0;

  background-color: var(--color-overlay); 

  z-index: -1; 

}



/* Elemen Dekoratif dari assets (tetap sama) */

.decorative-border-top, .decorative-border-bottom {

  position: absolute;

  left: 0;

  width: 100%;

  height: 80px; 

  background-repeat: no-repeat;

  background-size: contain; 

  opacity: 0.7; 

  pointer-events: none; 

  z-index: 1; 

}



.decorative-border-top {

  top: 0;

  background-image: url('assets/flower-border-top.png'); 

  background-position: center top;

}



.decorative-border-bottom {

  bottom: 0;

  background-image: url('assets/flower-border-bottom.png'); 

  background-position: center bottom;

}



/* GAYA KHUSUS UNTUK NAMA TAMU (#guest-name) */

#guest-name {

    font-family: var(--font-body);

    font-size: 1.0rem; 

    font-weight: 400;

    line-height: 1.4;

    color: var(--color-text);

    margin: 35px 0 10px; 

    opacity: 0.8;

}



#guest-name strong {

    font-weight: 700;

    color: var(--color-primary);

    font-size: 1.2em; 

    display: block; 

}



/* Teks Utama Cover (tetap sama) */

.cover h1 {

  font-size: 0.95rem;

  letter-spacing: 2px;

  margin-top: 5px; 

  margin-bottom: 5px;

  opacity: 0.8;

  color: var(--color-text);

  animation: fadeIn 0.8s ease-out forwards;

  opacity: 0;

  animation-delay: 0.8s;

}



.cover .names {

  font-family: var(--font-heading);

  font-size: var(--size-names-mobile); 

  margin: 15px 0 8px;

  color: var(--color-primary); 

  animation: fadeIn 0.8s ease-out forwards;

  opacity: 0;

}



.connector, .date-text {

    color: var(--color-text);

    opacity: 0; 

    animation: fadeIn 0.8s ease-out forwards;

}



/* 4. Tombol dengan Efek Hover Animasi */

.open-btn {

  background: var(--color-primary); 

  color: #ffffff;

  border: none;

  padding: 12px 30px; 

  font-size: 1rem;

  font-weight: 700;

  border-radius: 50px;

  cursor: pointer;

  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  box-shadow: 0 6px 15px rgba(212, 167, 183, 0.6); 

  letter-spacing: 0.8px;

  text-transform: uppercase;

  max-width: 90%; 

  width: auto;

  animation: fadeIn 0.8s ease-out forwards;

  opacity: 0;

  animation-delay: 1.6s;

  margin-bottom: 5px; /* Tambahkan sedikit margin-bottom agar tombol tidak mepet */

}



.open-btn:hover {

  background: #b88f9f; 

  transform: scale(1.05) rotateZ(1deg); 

  box-shadow: 0 10px 20px rgba(212, 167, 183, 0.8);

}



/* 5. Media Queries */

@media (min-width: 550px) {

  .cover { 

    max-width: 550px; 

    padding: 80px 40px; 

    /* Hapus margin-top/bottom di sini juga */

  }

  .cover h1 { margin-top: 5px; }

  .running-text-container { top: 60px; }

  .cover .names { font-size: 4.5rem; }

  #guest-name { margin: 10px 0 15px; }

}