* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #fff9c4, #fff59d, #ffeb3b);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Canvas buat animasi wajah */
#faceCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ============================================
   OVERLAY AUTO-PLAY (Tema Serem Lucu)
   ============================================ */
#startOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 193, 7, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
    transition: opacity 0.6s ease;
}

#startOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: #4a2c00;
    animation: floatUp 2s ease-in-out infinite;
}

.overlay-content .icon-spooky {
    font-size: 6rem;
    display: block;
    animation: wobble 1.5s ease-in-out infinite;
}

.overlay-content h2 {
    font-size: 3rem;
    margin: 20px 0 10px;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.overlay-content p {
    font-size: 1.3rem;
    opacity: 0.85;
}

@keyframes floatUp {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes wobble {

    0%,
    100% {
        transform: rotate(-5deg) scale(1);
    }

    50% {
        transform: rotate(5deg) scale(1.1);
    }
}

/* ============================================
   SURAT
   ============================================ */
.letter-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 8px 40px rgba(255, 193, 7, 0.3);
    border: 3px solid rgba(255, 193, 7, 0.4);
    position: relative;
}

.letter-section::before {
    content: '👻';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 3rem;
    transform: rotate(15deg);
}

.letter-header h1 {
    font-size: 2.5rem;
    color: #4a2c00;
    font-weight: 800;
    text-align: center;
}

.letter-header .date {
    text-align: center;
    color: #795548;
    font-size: 0.95rem;
    margin-top: 5px;
    font-weight: 600;
}

.letter-body {
    margin-top: 25px;
    color: #3e2723;
    line-height: 1.9;
    font-size: 1.05rem;
}

.letter-body p {
    margin-bottom: 15px;
    text-indent: 30px;
}

.letter-body .signature {
    text-align: right;
    font-style: italic;
    color: #795548;
    font-size: 1.1rem;
    margin-top: 30px;
    text-indent: 0;
}

/* ============================================
   GALERI
   ============================================ */
.gallery-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 8px 40px rgba(255, 193, 7, 0.2);
    border: 3px solid rgba(255, 193, 7, 0.3);
}

.gallery-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #4a2c00;
    margin-bottom: 25px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #fff9c4;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(255, 193, 7, 0.25);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card .caption {
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    color: #4a2c00;
    font-size: 0.95rem;
}

/* Card khusus "Ajak Main" (foto ke-4) */
.card.play-card {
    background: linear-gradient(135deg, #fff9c4, #ffeb3b);
    border: 3px dashed #f57f17;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card.play-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 40px rgba(245, 127, 23, 0.4);
}

.card.play-card .play-icon {
    font-size: 4rem;
    display: block;
    padding: 30px 0 10px;
}

.card.play-card .caption {
    font-size: 1.2rem;
    color: #e65100;
}

/* ============================================
   MUSIC PLAYER
   ============================================ */
.music-player {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: linear-gradient(135deg, #f9a825, #f57f17);
    padding: 14px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(245, 127, 23, 0.4);
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.music-player button {
    background: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.music-player button:hover {
    transform: scale(1.1);
}

.music-player #songTitle {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .letter-section {
        padding: 25px;
    }

    .letter-header h1 {
        font-size: 1.8rem;
    }

    .letter-body {
        font-size: 0.95rem;
    }

    .gallery {
        grid-template-columns: 1fr 1fr;
    }

    .card img {
        height: 150px;
    }

    .music-player {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
        gap: 10px;
    }

    .music-player button {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .music-player #songTitle {
        font-size: 0.8rem;
    }

    .overlay-content h2 {
        font-size: 2rem;
    }

    .overlay-content .icon-spooky {
        font-size: 4rem;
    }
}

@media (max-width: 400px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}