/* ============================================================
   [0] RESET UKURAN - WAJIB DI HP
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    height: auto;
}

.header-img {
    width: 100%;
    height: auto;
    display: block;
}
/* ============================================================
   [9] AIBOT LOUNGE - Style Khusus Halaman AibOt
   ============================================================ */

/* ============================================================
   [9.1] FRAME PUISI BAROQUE
   ============================================================ */
.poem-frame-wrapper {
    width: 100%;
    max-width: 750px;
    padding: 15px 20px;
    margin: 0 auto;
}

.poem-frame {
    width: 100%;
    position: relative;
    background-image: url('../assets/frame-baroque.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 50px 60px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poem-content {
    text-align: center;
    width: 100%;
}

/* ============================================================
   [9.1.1] PUISI - 2 WARNA (SOLID)
   Puisi 1: EMAS
   Puisi 2: HIJAU NEON
   ============================================================ */

/* PUISI 1 - EMAS (baris 1-3) */
.poem-line[data-poem="1"] {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 30px;
    font-style: italic;
    font-weight: 900;
    color: #FFD700;
    line-height: 1.5;
    letter-spacing: 0.8px;
    margin: 8px 0;
    min-height: 46px;
    text-shadow:
        -1.5px -1.5px 0 #000,
         1.5px -1.5px 0 #000,
        -1.5px  1.5px 0 #000,
         1.5px  1.5px 0 #000,
         0 0 15px rgba(255,215,0,0.9),
         0 0 30px rgba(255,215,0,0.5);
}

/* PUISI 2 - HIJAU NEON (baris 4-6) */
.poem-line[data-poem="2"] {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 30px;
    font-style: italic;
    font-weight: 900;
    color: #00FF88;
    line-height: 1.5;
    letter-spacing: 0.8px;
    margin: 8px 0;
    min-height: 46px;
    text-shadow:
        -1.5px -1.5px 0 #000,
         1.5px -1.5px 0 #000,
        -1.5px  1.5px 0 #000,
         1.5px  1.5px 0 #000,
         0 0 15px rgba(0,255,136,0.9),
         0 0 30px rgba(0,255,136,0.5);
}

/* Baris terakhir - emphasis */
.poem-line.poem-line-emphasis {
    font-weight: 900;
    font-size: 32px;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    color: #FFD700;
    font-weight: 400;
    font-size: 30px;
    margin-left: 4px;
    animation: cursorBlink 0.7s infinite;
    text-shadow: 0 0 15px rgba(255,215,0,0.9);
}

.poem-line[data-poem="2"] .typewriter-cursor {
    color: #00FF88;
    text-shadow: 0 0 15px rgba(0,255,136,0.9);
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============================================================
   [9.2] JUDUL LOUNGE
   ============================================================ */
.page-title {
    text-align: center;
    padding: 25px 20px 15px;
}
.page-title h1 {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    color: var(--gold);
    font-size: 24px;
    font-weight: 900;
    text-shadow: 0 0 15px rgba(255,215,0,0.6);
    letter-spacing: 3px;
    margin-bottom: 6px;
}
.page-title p {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    color: #aaa;
    font-size: 14px;
    font-style: italic;
    letter-spacing: 1px;
}
.title-divider {
    width: 60%;
    max-width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 10px auto 0;
}

/* ============================================================
   [9.3] GRID KARAKTER
   ============================================================ */
.char-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    margin: 0 auto;
}

.char-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 100%;
}

.char-item:nth-child(3) {
    grid-column: span 2;
    max-width: 100%;
    width: 100%;
    justify-self: center;
}

.char-item:nth-child(3) .btn-char-living {
    max-width: 400px;
    width: 100%;
}

.char-item:nth-child(3) .plaque-3d {
    max-width: 400px;
    width: 100%;
}

.btn-char-living {
    display: block;
    width: 100%;
    max-width: 250px;
}

.btn-char-living img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   [9.4] PLAKAT NAMA 3D TIMBUL
   ============================================================ */
