:root {
    --pink: #f14e95;
    --bg: #0a0a0a;
    --shadow: 0 2px 2px rgb(0 0 0/ 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-size: 1.2rem;
    font-family: 'work sans', sans-serif;
    min-height: auto;
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

/* Mobile responsiveness */
@media (max-width: 575px) {
    html {
        font-size: 14px;
    }
}

/* Tablet responsiveness */
@media (min-width: 576px) and (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

.hero::before {
    content: ' ';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/santuy-group.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    filter: brightness(0.5);
    z-index: -1;
}

@media (min-width: 769px) {
    .hero::before {
        background-attachment: scroll;
    }
} 

.hero {
    position: relative;
    min-height: 100vh;
    background-color: transparent;
    width: 100%;
    padding: 1rem;
}

.hero main {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
}

.hero h1, .hero h4, .hero p {
    text-shadow: var(--shadow);
    margin: 0;
    padding: 0;
}

.hero p {
    font-family: 'playwrite de sas', sans-serif;
    font-size: 0.9rem;
    margin: 1.5rem 0 !important;
}

.hero h4 {
    font-family: 'permanent marker', cursive;
    font-size: 1.7rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.hero h1 {
    font-family: 'roboto slab', serif;
    font-size: 3rem;
    margin: 1.5rem 0;
    line-height: 1.2;
}

.hero .btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    background-color: var(--pink);
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    color: white !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(241, 78, 149, 0.4);
}

.hero .btn:hover {
    background-color: #d63f7f;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 78, 149, 0.6);
    color: white !important;
}

#countdown {
    font-size: 1.2rem;
    margin: 1.5rem 0;
}

/* ===== RESPONSIVE HEADING DAN PARAGRAPH ===== */
@media (max-width: 575px) {
    .hero { padding: 1rem; }
    .hero main { padding: 1rem; }
    .hero h1 { font-size: 1.8rem; margin: 0.8rem 0; }
    .hero h4 { font-size: 1rem; margin-bottom: 0.8rem; line-height: 1.3; }
    .hero p { font-size: 0.75rem; margin: 1rem 0 !important; }
    .hero .btn { font-size: 0.85rem; padding: 0.6rem 1.5rem; margin-top: 1.5rem !important; }
    #countdown { font-size: 0.9rem; margin: 1rem 0; }
}

@media (min-width: 576px) and (max-width: 768px) {
    .hero main { padding: 1.5rem; }
    .hero h1 { font-size: 2.2rem; margin: 1rem 0; }
    .hero h4 { font-size: 1.3rem; margin-bottom: 1rem; }
    .hero p { font-size: 0.85rem; margin: 1.2rem 0 !important; }
    .hero .btn { font-size: 0.95rem; padding: 0.7rem 1.8rem; margin-top: 2rem !important; }
    #countdown { font-size: 1rem; margin: 1.2rem 0; }
}

@media (min-width: 769px) {
    .hero h1 { font-size: 3rem; margin: 1.5rem 0; }
    .hero h4 { font-size: 1.7rem; margin-bottom: 1rem; }
    .hero p { font-size: 0.9rem; margin: 1.5rem 0 !important; }
    .hero .btn { font-size: 1rem; padding: 0.75rem 2rem; margin-top: 2rem !important; }
    #countdown { font-size: 1.2rem; margin: 1.5rem 0; }
}

/* ===== SECTION UNDANGAN STYLING ===== */
.undangan {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden; 
}

.undangan::before {
    content: ' ';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image/page2.jpeg');
    background-size: 100% 100%; 
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-color: #0a0a0a;
    z-index: -1;
}

@media (min-width: 769px) {
    .undangan::before { background-attachment: scroll; }
}

.undangan .container-fluid {
    padding: 0;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.undangan h2, .undangan p {
    display: none;
}

@media (max-width: 575px) {
    .undangan { width: 100%; }
    .undangan .container-fluid { width: 100%; min-height: 100vh; box-sizing: border-box; }
}

@media (min-width: 576px) and (max-width: 768px) {
    .undangan { width: 100%; }
    .undangan .container-fluid { width: 100%; min-height: 100vh; box-sizing: border-box; }
}

@media (min-width: 769px) {
    .undangan { width: 100%; min-height: 100vh; }
    .undangan .container-fluid { padding: 0; width: 100%; min-height: 100vh; box-sizing: border-box; }
}

/* ===== CUSTOM COUNTDOWN STYLING ===== */
#countdown { margin: 30px 0; width: 100%; }

.countdown-container {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; flex-wrap: wrap; margin: 20px 0; perspective: 1000px;
}

.countdown-item {
    display: flex; flex-direction: column; align-items: center;
    background: linear-gradient(135deg, rgba(241, 78, 149, 0.2) 0%, rgba(241, 78, 149, 0.05) 100%);
    border: 2px solid var(--pink); border-radius: 15px; padding: 12px 18px; min-width: 65px;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 10px 30px rgba(241, 78, 149, 0.2), 0 0 0 1px rgba(241, 78, 149, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative; overflow: hidden;
}

.countdown-item::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.countdown-item:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
    box-shadow: 0 20px 40px rgba(241, 78, 149, 0.4), 0 0 20px rgba(241, 78, 149, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.countdown-item:hover::before { left: 100%; }

.countdown-number {
    font-size: 1.8rem; font-weight: bold; color: var(--pink); line-height: 1;
    text-shadow: 0 2px 10px rgba(241, 78, 149, 0.3); position: relative; z-index: 1;
}

.countdown-label {
    font-size: 0.75rem; color: #aaa; margin-top: 4px; text-transform: uppercase;
    letter-spacing: 1px; position: relative; z-index: 1;
}

.countdown-separator {
    font-size: 1.2rem; color: var(--pink); margin: 0 2px;
    text-shadow: 0 2px 10px rgba(241, 78, 149, 0.3); animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@media (max-width: 575px) {
    .countdown-container { gap: 4px; }
    .countdown-item { min-width: 45px; padding: 8px 10px; }
    .countdown-number { font-size: 1.2rem; }
    .countdown-label { font-size: 0.65rem; }
    .countdown-separator { font-size: 0.9rem; margin: 0 1px; }
}

@media (min-width: 576px) and (max-width: 768px) {
    .countdown-item { min-width: 55px; padding: 10px 14px; }
    .countdown-number { font-size: 1.4rem; }
}

.hero a { color: var(--pink); background-color: white; box-shadow: var(--shadow); }
.hero a:hover { color: white; background-color: var(--pink); }

.countup-container {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px; padding: 20px;
}

.countup-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(241, 78, 149, 0.1); border: 2px solid var(--pink); border-radius: 10px;
    padding: 15px 20px; min-width: 80px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); transition: all 0.3s ease;
}

.countup-item:hover { box-shadow: 0 8px 16px rgba(241, 78, 149, 0.4); transform: translateY(-5px); }
.countup-number { font-size: 2.5rem; font-weight: bold; color: var(--pink); line-height: 1; text-shadow: var(--shadow); }
.countup-label { font-size: 0.85rem; color: #ccc; margin-top: 8px; text-transform: uppercase; letter-spacing: 1px; text-shadow: var(--shadow); }

@media (max-width: 992px) { html { font-size: 75%; } }
@media (max-width: 768px) { html { font-size: 62.5%; } }
@media (max-width: 576px) { html { font-size: 80%; } }

/* ========================================= */
/* KHUSUS STYLING TEKS BALON MEMORIES PAGE 2 */
/* ========================================= */

.memories-container {
    position: relative;
    width: 100%;
    height: 100vh; 
}

.teks-bubble {
    position: absolute;
    font-family: 'work sans', sans-serif;
    font-size: 1.1vw; 
    color: #000;
    text-align: center;
    width: 18%; 
    line-height: 1.3;
    transform: translate(-50%, -50%); 
    z-index: 2;
}

/* KOORDINAT POSISI BALON (LAPTOP) */
.bubble-kiri { top: 12%; left: 16%; }
.bubble-tengah { top: 10%; left: 43%; }
.bubble-kanan { top: 20%; left: 73%; }
.bubble-cowok { top: 70%; left: 79%; font-weight: bold; width: 18%; }

/* STYLING TEKS PLAYLIST LAGU (LAPTOP) */
.teks-playlist {
    position: absolute;
    top: 65.5%; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 25%;
    text-align: center;
    z-index: 2;
}

.teks-playlist p {
    font-family: 'work sans', sans-serif;
    font-size: 1vw; 
    color: #add8e6; 
    font-weight: bold;
    margin-bottom: 1.4vh; 
    display: block !important; 
}

/* Efek Hover untuk Playlist */
.playlist-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Efek saat lagu dipilih (Aktif) */
.playlist-item.active {
    color: white !important; 
    background-color: var(--pink); 
    border-radius: 8px; 
    padding: 2px 10px; 
    transform: scale(1.1); 
    box-shadow: 0px 4px 15px rgba(241, 78, 149, 0.7); 
    text-shadow: none; 
}

/* Kotak Klik untuk Tombol Play (LAPTOP) */
.play-btn-overlay {
    position: absolute;
    top: 97.2%; 
    left: 50.1%;
    transform: translate(-50%, -50%);
    width: 4.6vw; 
    height: 5vh; 
    background-color: rgba(255, 0, 0, 0.5); /* TANDA MERAH */
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
}


/* =================================================== */
/* FITUR BARU: KALIBRASI OTOMATIS KHUSUS DEVICE HP     */
/* =================================================== */
@media (max-width: 575px) {
    .teks-bubble {
        /* Memperbesar ukuran teks dan wadah agar muat & terbaca di HP */
        font-size: 2.4vw !important; 
        width: 22% !important; 
    }
    
    /* Kalibrasi kordinat balon khusus untuk layar memanjang HP */
    .bubble-kiri { top: 10% !important; left: 17% !important; }
    .bubble-tengah { top: 10% !important; left: 43% !important; }
    .bubble-kanan { top: 22% !important; left: 71% !important; }
    .bubble-cowok { top: 72% !important; left: 79% !important; width: 20% !important; }

    /* Kalibrasi wadah teks lagu khusus HP */
    .teks-playlist {
        top: 65% !important; 
        width: 38% !important; 
    }

    .teks-playlist p {
        font-size: 2.3vw !important; 
        /* Kamu bisa ubah margin-bottom ini kalau jarak antar lagu di HP kurang pas */
        margin-bottom: 2.9vh !important; 
    }

    /* Kalibrasi kotak klik Play merah khusus HP */
    .play-btn-overlay {
        width: 5vw !important; 
        height: 6vh !important;
        /* Ubah nilai top ini untuk menaik-turunkan kotak merah khusus di HP */
        top: 97% !important; 
    }
}