/* GLOBAL SETTINGS */
body {
    background-color: #020024;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    /* Latar belakang laut dalam */
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #020024 0%, #090979 50%, #020024 100%);
    background-size: 100% 100%;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020024; }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, #00d4ff, #bd00ff); border-radius: 4px; }

/* TRIPPY TEXT EFFECT */
.trippy-text {
    text-shadow: 3px 3px 0px #bd00ff, -3px -3px 0px #00d4ff;
    animation: textVibrate 3s infinite;
}

@keyframes textVibrate {
    0%, 100% { text-shadow: 2px 2px 0px #bd00ff, -2px -2px 0px #00d4ff; }
    50% { text-shadow: -2px 2px 0px #00ff87, 2px -2px 0px #bd00ff; }
}

@keyframes hueRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Update animasi float agar ada efek miring (rotate) seperti aslinya */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); } /* Miring 2 derajat saat naik */
}

/* Tambahan: Animasi Putar untuk Lingkaran Belakang */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse-slow {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Class Utility untuk Lingkaran */
.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}
.animate-spin-reverse {
    animation: spin-reverse-slow 15s linear infinite;
}

/* HALLUCINATION MODE (STONED MODE) */
body.hallucination-mode {
    animation: extremeTrip 4s infinite alternate ease-in-out;
}
body.hallucination-mode section {
    animation: meltReality 5s infinite ease-in-out alternate;
}

@keyframes extremeTrip {
    0% { filter: hue-rotate(0deg) saturate(1.5) contrast(1.2); }
    50% { filter: hue-rotate(180deg) saturate(3) blur(1px); }
    100% { filter: hue-rotate(360deg) saturate(1.5) contrast(1.2); }
}
@keyframes meltReality {
    0% { transform: scale(1) skew(0deg); }
    50% { transform: scale(0.98) skew(1deg); }
    100% { transform: scale(1.02) skew(-1deg); }
}

/* BUTTONS */
.btn-pill {
    background: linear-gradient(90deg, #00d4ff, #bd00ff);
    border-radius: 9999px;
    padding: 12px 32px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    color: #020024;
    cursor: pointer;
    display: inline-block;
    border: none;
}
.btn-pill:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.8);
    background: linear-gradient(90deg, #00ff87, #00d4ff);
}

/* COMIC BOOK & REVEAL */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    filter: blur(5px);
}
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.comic-scene {
    perspective: 1500px;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}
@media(min-width: 768px) {
    .comic-scene { height: 600px; }
}
.comic-book {
    position: relative;
    width: 85%;
    max-width: 450px;
    height: 100%;
    transform-style: preserve-3d;
}
.comic-page {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    border: 2px solid #00d4ff;
    background-color: #000;
    border-radius: 5px;
}
.comic-page.flipped { transform: rotateY(-180deg); }
.comic-content {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; background: #000;
}
.comic-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; transform: rotateY(180deg);
    background: #111;
    border: 2px solid #bd00ff;
    display: flex; align-items: center; justify-content: center;
}
.story-img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
}

/* TOGGLE SWITCH */
.toggle-checkbox:checked { right: 0; border-color: #bd00ff; }
.toggle-checkbox:checked + .toggle-label { background-color: #bd00ff; }
.toggle-checkbox:checked + .toggle-label:before { transform: translateX(100%); }