.plaque-3d {
    width: 100%;
    max-width: 250px;
    position: relative;
    border-radius: 10px;
    padding: 3px;
    background: linear-gradient(180deg, #3a2a0a 0%, #1a0f00 100%);
    border: 2px solid var(--gold);
    box-shadow:
        0 5px 0 #5a4010,
        0 7px 12px rgba(0,0,0,0.7),
        0 0 12px rgba(255,215,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.15s ease;
}

.plaque-inner {
    background: linear-gradient(180deg, #2a1f0a 0%, #0a0500 100%);
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.plaque-inner::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(120deg,
        transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    animation: plaqueShine 5s infinite;
    pointer-events: none;
}

@keyframes plaqueShine {
    0% { left: -100%; }
    30%, 100% { left: 200%; }
}

.plaque-text {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 14px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255,215,0,0.6);
    position: relative;
    z-index: 1;
    display: block;
}

/* ============================================================
   [9.5] EFEK NYALA
   ============================================================ */
.plaque-3d.is-active {
    border-color: var(--green-neon);
    background: linear-gradient(180deg, #0a3a1a 0%, #001a0a 100%);
    box-shadow:
        0 5px 0 #004422,
        0 7px 12px rgba(0,0,0,0.7),
        0 0 25px var(--green-neon),
        0 0 45px rgba(0,255,136,0.6),
        inset 0 0 15px rgba(0,255,136,0.3);
    animation: plaquePulse 0.6s ease;
}

.plaque-3d.is-active .plaque-inner {
    background: linear-gradient(180deg, #0a2a15 0%, #001005 100%);
}

.plaque-3d.is-active .plaque-text {
    color: var(--green-neon);
    text-shadow:
        0 0 10px var(--green-neon),
        0 0 20px var(--green-neon),
        0 0 30px rgba(0,255,136,0.6);
}

@keyframes plaquePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ============================================================
   [9.6] GARIS PENGHUBUNG
   ============================================================ */
.char-item::after {
    content: '';
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent, var(--green-neon), transparent);
    box-shadow: 0 0 15px var(--green-neon);
    opacity: 0;
    transition: all 0.15s ease;
    pointer-events: none;
    z-index: 5;
}

.char-item.is-active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

/* ============================================================
   [9.7] TOMBOL KEMBALI
   ============================================================ */
.back-btn {
    display: block;
    text-align: center;
    color: var(--gold);
    margin: 30px auto 50px;
    text-decoration: none;
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 30px;
    border: 2px dashed var(--gold);
    border-radius: 12px;
    max-width: 260px;
    transition: 0.3s;
    letter-spacing: 1px;
}
.back-btn:hover {
    background: var(--gold);
    color: #000;
    border-style: solid;
}

/* ============================================================
   [9.8] CHARGING EFFECT - 5 detik
   ============================================================ */
.plaque-3d.is-charging {
    animation: chargeUp 5s ease-in-out forwards;
    border-color: var(--green-neon);
    background: linear-gradient(180deg, #0a3a1a 0%, #001a0a 100%);
}

.plaque-3d.is-charging .plaque-inner {
    background: linear-gradient(180deg, #0a2a15 0%, #001005 100%);
}

.plaque-3d.is-charging .plaque-text {
    color: var(--green-neon);
    text-shadow:
        0 0 10px var(--green-neon),
        0 0 20px var(--green-neon),
        0 0 40px var(--green-neon),
        0 0 60px var(--green-neon);
}

@keyframes chargeUp {
    0% {
        box-shadow:
            0 5px 0 #004422,
            0 7px 12px rgba(0,0,0,0.7),
            0 0 25px var(--green-neon),
            0 0 45px rgba(0,255,136,0.6);
        transform: scale(1);
    }
    20% {
        box-shadow:
            0 5px 0 #004422,
            0 7px 12px rgba(0,0,0,0.7),
            0 0 35px var(--green-neon),
            0 0 60px rgba(0,255,136,0.7);
        transform: scale(1.03);
    }
    40% {
        box-shadow:
            0 5px 0 #004422,
            0 7px 12px rgba(0,0,0,0.7),
            0 0 45px var(--green-neon),
            0 0 80px rgba(0,255,136,0.8);
        transform: scale(1.06);
    }
    60% {
        box-shadow:
            0 5px 0 #004422,
            0 7px 12px rgba(0,0,0,0.7),
            0 0 55px var(--green-neon),
            0 0 100px rgba(0,255,136,0.9);
        transform: scale(1.09);
    }
    80% {
        box-shadow:
            0 5px 0 #004422,
            0 7px 12px rgba(0,0,0,0.7),
            0 0 65px var(--green-neon),
            0 0 120px var(--green-neon);
        transform: scale(1.12);
    }
    100% {
        box-shadow:
            0 5px 0 #004422,
            0 7px 12px rgba(0,0,0,0.7),
            0 0 80px var(--green-neon),
            0 0 150px var(--green-neon),
            0 0 200px rgba(0,255,136,1);
        transform: scale(1.15);
    }
}

.char-item.is-active .btn-char-living img {
    filter:
        drop-shadow(0 2px 0 #8B6508)
        drop-shadow(0 5px 10px rgba(0,0,0,0.8))
        drop-shadow(0 0 20px var(--green-neon))
        drop-shadow(0 0 40px var(--green-neon));
    transform: translateY(4px) scale(0.98);
    transition: all 5s ease;
}

.char-item.is-active::after {
    width: 90%;
    height: 4px;
    box-shadow:
        0 0 20px var(--green-neon),
        0 0 40px var(--green-neon),
        0 0 80px var(--green-neon);
    transition: all 5s ease;
}

/* ============================================================
   [9.9] RESPONSIVE HP
   ============================================================ */
@media (max-width: 600px) {
    .poem-frame {
        padding: 35px 40px;
        min-height: 160px;
    }
    
    .poem-line[data-poem="1"],
    .poem-line[data-poem="2"] {
        font-size: 17px;
        line-height: 1.6;
        min-height: 26px;
        letter-spacing: 0.3px;
    }
    .poem-line-emphasis {
        font-size: 19px;
        letter-spacing: 0.5px;
    }
    .typewriter-cursor {
        font-size: 17px;
    }
    
    .page-title h1 { font-size: 20px; letter-spacing: 2px; }
    .page-title p { font-size: 12px; }

    .char-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 15px;
    }

    .char-item:nth-child(3) {
        grid-column: span 2;
        max-width: 100%;
    }

    .plaque-text { font-size: 12px; letter-spacing: 1.5px; }
    .char-item::after { bottom: 42px; }

    .plaque-3d { max-width: 100%; }
}

@media (max-width: 380px) {
    .poem-line[data-poem="1"],
    .poem-line[data-poem="2"] {
        font-size: 15px;
        min-height: 24px;
    }
    .poem-line-emphasis { font-size: 17px; }
    .typewriter-cursor { font-size: 15px; }
    .plaque-text { font-size: 10px; }
}
/* ============================================================
   [9.10] PUISI - UKURAN HP
   ============================================================ */
@media (max-width: 600px) {
    .poem-frame {
        padding: 30px 24px;
        min-height: 180px;
    }
    .poem-line[data-poem="1"],
    .poem-line[data-poem="2"] {
        font-size: 24px;
        line-height: 1.45;
        min-height: 36px;
        letter-spacing: 0.5px;
    }
    .poem-line.poem-line-emphasis {
        font-size: 26px;
    }
    .typewriter-cursor {
        font-size: 24px;
    }
}

@media (max-width: 380px) {
    .poem-line[data-poem="1"],
    .poem-line[data-poem="2"] {
        font-size: 21px;
        min-height: 32px;
    }
    .poem-line.poem-line-emphasis {
        font-size: 23px;
    }
    .typewriter-cursor {
        font-size: 21px;
    }
}
/* ============================================================
   [9.11] FRAME MUAT 6 BARIS
   ============================================================ */
.poem-line[hidden] {
    display: none !important;
}

/* Tinggi minimal supaya frame tidak mengecil saat puisi berbaris sedikit */
.poem-frame {
    min-height: 440px;
}

@media (max-width: 600px) {
    .poem-frame {
        min-height: 340px;
    }
}

@media (max-width: 380px) {
    .poem-frame {
        min-height: 320px;
    }
}
/* ============================================================
   [9.12] PUISI TIDAK KETIMPA FRAME (HP)
   ============================================================ */
@media (max-width: 600px) {
    .poem-frame {
        min-height: 340px;
        padding: 70px 52px 64px;
    }

    .poem-line[data-poem="1"],
    .poem-line[data-poem="2"] {
        font-size: 19px;
        line-height: 1.4;
        letter-spacing: 0.2px;
        margin: 4px 0;
        min-height: 0;
    }

    .poem-line.poem-line-emphasis {
        font-size: 20px;
    }

    .typewriter-cursor {
        font-size: 19px;
    }
}

@media (max-width: 380px) {
    .poem-frame {
        min-height: 380px;
        padding: 64px 44px 56px;
    }

    .poem-line[data-poem="1"],
    .poem-line[data-poem="2"] {
        font-size: 17px;
    }

    .poem-line.poem-line-emphasis {
        font-size: 18px;
    }

    .typewriter-cursor {
        font-size: 17px;
    }
}