body {
    background-color: #1c1917; /* Stone 900 */
    color: #f5f5f4; /* Stone 100 */
    margin: 0;
    overflow: hidden;
    font-family: 'Satoshi', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 45;
    pointer-events: none;
}

/* Animasi Gradien Aurora - Earth Tone Edition */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: #1c1917;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: float 20s infinite alternate ease-in-out;
}
.orb-1 { width: 60vw; height: 60vw; background: hsla(24, 54%, 40%, 0.4); top: -10%; left: -10%; animation-duration: 25s; }
.orb-2 { width: 50vw; height: 50vw; background: hsla(84, 25%, 35%, 0.35); bottom: -20%; right: -10%; animation-duration: 22s; animation-direction: alternate-reverse; }
.orb-3 { width: 40vw; height: 40vw; background: hsla(34, 40%, 30%, 0.4); top: 40%; left: 30%; animation-duration: 28s; }
.orb-4 { width: 35vw; height: 35vw; background: hsla(43, 60%, 45%, 0.25); top: 10%; right: 20%; animation-duration: 30s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

#ui-layer {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    /* Fitur gulir fleksibel agar bento grid mobile aman dijangkau */
    overflow-y: auto;
    overflow-x: hidden;
}

#progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 50;
}
#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c2410c, #ca8a04);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card {
    background: rgba(44, 40, 38, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(214, 211, 209, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.text-gradient {
    background: linear-gradient(to right, #f5eae0, #d6d3d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-modern {
    background: linear-gradient(135deg, #d97706, #b45309);
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.btn-modern:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.5);
}
.btn-modern:active { transform: translateY(2px) scale(0.98); }
.btn-modern:disabled { opacity: 0; pointer-events: none; }

.pulse-emoji { animation: pulse-glow 2s infinite ease-in-out; }
@keyframes pulse-glow {
    0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(217,119,6,0.3)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 25px rgba(217,119,6,0.6)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(217,119,6,0.3)); }
}

.polaroid-wrapper { perspective: 1000px; display: inline-block; }
.polaroid {
    background: #fcfaf7;
    padding: 12px 12px 40px 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    cursor: pointer;
}
.polaroid img { width: 100%; height: auto; border-radius: 2px; pointer-events: none; }
.polaroid-caption {
    color: #44403c; font-family: 'Playfair Display', serif; text-align: center;
    font-style: italic; margin-top: 15px; font-size: 1.1rem; pointer-events: none;
}

.step-container { display: none; flex: 1; align-items: center; justify-content: center; padding: 20px; }
.step-container.active { display: flex; }
.stagger-el { opacity: 0; }

/* =========================================
   DESAIN SURAT CINTA
   ========================================= */
.envlope-wrapper {
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 20px;
}
@media (max-width: 640px) {
    .envlope-wrapper { height: 210px; margin-top: 0; }
}
#envelope {
    position: relative;
    width: 280px;
    height: 180px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background-color: #78350f;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}
.front { position: absolute; width: 0; height: 0; z-index: 3; }
.flap {
    border-left: 140px solid transparent;
    border-right: 140px solid transparent;
    border-bottom: 82px solid transparent;
    border-top: 98px solid #78350f; 
    transform-origin: top;
    pointer-events: none;
}
.pocket {
    border-left: 140px solid #d97706;
    border-right: 140px solid #d97706;
    border-bottom: 90px solid #b45309;
    border-top: 90px solid transparent;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    pointer-events: none;
}
.letter {
    position: relative;
    background-color: #fbfbfb;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    height: 90%;
    top: 5%;
    border-radius: 6px;
    box-shadow: 0 2px 26px rgba(0, 0, 0, 0.15);
    font-family: "Dancing Script", cursive;
    color: #44403c;
}
.letter:after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; right: 0; }
.words { position: absolute; left: 10%; width: 80%; height: 14%; background-color: #f5eae0; color: #44403c; }
.words.line1 { top: 10%; width: 20%; height: 7%; font-size: 0.7rem; }
.words.line2 { top: 30%; text-align: center; font-size: 1.1rem; line-height: 1.1; }
.words.line3 { top: 50%; text-align: center; font-size: 1.1rem; line-height: 1.1; }
.words.line4 { top: 70%; text-align: center; font-size: 1.1rem; line-height: 1.1; }

.open .flap { transform: rotateX(180deg); transition: transform 0.4s ease, z-index 0.6s; z-index: 1; }
.close .flap { transform: rotateX(0deg); transition: transform 0.4s 0.6s ease, z-index 1s; z-index: 5; }
.close .letter { transform: translateY(0px); transition: transform 0.4s ease, z-index 1s; z-index: 1; }
.open .letter { transform: translateY(-100px); transition: transform 0.4s 0.6s ease, z-index 0.6s; z-index: 2; }

/* =========================================
   ANIMASI ROTASI MEDIA PLAYER
   ========================================= */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}
.animate-paused {
    animation-play-state: paused;
}
