/* ==================== RESET & GENERAL ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: linear-gradient(135deg, #fdfbf7 0%, #fce8eb 50%, #f8d7dd 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #2c2c2c;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease;
    padding: 0;
    z-index: 5; /* Di bawah kelopak & bunga pojok */
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.screen.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ==================== TYPOGRAPHY ==================== */
.handwritten-title {
    font-family: 'Caveat', cursive;
    font-size: 3.2rem;
    font-weight: 700;
    color: #d64563;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-align: center;
}

.sub-text, .game-subtitle {
    font-size: 0.95rem;
    color: #685456;
    margin-bottom: 25px;
    text-align: center;
}

/* ==================== AMBIENT FLOATING PETALS (DINAIKKAN Z-INDEX) ==================== */
.petal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Agar klik tetap menembus ke tombol di bawahnya */
    z-index: 90; /* Ditingkatkan agar berada DI ATAS background screen */
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -10%;
    width: 24px;
    height: 24px;
    opacity: 0.85;
    filter: drop-shadow(0 3px 5px rgba(214, 69, 99, 0.25));
    animation: floatPetal 10s linear infinite;
}

.p1 { left: 6%;  width: 20px; height: 20px; animation-duration: 9s;  animation-delay: 0s; }
.p2 { left: 22%; width: 28px; height: 28px; animation-duration: 12s; animation-delay: 2s; }
.p3 { left: 40%; width: 22px; height: 22px; animation-duration: 8s;  animation-delay: 4s; }
.p4 { left: 58%; width: 30px; height: 30px; animation-duration: 11s; animation-delay: 1s; }
.p5 { left: 74%; width: 18px; height: 18px; animation-duration: 13s; animation-delay: 5s; }

@keyframes floatPetal {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 0;
    }
    12% {
        opacity: 0.9;
    }
    50% {
        transform: translateY(55vh) rotate(180deg) translateX(45px);
    }
    88% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(115vh) rotate(360deg) translateX(-25px);
        opacity: 0;
    }
}

/* ==================== CORNER FLOWERS (DINAIKKAN Z-INDEX) ==================== */
.corner-flowers {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none; /* Agar klik tetap menembus ke tombol */
    z-index: 95; /* Ditingkatkan agar muncul di pojok paling depan */
    overflow: hidden;
}

.corner-flower {
    position: absolute;
    bottom: -10px;
    width: 140px;
    height: auto;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.12));
}

.corner-flower-left {
    left: -15px;
    transform-origin: bottom left;
    animation: swayWindLeft 4.5s ease-in-out infinite alternate;
}

.corner-flower-right {
    right: -15px;
    transform-origin: bottom right;
    animation: swayWindRight 5.2s ease-in-out infinite alternate 0.5s;
}

@keyframes swayWindLeft {
    0% { transform: rotate(0deg) skewX(0deg); }
    40% { transform: rotate(6deg) skewX(-2deg); }
    70% { transform: rotate(-3deg) skewX(1deg); }
    100% { transform: rotate(4deg) skewX(-1deg); }
}

@keyframes swayWindRight {
    0% { transform: rotate(0deg) skewX(0deg); }
    35% { transform: rotate(-7deg) skewX(2deg); }
    65% { transform: rotate(2deg) skewX(-1deg); }
    100% { transform: rotate(-5deg) skewX(1.5deg); }
}

/* ==================== BEAR SCREEN ==================== */
.bear-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.bear-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 15px auto 0;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bear-img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    filter: drop-shadow(0 8px 16px rgba(214, 69, 99, 0.15));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bear-img-wrapper:hover .bear-img {
    transform: scale(1.05);
}

.sleep-anim {
    animation: bearBreathe 3s infinite ease-in-out;
}

@keyframes bearBreathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02, 0.98) translateY(-4px); }
}

.awake-anim {
    animation: popIn 0.35s ease-out forwards, bearWiggle 1.5s infinite ease-in-out 0.35s;
}

@keyframes popIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bearWiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-3deg) scale(1.02); }
    75% { transform: rotate(3deg) scale(1.02); }
}

/* ==================== EMOTION SCREEN ==================== */
.emotion-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 440px;
    text-align: center;
}

.faces-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
    width: 100%;
    margin-top: 25px;
    position: relative;
}

