/* CSS Khusus untuk Animasi Buku dan Tema Notebook */

/* Efek Kertas & Garis Buku */
.bg-notebook {
    background-color: #fdfbf7;
    background-image: 
        linear-gradient(90deg, transparent 79px, #abced4 79px, #abced4 81px, transparent 81px),
        linear-gradient(#e1e1e1 .1em, transparent .1em);
    background-size: 100% 1.2em;
}

.book-lines {
    background-image: repeating-linear-gradient(transparent, transparent 31px, #e5e5e5 31px, #e5e5e5 32px);
    background-position: 0 40px;
}

/* Perspektif 3D untuk Buku */
.perspective-1000 {
    perspective: 2000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
    will-change: transform; /* Optimasi peforma */
}

.origin-left {
    transform-origin: left center;
}

/* Bagian Halaman Buku */
.page-face {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.page-front {
    z-index: 2;
}
.page-back {
    z-index: 1;
}

/* Sticky Note Style */
.sticky-note {
    background: #fef08a; /* Tailwind yellow-200 */
    position: relative;
}

.sticky-note::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Stamp Effect */
.stamp {
    box-shadow: 0 0 0 3px red, 0 0 0 4px white, inset 0 0 0 2px white;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

/* Animasi Intro Bouncing */
@keyframes introBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
.intro-bounce {
    animation: introBounce 2s infinite ease-in-out;
}

/* Animasi Ring Ring PFP */
@keyframes ringRing {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(0deg); }
}
.ring-ring {
    animation: ringRing 2s infinite ease-in-out;
    transform-origin: center center;
}

/* Mencegah highlight pada gambar */
img {
    user-select: none;
    -webkit-user-drag: none;
}

/* Mading & Polaroid CSS */
.gallery-item {
    cursor: zoom-in;
    transition: box-shadow 0.3s ease;
    will-change: transform;
}
.gallery-item:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    z-index: 10;
}

.gallery-label {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-label {
    opacity: 1;
}

/* FLIP Target State CSS */
.gallery-item.is-flipped {
    cursor: zoom-out;
    z-index: 300 !important;
    border: 8px solid white; /* Border polaroid tebal saat dilihat dekat */
    border-bottom: 40px solid white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Selotip dihilangkan saat dipetik */
}

.gallery-item.is-flipped .gallery-tape {
    opacity: 0 !important;
}

.gallery-item.is-flipped .gallery-label {
    opacity: 1 !important;
    bottom: -32px;
    color: black;
    background: transparent;
    text-shadow: none;
    font-size: 1rem;
    font-weight: bold;
}

/* Masking Kanvas Live2D (Efek Gradasi ke Bawah) */
.l2d-mask {
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.rotateY-180 {
    transform: rotateY(180deg);
}

/* Animasi Goyang (Wiggle) untuk Credits */
@keyframes hoverWiggle {
    0% { transform: scale(1.05) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-3deg); }
    50% { transform: scale(1.05) rotate(0deg); }
    75% { transform: scale(1.05) rotate(3deg); }
    100% { transform: scale(1.05) rotate(0deg); }
}

.hover-wiggle {
    transition: transform 0.3s ease;
}

.hover-wiggle:hover {
    animation: hoverWiggle 0.5s ease-in-out infinite;
    z-index: 40;
}