.face-btn {
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 10px;
    user-select: none;
    color: #2b3a4a;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), 
                left 0.4s cubic-bezier(0.22, 1, 0.36, 1), 
                top 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.face-icon {
    width: 90px;
    height: 90px;
    overflow: visible;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease;
    filter: drop-shadow(0 6px 10px rgba(214, 69, 99, 0.12));
}

.face-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    margin-top: 12px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.face-btn:hover {
    transform: translateY(-8px) scale(1.02);
}

.face-btn:hover .face-icon {
    transform: scale(1.12) rotate(5deg);
    filter: drop-shadow(0 14px 20px rgba(214, 69, 99, 0.25));
}

.faces-wrapper .face-btn:nth-child(1) .face-icon {
    animation: sadWindFloat 4s infinite ease-in-out;
}

@keyframes sadWindFloat {
    0%, 100% { transform: translateY(0) rotate(0deg) translateX(0); }
    50% { transform: translateY(7px) rotate(-6deg) translateX(-4px); }
}

.happy-btn, .happy-label { color: #e57373; }
.happy-label { font-size: 1rem; }

.pulse-icon {
    animation: happyWindDance 2.5s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes happyWindDance {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    33% { transform: translateY(-10px) rotate(6deg) scale(1.08); }
    66% { transform: translateY(-3px) rotate(-4deg) scale(1.03); }
}

/* ==================== TEASE TOAST ==================== */
.tease-toast {
    position: fixed !important;
    transform: translate(-50%, -100%);
    pointer-events: none;
    background: rgba(43, 43, 43, 0.92);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 9999 !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    animation: toastFloat 1.5s forwards cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes toastFloat {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    15% { opacity: 1; transform: translate(-50%, -100%) scale(1.02); }
    75% { opacity: 1; transform: translate(-50%, -110%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -140%) scale(0.9); }
}

/* ==================== GAME CANVAS SCREEN ==================== */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.canvas-wrapper {
    position: relative;
    width: 340px;
    height: 170px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(214, 69, 99, 0.15), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 3px solid #ffccd5;
}

#runnerGame {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.game-modal {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(253, 248, 249, 0.94);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    z-index: 10;
}

.modal-text {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    color: #d64563;
    margin-bottom: 14px;
    text-align: center;
    line-height: 1.25;
}

.btn-primary {
    background: #e57373;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(229, 115, 115, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    background: #d95d61;
}

/* ==================== KADO 3D AESTHETIC ==================== */
.gift-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.gift-3d-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 20px auto 0;
    perspective: 1200px;
    cursor: pointer;
}

.gift-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 163, 181, 0.6) 0%, rgba(255, 235, 150, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: pulseGlow 3s infinite alternate ease-in-out;
    pointer-events: none;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.gift-3d-wrapper.opened .gift-glow {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0.9;
}

.gift-box-3d {
    width: 140px;
    height: 120px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(-22deg) rotateY(38deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.gift-3d-wrapper:not(.opened):hover .gift-box-3d {
    transform: translate(-50%, -50%) rotateX(-16deg) rotateY(48deg) scale(1.05);
}

.gift-box-3d.shake {
    animation: giftShake 0.3s ease-in-out;
}

@keyframes giftShake {
    0%, 100% { transform: translate(-50%, -50%) rotateX(-22deg) rotateY(38deg); }
    25% { transform: translate(-53%, -50%) rotateX(-22deg) rotateY(30deg) rotateZ(-3deg); }
    75% { transform: translate(-47%, -50%) rotateX(-22deg) rotateY(46deg) rotateZ(3deg); }
}

.face {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.15);
}

.gift-body-3d {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.body-front  { width: 140px; height: 120px; background: #ff8fa3; transform: translate(-50%, -50%) translateZ(70px); }
.body-back   { width: 140px; height: 120px; background: #ff4765; transform: translate(-50%, -50%) rotateY(180deg) translateZ(70px); }
.body-right  { width: 140px; height: 120px; background: #ff758c; transform: translate(-50%, -50%) rotateY(90deg) translateZ(70px); }
.body-left   { width: 140px; height: 120px; background: #ff5c77; transform: translate(-50%, -50%) rotateY(-90deg) translateZ(70px); }
.body-bottom { width: 140px; height: 140px; background: #d63251; transform: translate(-50%, -50%) rotateX(-90deg) translateZ(60px); box-shadow: none; }

.body-front::before, .body-back::before, .body-left::before, .body-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 25px;
    background: linear-gradient(to bottom, rgba(160, 20, 50, 0.2), transparent);
    z-index: 1;
}

.gift-lid-3d {
    position: absolute;
    width: 150px;
    height: 35px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-64px);
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.27), opacity 0.5s 0.4s ease;
    z-index: 10;
}

.lid-front  { width: 150px; height: 35px; background: #ff9fb1; transform: translate(-50%, -50%) translateZ(75px); }
.lid-back   { width: 150px; height: 35px; background: #ff5c77; transform: translate(-50%, -50%) rotateY(180deg) translateZ(75px); }
.lid-right  { width: 150px; height: 35px; background: #ff8a9f; transform: translate(-50%, -50%) rotateY(90deg) translateZ(75px); }
.lid-left   { width: 150px; height: 35px; background: #ff758c; transform: translate(-50%, -50%) rotateY(-90deg) translateZ(75px); }
.lid-top    { width: 150px; height: 150px; background: #ffb3c6; transform: translate(-50%, -50%) rotateX(90deg) translateZ(17.5px); }

.body-front::after, .body-back::after, .body-left::after, .body-right::after,
.lid-front::after, .lid-back::after, .lid-left::after, .lid-right::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 100%;
    top: 0; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #e3b940 0%, #ffe991 50%, #e3b940 100%);
    z-index: 2;
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
}

.ribbon-v, .ribbon-h {
    position: absolute;
    background: linear-gradient(90deg, #e3b940 0%, #ffe991 50%, #e3b940 100%);
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.ribbon-v {
    width: 22px; height: 100%;
    top: 0; left: 50%;
    transform: translateX(-50%);
}

.ribbon-h {
    width: 100%; height: 22px;
    top: 50%; left: 0;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #e3b940 0%, #ffe991 50%, #e3b940 100%);
}

.bow-wrap {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 65px; height: 65px;
    z-index: 5;
}

.bow-loop {
    position: absolute;
    width: 38px; height: 22px;
    background: linear-gradient(135deg, #ffe991, #e3b940);
    border-radius: 30px;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.15), 0 4px 6px rgba(0,0,0,0.15);
}

.bow-loop.left { left: -10px; top: 22px; transform: rotate(-25deg); }
.bow-loop.right { right: -10px; top: 22px; transform: scaleX(-1) rotate(-25deg); }

.bow-tail {
    position: absolute;
    width: 18px; height: 35px;
    background: linear-gradient(to bottom, #e3b940, #c49923);
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 50% 80%, 15% 100%);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.bow-tail.left { left: 8px; top: 30px; transform: rotate(20deg); }
.bow-tail.right { right: 8px; top: 30px; transform: rotate(-20deg); }

.bow-center {
    position: absolute;
    width: 18px; height: 18px;
    top: 24px; left: 24px;
    background: radial-gradient(circle, #fff3c4, #e3b940);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.gift-shadow {
    position: absolute;
    width: 160px; height: 160px;
    background: rgba(150, 40, 60, 0.25);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotateX(90deg) translateZ(-60px);
    filter: blur(12px);
    border-radius: 50%;
    pointer-events: none !important;
}

.gift-box-3d.opened .gift-lid-3d {
    transform: translate(-50%, -50%) translateY(-280px) rotateX(65deg) rotateY(-35deg) scale(0.7);
    opacity: 0;
}

/* ==================== LOADING SCREEN ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fdfbf7;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-gift {
    font-size: 3.5rem;
    animation: giftPulseSpin 1.8s infinite ease-in-out;
    display: inline-block;
}

.loading-text {
    font-family: 'Caveat', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: #d64563;
    margin: 0;
    animation: textOpacityPulse 1.8s infinite ease-in-out;
}

@keyframes giftPulseSpin {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-10deg); }
    50% { transform: scale(1) rotate(0deg); }
    75% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes textOpacityPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* ==================== GREETING & PHOTO SCREEN ==================== */
#greetingScreen {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    overflow-y: auto !important;
    align-items: flex-start !important;
    padding: 30px 15px 80px 15px !important;
    box-sizing: border-box !important;
    background: transparent !important; /* Dibuat transparan agar kelopak dan bunga pojok terlihat di latar belakang */
}

.greeting-wrapper {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* =========================================
   KUE ULANG TAHUN - WOW & MANIS VER.
   ========================================= */

.cake-stage {
    position: relative;
    width: 250px;
    height: 200px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    margin: 20px auto;
    /* Animasi melayang setelah kue selesai disusun */
    animation: cakeFloat 3s ease-in-out infinite 2s;
}

/* Bayangan di lantai piring */
.cake-stage::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    bottom: -5px;
    filter: blur(2px);
    opacity: 0;
    animation: fadeIn 0.5s forwards 0.2s;
}

.cake-part {
    opacity: 0;
    position: relative;
    animation: dropBounce 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* 1. PIRING (Rose Gold) */
.cake-part.plate {
    width: 230px;
    height: 12px;
    background: linear-gradient(135deg, #e7cccc 0%, #f7e8e8 50%, #d8b4b4 100%);
    border-radius: 50px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    animation-delay: 0.1s;
    z-index: 1;
}

/* 2. LAPISAN BAWAH (Strawberry Pastel + Meses) */
.cake-part.layer-bottom {
    width: 190px;
    height: 50px;
    background-color: #ffc8dd; 
    /* Tekstur Meses/Sprinkles */
    background-image:
        radial-gradient(#FFEE58 15%, transparent 16%),
        radial-gradient(#42A5F5 15%, transparent 16%),
        radial-gradient(#66BB6A 15%, transparent 16%),
        radial-gradient(#EF5350 15%, transparent 16%);
    background-size: 15px 15px;
    background-position: 0 0, 8px 8px, 12px 0, 4px 12px;

    border-radius: 12px 12px 4px 4px;
    box-shadow:
        inset 0 -12px 0 rgba(241, 156, 187, 0.5), 
        0 5px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: -2px;
    animation-delay: 0.4s;
}

/* 3. KRIM TENGAH (Vanilla Drip) */
.cake-part.layer-cream {
    width: 196px;
    height: 14px;
    background: #ffffff; 
    border-radius: 8px;
    margin-bottom: -2px;
    z-index: 2;
    animation-delay: 0.7s;
    box-shadow: 0 3px 5px rgba(0,0,0,0.05);
}

/* Efek lelehan krim tengah */
.cake-part.layer-cream::after {
    content: '';
    position: absolute;
    width: 12px; height: 18px;
    background: #ffffff;
    border-radius: 0 0 6px 6px;
    left: 30px; top: 8px;
    box-shadow: 40px 3px 0 #ffffff, 80px 6px 0 #ffffff, 120px 2px 0 #ffffff, 150px 5px 0 #ffffff;
}

/* 4. LAPISAN ATAS (Pink Cotton Candy + Lelehan Coklat Pink) */
.cake-part.layer-top {
    width: 150px;
    height: 45px;
    background-color: #fbcfe8;
    border-radius: 12px 12px 4px 4px;
    margin-bottom: -2px;
    animation-delay: 1s;
    z-index: 1;
}

/* Efek Icing Coklat Pink meleleh di atas */
.cake-part.layer-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 15px;
    background: #f472b6; 
    border-radius: 12px 12px 0 0;
}

.cake-part.layer-top::after {
    content: '';
    position: absolute;
    top: 10px; left: 10px;
    width: 15px; height: 25px;
    background: #f472b6;
    border-radius: 0 0 8px 8px;
    box-shadow: 30px -5px 0 #f472b6, 30px 10px 0 #f472b6, 70px 5px 0 #f472b6, 110px 0 0 #f472b6, 110px 15px 0 #f472b6;
}

/* 5. LILIN (Rainbow Stripe) */
.cake-part.candle {
    position: relative;
    width: 14px; 
    height: 35px;
    background: repeating-linear-gradient(
        45deg,
        #6ee7b7, #6ee7b7 4px,
        #ffffff 4px, #ffffff 8px,
        #fca5a5 8px, #fca5a5 12px
    );
    border-radius: 4px;
    z-index: 3;
    animation-delay: 1.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 6. API & ASAP TIPIS */
.candle .flame {
    position: absolute;
    top: -20px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 24px;
    background: #f59e0b; 
    background: radial-gradient(circle at 50% 80%, #ffffff 0%, #fef3c7 20%, #f59e0b 60%, #b45309 100%);
    border-radius: 50% 50% 35% 35%;
    box-shadow:
        0 0 15px #f59e0b,
        0 0 30px #f59e0b,
        0 0 45px #ef4444,
        0 0 10px rgba(255, 255, 255, 0.5) inset;
    transform-origin: bottom center;
    animation: flameVibe 0.6s infinite alternate;
}

/* Animasi Asap Tipis */
.candle .flame::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    width: 4px;
    height: 12px;
    background: rgba(180, 180, 180, 0.4);
    border-radius: 50%;
    filter: blur(3px);
    animation: thinSmoke 2s infinite ease-out;
}

/* =========================================
   ANIMATIONS KEYFRAMES
   ========================================= */

@keyframes dropBounce {
    0% { opacity: 0; transform: translateY(-300px) scaleY(1.3); }
    60% { opacity: 1; transform: translateY(8px) scaleY(0.85); }
    80% { transform: translateY(-4px) scaleY(1.05); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes flameVibe {
    0% {
        transform: translateX(-50%) scale(1) rotate(-1deg);
        opacity: 0.95;
    }
    20% { transform: translateX(-50%) scaleY(1.1) scaleX(0.9) rotate(1deg); }
    40% { transform: translateX(-50%) scale(1.05) rotate(-1deg); }
    60% { transform: translateX(-50%) scaleY(0.9) scaleX(1.1) rotate(1deg); }
    80% { transform: translateX(-50%) scale(1.1) rotate(-0.5deg); }
    100% {
        transform: translateX(-50%) scale(1) rotate(0.5deg);
        opacity: 1;
        box-shadow: 0 0 20px #f59e0b, 0 0 40px #f59e0b, 0 0 60px #ef4444, 0 0 10px rgba(255, 255, 255, 0.6) inset;
    }
}

/* Keyframes Asap Bergerak Naik */
@keyframes thinSmoke {
    0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 0; }
    20% { opacity: 0.7; }
    100% { transform: translateX(-150%) translateY(-35px) scale(3); opacity: 0; }
}

@keyframes cakeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* LAYOUT FOTO & SURAT */
.greeting-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
}

.real-paper, .paper-note {
    flex: 1;
    max-width: 440px;
    position: relative;
    background: #fdfbf7;
    background-image: radial-gradient(#e2dad0 0.6px, transparent 0.6px);
    background-size: 14px 14px;
    padding: 30px 22px;
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    border: 1px solid #f2ebe1;
    transform: rotate(-0.8deg);
}

.paper-tape {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%) rotate(-1deg);
    width: 100px; height: 26px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(3px);
}

.paper-fold {
    position: absolute;
    bottom: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 0 26px 26px;
    border-color: transparent transparent #e6dfd3 transparent;
}

.paper-content { min-height: 80px; text-align: center; }

.paper-text {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    line-height: 1.55;
    color: #2b2b2b;
    display: inline;
    white-space: pre-wrap;
}

.photo-frame, .polaroid {
    width: 200px;
    flex-shrink: 0;
    background: #ffffff;
    padding: 10px 10px 14px 10px;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    transition: transform 0.4s ease;
}

.photo-frame img, .polaroid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.photo-frame:hover, .polaroid:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 5;
}

.rotate-left { transform: rotate(-3deg); }
.rotate-right { transform: rotate(3deg); }

.frame-label, .polaroid .caption {
    font-family: 'Caveat', cursive;
    font-size: 19px;
    color: #555;
    text-align: center;
    margin-top: 8px;
}

.handwritten-sub {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    color: #ff4d6d;
    margin-top: 10px;
    text-align: center;
}

/* RESPONSIF UNTUK HP */
@media (max-width: 768px) {
    .greeting-layout {
        flex-direction: column;
        gap: 24px;
    }

    .real-paper, .paper-note {
        width: 100%;
        max-width: 100%;
        order: 1;
    }

    .photo-frame, .polaroid {
        width: 85%;
        max-width: 260px;
    }

    .rotate-left { order: 2; transform: rotate(-2deg); }
    .rotate-right { order: 3; transform: rotate(2deg); }
}
/* ==================== MARQUEE SCROLLING CONTAINER ==================== */
.scrolling-notes-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 35px;
    padding: 15px 0 25px 0;
    overflow: hidden;
    position: relative;
    /* Masking efek gradien pudar halus di kiri dan kanan */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 22px;
    width: max-content;
    animation: infiniteScroll 28s linear infinite;
    cursor: pointer;
}

/* Pause animasi scroll saat kursor di-hover atau kursor HP menekan kartu */
.scrolling-notes-container:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==================== CONTAINER KARTU (EFEK KABUT UJUNG KIRI-KANAN) ==================== */
.note-cards-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 10px;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;

    /* Efek kabut/pudar di ujung kiri & kanan */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

/* Sembunyikan scrollbar agar lebih bersih (opsional) */
.note-cards-container::-webkit-scrollbar {
    display: none;
}
.note-cards-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==================== REALISTIC NOTE CARD STYLING ==================== */
.note-card {
    width: 310px;
    min-height: 180px;
    flex-shrink: 0;
    background: #ffffff;
    /* Tekstur kertas berbintik halus */
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 10px 10px;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    /* Bayangan kertas realistis berlapis */
    box-shadow: 
        0 10px 24px -6px rgba(0, 0, 0, 0.08),
        0 4px 10px -2px rgba(0, 0, 0, 0.03),
        inset 0 0 12px rgba(0, 0, 0, 0.015);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 18px 20px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    user-select: none;
}

/* Efek kemiringan acak & animasi float tipis saat hover */
.note-card:hover {
    transform: translateY(-8px) scale(1.02) rotate(1deg);
    box-shadow: 
        0 18px 32px -8px rgba(214, 69, 99, 0.15),
        0 8px 16px -4px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

/* Hiasan Isolasi Transparan (Washi Tape) */
.tape-decor {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    width: 65px;
    height: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    z-index: 2;
}

/* Tag "To: Nama" */
.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.to-badge {
    background: #f1f3f5;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 12px;
    letter-spacing: 0.2px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Bagian Isi Pesan Tulisan Tangan */
.card-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.handwritten-msg {
    font-family: 'Caveat', cursive;
    font-size: 1.3rem;
    line-height: 1.4;
    color: #2b2b2b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5; /* Tambahkan baris ini untuk menghilangkan warning */
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ==========================================
   PUZZLE AESTHETIC & UKURAN BESAR (FULL FIXED)
   ========================================== */

.puzzle-section {
    margin: 25px auto;
    text-align: center;
    max-width: 900px;
    padding: 0 15px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

.puzzle-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
}

/* WRAPPER PAPAN PUZZLE */
.puzzle-board-wrapper {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* SIDEBAR KANAN (TEMPAT KEPINGAN & PESAN SUKSES) */
.puzzle-sidebar {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    min-height: 450px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(255, 117, 140, 0.12);
    border: 2px solid #ffcad4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    margin: 0 auto;
    z-index: 60;
}

.puzzle-sidebar.transparent-mode {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    min-height: auto !important;
    padding: 10px !important;
}

.pieces-container.hidden {
    display: none !important;
}

/* PAPAN PUZZLE 450x450 */
.puzzle-board {
    width: 450px;
    height: 450px;
    position: relative;
    border-radius: 16px;
    background: #ffe3e8;
    border: 4px solid #ff4d6d;
    box-shadow: 0 15px 35px rgba(255, 77, 109, 0.22);
    box-sizing: content-box;
    transition: transform 0.4s ease, border-radius 0.4s ease, box-shadow 0.4s ease;
    margin: 0 auto;
}

/* Efek bingkai polaroid saat puzzle beres (Desktop default) */
.puzzle-board.polaroid-frame {
    border: 12px solid #ffffff;
    border-bottom: 45px solid #ffffff;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    background-color: #ffffff;
    transform: rotate(-2.5deg) scale(1.02);
}

/* SLOT TARGET LOKASI DROPPING */
.puzzle-slot-target {
    position: absolute;
    width: 150px;
    height: 150px;
    pointer-events: all;
}

/* VISUAL GARIS SLOT PUZZLE */
.puzzle-slot-visual {
    position: absolute;
    top: -25px;
    left: -25px;
    width: 200px;
    height: 200px;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.puzzle-slot-visual svg path {
    fill: #ffd1dc;
    stroke: #ff4d6d;
    stroke-width: 2px;
    stroke-linejoin: round;
}

.puzzle-slot-target.drag-over .puzzle-slot-visual {
    transform: scale(1.03);
}

.puzzle-slot-target.drag-over .puzzle-slot-visual svg path {
    fill: #ffb3c1;
}

/* GRID KEPINGAN PUZZLE BERKUMPUL */
.puzzle-pieces-grid {
    display: grid;
    grid-template-columns: repeat(3, 85px);
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

/* KEPINGAN PUZZLE */
.puzzle-piece {
    width: 85px; 
    height: 85px;
    cursor: grab;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.5s ease;
    user-select: none;
    touch-action: manipulation;
}

.puzzle-piece:active {
    cursor: grabbing;
}

.puzzle-pieces-grid .puzzle-piece {
    animation: floatPiece 3s ease-in-out infinite alternate;
}

.puzzle-pieces-grid .puzzle-piece:nth-child(even) {
    animation-delay: 0.5s;
}

@keyframes floatPiece {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-6px) rotate(2.5deg); }
}

.puzzle-piece.selected {
    animation: none;
    transform: scale(1.15) !important;
    filter: drop-shadow(0 0 12px #ff4d6d) brightness(1.1);
    z-index: 20;
}

/* KETIKA KEPINGAN TERPASANG DI PAPAN */
.puzzle-slot-target .puzzle-piece {
    position: absolute !important;
    top: -25px !important;
    left: -25px !important;
    width: 200px !important;
    height: 200px !important;
    margin: 0 !important;
    transform: none !important;
    animation: none !important;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.25));
    cursor: default;
}

/* EFEK FOTO MENYATU (OVERLAY) */
.completed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%; 
    background-position: center;
    image-orientation: from-image;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
    z-index: 50;
}

.completed-overlay.show {
    opacity: 1;
    box-shadow: inset 0 0 20px rgba(255, 77, 109, 0.3);
}

/* PESAN SUKSES DI SIDEBAR */
.puzzle-success-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

.puzzle-success-box.hidden {
    display: none !important;
}

/* DESAIN TOMBOL ACAK ULANG */
.btn-acak-ulang,
.btn-primary-small {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 32px;
    background: linear-gradient(135deg, #ff4d6d 0%, #ff758f 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.35), 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    overflow: hidden;
    user-select: none;
}

.btn-acak-ulang::before,
.btn-primary-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.6s ease;
}

.btn-acak-ulang:hover::before,
.btn-primary-small:hover::before {
    left: 100%;
}

.btn-acak-ulang:hover,
.btn-primary-small:hover {
    background: linear-gradient(135deg, #ff335c 0%, #ff6080 100%);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 28px rgba(255, 77, 109, 0.5), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-acak-ulang:active,
.btn-primary-small:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.4);
}

/* ANIMASI SALAH & COCOK */
.wrong-shake { 
    animation: shakeSlot 0.4s ease-in-out !important; 
}

@keyframes shakeSlot {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.snap-anim { 
    animation: correctSnap 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important; 
}

@keyframes correctSnap {
    0% { transform: scale(1.15); filter: brightness(1.3); }
    100% { transform: scale(1); }
}


/* ==========================================
   RESPONSIVE LAYOUT (FIX STATE SELESAI PUZZLE)
   ========================================== */

@media (max-width: 850px) {
    .puzzle-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .puzzle-board-wrapper {
        max-width: 360px;
    }

    .puzzle-board {
        transform: scale(0.8);
        transform-origin: top center;
        margin-left: -45px;
        margin-right: -45px;
        margin-bottom: -90px;
    }

    /* Kunci skala polaroid pada tablet */
    .puzzle-board.polaroid-frame {
        transform: rotate(-2.5deg) scale(0.8) !important;
        margin-bottom: -50px;
    }

    .puzzle-sidebar {
        width: 100%;
        max-width: 360px;
        min-height: auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .puzzle-section {
        padding: 0 10px;
    }

    .puzzle-board-wrapper {
        max-width: 295px;
    }

    .puzzle-board {
        transform: scale(0.65);
        transform-origin: top center;
        margin-left: -79px;
        margin-right: -79px;
        margin-bottom: -158px;
    }

    /* Kunci skala polaroid pada HP & atur posisi pesan sukses agar tidak menutupi foto */
    .puzzle-board.polaroid-frame {
        transform: rotate(-2.5deg) scale(0.65) !important;
        margin-bottom: -105px;
    }

    .puzzle-sidebar {
        max-width: 300px;
        padding: 16px;
    }

    .puzzle-pieces-grid {
        grid-template-columns: repeat(3, 72px);
        gap: 8px;
    }

    .puzzle-piece {
        width: 72px;
        height: 72px;
    }

    .btn-acak-ulang,
    .btn-primary-small {
        padding: 11px 24px;
        font-size: 14px;
    }
}

/* Styling Beruang Pendamping di Game */
.companion-bear {
    position: absolute;
    bottom: -20px; /* Posisi tetap seperti semula */
    left: 5%; 
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    pointer-events: none; 
}

/* 1. Efek bernapas agar beruang terlihat hidup (Terus-menerus) */
@keyframes bearBreathe {
    0%, 100% { 
        transform: scale(1, 1) translateY(0); 
    }
    50% { 
        /* Teknik Squash & Stretch */
        transform: scale(1.03, 0.97) translateY(-2px); 
    }
}

.companion-bear img {
    width: 120px; 
    height: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
    
    /* Titik tumpu animasi di bawah agar kaki tetap menapak */
    transform-origin: bottom center; 
    animation: bearBreathe 2.5s ease-in-out infinite;
}

/* 2. Efek kaget/loncat saat game over */
@keyframes bearShock {
    0% { transform: translateY(0) scale(1, 1); }
    25% { transform: translateY(-15px) scale(0.9, 1.1) rotate(-5deg); } 
    50% { transform: translateY(0) scale(1.1, 0.9) rotate(5deg); } 
    75% { transform: translateY(-5px) scale(1.02, 0.98) rotate(-3deg); }
    100% { transform: translateY(0) scale(1, 1); }
}

.bear-shock {
    animation: bearShock 0.6s ease-out !important; 
}

/* 3. Styling Bubble Chat Baru (Di Samping, Lebih Kecil, Bulat, Transparan) */
.bear-bubble {
    position: absolute;
    left: 110px; /* Memindahkan posisi ke samping kanan beruang */
    bottom: 50px; /* Ketinggian disesuaikan di area kepala beruang */
    
    background: rgba(255, 255, 255, 0.85); /* Putih transparan */
    border: 2px solid rgba(255, 117, 140, 0.7); /* Pink transparan */
    border-radius: 25px; /* Membuat sudut lebih bulat */
    padding: 8px 12px;
    
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 0.75rem; /* Ukuran teks diperkecil */
    color: #444;
    min-width: 100px;
    max-width: 130px; /* Ukuran bubble diperkecil */
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    animation: floatBubbleSide 2s ease-in-out infinite;
    
    /* Pengaturan transisi untuk efek hilang/muncul */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Tambahkan class ini di JS untuk menghilangkan bubble */
.bear-bubble.hide {
    opacity: 0;
    visibility: hidden;
}

/* Ekor lancip menghadap ke kiri (ke kepala beruang) */
.bear-bubble::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px; /* Ditarik ke sebelah kiri bubble */
    transform: translateY(-50%);
    border-width: 6px 12px 6px 0;
    border-style: solid;
    border-color: transparent rgba(255, 117, 140, 0.7) transparent transparent;
}

.bear-bubble::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -9px; /* Layer dalam warna putih menutupi border */
    transform: translateY(-50%);
    border-width: 6px 10px 6px 0;
    border-style: solid;
    border-color: transparent rgba(255, 255, 255, 0.9) transparent transparent;
    z-index: 1;
}

/* Animasi ngambang untuk bubble di samping */
@keyframes floatBubbleSide {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
/* ==========================================
   EFEK KERTAS REALISTIS & HIDUP
   ========================================== */

/* 1. Kontainer Kertas Utama */
.paper-note.real-paper {
    position: relative;
    background: #fdfbf7; /* Warna kertas gading hangat */
    /* Garis tipis samar khas kertas tulis */
    background-image: repeating-linear-gradient(
        transparent,
        transparent 27px,
        rgba(180, 160, 140, 0.15) 28px
    );
    padding: 40px 30px 30px 30px;
    
    /* Pinggiran kertas melengkung alami (tidak kaku) */
    border-radius: 2px 18px 3px 22px / 20px 3px 25px 2px;
    border: 1px solid rgba(215, 200, 180, 0.5);

    /* Bayangan 3D bertingkat (Ambient + Drop Shadow) */
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 12px 28px -6px rgba(90, 60, 40, 0.18),
        0 20px 35px -10px rgba(0, 0, 0, 0.08);

    /* Animasi bernapas/melayang lambat */
    animation: floatPaper 4.5s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

/* Efek Kertas Terangkat & Membesar Saat Diarahkan Kursor */
.paper-note.real-paper:hover {
    transform: translateY(-8px) rotate(-1deg) scale(1.02);
    box-shadow: 
        0 18px 38px -4px rgba(90, 60, 40, 0.25),
        0 28px 45px -10px rgba(0, 0, 0, 0.12);
}

/* 2. Solasi / Lakban Transparan (Paper Tape) */
.paper-tape {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(-1.5deg);
    width: 110px;
    height: 26px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(2px);
    border-left: 2px dashed rgba(180, 180, 180, 0.4);
    border-right: 2px dashed rgba(180, 180, 180, 0.4);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    z-index: 5;
}

/* 3. Pin 3D */
.paper-pin {
    position: absolute;
    top: 12px;
    left: 15px;
    font-size: 22px;
    filter: drop-shadow(2px 4px 3px rgba(0, 0, 0, 0.25));
    transform: rotate(-15deg);
    z-index: 6;
}

/* 4. Lipatan Segitiga di Pojok Kertas */
.paper-fold {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 22px 22px;
    border-color: transparent transparent #e3dad0 transparent;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.1);
    border-bottom-right-radius: 3px;
}

/* 5. Teks Tinta Sesuai Spasi Garis Kertas */
.paper-text {
    color: #2c2c2c; /* Warna tinta hitam sedikit dusty */
    line-height: 28px; /* Menyesuaikan garis background kertas */
    text-shadow: 0.3px 0.3px 0px rgba(0, 0, 0, 0.15); /* Efek resapan tinta */
}

/* 6. Keyframes Animasi Melayang Lambat */
@keyframes floatPaper {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-7px) rotate(0.6deg);
    }
}

/* ==================== STYLING NOTIFIKASI LAGU ==================== */
.music-notif {
    position: fixed;
    top: 20px;
    right: -350px; /* Sembunyi di luar layar kanan */
    width: 300px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999; /* Pastikan selalu di paling atas */
    transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: sans-serif; /* Gunakan font bersih */
}

/* Class untuk memunculkan notif */
.music-notif.show {
    right: 20px;
}

.notif-icon {
    font-size: 24px;
    background: #ff758c; /* Warna tema pink */
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: white;
}

.notif-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 3px;
}

.notif-song {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Titik tiga jika kepanjangan */
}

.notif-artist {
    font-size: 12px;
    color: #666;
}

.notif-close {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 18px;
    color: #bbb;
    cursor: pointer;
    transition: color 0.3s;
}

.notif-close:hover {
    color: #ff4d6d;
}

/* Responsif Mobile (agar tidak terlalu besar di HP) */
@media (max-width: 480px) {
    .music-notif {
        width: 260px;
        top: 10px;
        padding: 10px;
    }
    .music-notif.show {
        right: 10px;
    }
    .notif-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .notif-song {
        font-size: 13px;
    }
}