*{
    box-sizing:border-box;
}

body{
    margin:0;
    min-height:100vh;
    font-family:Arial, Helvetica, sans-serif;
    color:#1e1b4b;
    background:
        radial-gradient(circle at 15% 20%, rgba(168,85,247,.35), transparent 28%),
        radial-gradient(circle at 85% 10%, rgba(59,130,246,.30), transparent 30%),
        radial-gradient(circle at 80% 85%, rgba(236,72,153,.22), transparent 28%),
        linear-gradient(135deg, #f5f3ff 0%, #eef2ff 45%, #fdf2f8 100%);
    overflow-x:hidden;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background-image:
        linear-gradient(rgba(124,58,237,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,.06) 1px, transparent 1px);
    background-size:34px 34px;
    pointer-events:none;
    z-index:-2;
}

body::after{
    content:"";
    position:fixed;
    width:420px;
    height:420px;
    right:-140px;
    top:-130px;
    background:rgba(147,51,234,.25);
    filter:blur(70px);
    border-radius:50%;
    z-index:-1;
}

.page-bg{
    display:none;
}

.container{
    width:min(1120px, 92%);
    margin:0 auto;
    padding:50px 0;
}

.hero-card{
    position:relative;
    overflow:hidden;
    background:rgba(255,255,255,.72);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.75);
    border-radius:34px;
    padding:42px;
    box-shadow:0 30px 80px rgba(76,29,149,.18);
}

.hero-card::before{
    content:"";
    position:absolute;
    right:-90px;
    top:-90px;
    width:260px;
    height:260px;
    background:linear-gradient(135deg, #a855f7, #38bdf8);
    border-radius:50%;
    opacity:.22;
}

.hero-card::after{
    content:"";
    position:absolute;
    left:-70px;
    bottom:-90px;
    width:220px;
    height:220px;
    background:linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius:50%;
    opacity:.14;
}

.badge{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 15px;
    border-radius:999px;
    background:linear-gradient(135deg, rgba(124,58,237,.16), rgba(59,130,246,.14));
    color:#5b21b6;
    font-weight:700;
    font-size:14px;
}

h1{
    position:relative;
    margin:20px 0 0;
    font-size:46px;
    line-height:1.1;
    color:#17113f;
    letter-spacing:-1px;
}

.subtitle{
    position:relative;
    max-width:720px;
    margin:16px 0 30px;
    color:#51476f;
    font-size:17px;
    line-height:1.7;
}

.search-form{
    position:relative;
    display:flex;
    gap:12px;
    padding:10px;
    background:rgba(255,255,255,.7);
    border:1px solid rgba(124,58,237,.15);
    border-radius:24px;
    box-shadow:0 18px 38px rgba(88,28,135,.12);
}

.search-form input{
    flex:1;
    width:100%;
    border:0;
    outline:none;
    background:transparent;
    padding:17px 18px;
    font-size:16px;
    color:#1e1b4b;
}

.search-form input::placeholder{
    color:#8b7ca8;
}

.search-form:focus-within{
    box-shadow:0 0 0 5px rgba(168,85,247,.16), 0 20px 45px rgba(88,28,135,.16);
    border-color:rgba(124,58,237,.35);
}

.search-form button{
    border:0;
    padding:16px 28px;
    border-radius:18px;
    cursor:pointer;
    color:white;
    font-weight:700;
    font-size:16px;
    background:linear-gradient(135deg, #7c3aed, #2563eb);
    box-shadow:0 12px 25px rgba(124,58,237,.28);
    transition:.25s;
    white-space:nowrap;
}

.search-form button:hover{
    transform:translateY(-2px);
    box-shadow:0 16px 34px rgba(124,58,237,.35);
}

.result-section{
    margin-top:28px;
    padding:24px;
    border-radius:32px;

    background:rgba(255,255,255,.76);

    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);

    border:1px solid rgba(255,255,255,.75);

    box-shadow:0 25px 65px rgba(76,29,149,.14);
}

.result-header{
    margin-bottom:20px;
}

.result-header h2{
    margin:0 0 8px;
    font-size:30px;
    color:#1e1b4b;
}

.result-header p{
    margin:0;
    color:#61547b;
}

.result-grid{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.book-card{
    display:flex;
    align-items:flex-start;
    gap:16px;

    width:100%;
    overflow:hidden;

    padding:18px;

    border-radius:22px;

    background:rgba(255,255,255,.94);

    border:1px solid rgba(196,181,253,.45);

    box-shadow:0 10px 28px rgba(88,28,135,.08);
}

.book-cover{
    width:86px;
    min-width:86px;
    max-width:86px;

    height:120px;

    border-radius:14px;

    overflow:hidden;

    background:#ede9fe;
}

.book-cover img{
    width:86px;
    height:120px;
    object-fit:cover;
    display:block;
}

.no-cover{
    width:86px;
    height:120px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:28px;
}

.book-content{
    flex:1 !important;
    min-width:0 !important;
    width:auto !important;
    max-width:100% !important;

    overflow:hidden !important;
}
.book-content *{
    max-width:100% !important;
    word-break:break-word !important;
    overflow-wrap:break-word !important;
    white-space:normal !important;
}
.book-content h3{
    margin:0 0 10px;

    font-size:20px;
    line-height:1.4;

    color:#24184f;

    word-break:break-word;
}

.book-meta{
    display:flex;
    flex-wrap:wrap;
    gap:8px;

    margin-bottom:12px;
}

.book-meta span{
    display:inline-flex;
    align-items:center;

    padding:6px 10px;

    border-radius:999px;

    background:#ede9fe;

    color:#5b21b6;

    font-size:12px;
    font-weight:700;

    line-height:1.4;
}

.book-desc{
    margin:0;

    color:#5f5575;

    font-size:14px;
    line-height:1.7;

    word-break:break-word;
}

.more-text{
    display:none;
}

.more-text.show{
    display:inline;
}

.read-more{
    border:0;
    background:transparent;

    color:#7c3aed;

    font-weight:700;

    cursor:pointer;

    padding:0;
    margin-left:4px;

    font-size:13px;
}

/* MOBILE */
@media(max-width:768px){

    .result-section{
        padding:16px;
        border-radius:24px;
    }

    .result-header{
        margin-bottom:16px;
    }

    .result-header h2{
        font-size:26px;
        line-height:1.2;
    }

    .result-header p{
        font-size:14px;
    }

    .book-card{
        gap:12px;
        padding:14px;
        border-radius:18px;
    }

    .book-cover{
        width:68px;
        min-width:68px;
        max-width:68px;

        height:96px;
    }

    .book-cover img,
    .no-cover{
        width:68px;
        height:96px;
    }

    .book-content h3{
        font-size:15px;
        line-height:1.4;
    }

    .book-meta{
        flex-direction:column;
        align-items:flex-start;
        gap:6px;
    }

    .book-meta span{
        font-size:11px;
        line-height:1.5;
    }

    .book-desc{
        font-size:12px;
        line-height:1.6;
    }
}
.ai-recommendation{
    display:flex;
    gap:16px;
    align-items:flex-start;

    padding:18px 20px;
    margin-bottom:24px;

    border-radius:22px;

    background:
    linear-gradient(
        135deg,
        rgba(124,58,237,.10),
        rgba(59,130,246,.08)
    );

    border:1px solid rgba(124,58,237,.12);
}

.ai-icon{
    width:52px;
    height:52px;

    min-width:52px;

    border-radius:16px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:24px;

    background:
    linear-gradient(
        135deg,
        #7c3aed,
        #2563eb
    );

    color:white;
}

.ai-text{
    color:#4c1d95;
    line-height:1.7;
    font-size:15px;
}
/* RESPONSIVE ANDROID FIX */
@media(max-width:768px){

    body{
        overflow-x:hidden;
    }

    .container{
        width:100%;
        padding:14px;
    }

    .hero-card{
        padding:24px 18px;
        border-radius:24px;
    }

    .badge{
        font-size:13px;
    }

    h1{
        font-size:34px;
        line-height:1.15;
    }

    .subtitle{
        font-size:15px;
        line-height:1.6;
    }

    .search-form{
        flex-direction:column;
        gap:10px;
        padding:12px;
        border-radius:22px;
    }

    .search-form input{
        width:100%;
        font-size:15px;
        padding:15px;
    }

    .search-form button{
        width:100%;
        padding:15px;
        border-radius:16px;
    }

    .result-section{
        margin-top:18px;
        padding:18px 14px;
        border-radius:24px;
    }

    .result-header h2{
        font-size:26px;
    }

    .result-grid{
    display:flex !important;
    flex-direction:column !important;
    gap:14px !important;
    width:100% !important;
}

    .book-card{
        display:flex !important;
        gap:12px !important;
        padding:14px !important;
        border-radius:18px !important;
        flex-direction:row !important;
align-items:flex-start !important;
width:100% !important;
overflow:hidden !important;
    }

    .book-cover{
        width:64px !important;
        min-width:64px !important;
        height:92px !important;
    }

    .book-cover img{
        width:64px !important;
        height:92px !important;
    }

    .book-content h3{
        font-size:15px !important;
        line-height:1.35;
    }

    .book-meta span{
        font-size:11px !important;
        padding:5px 8px;
    }

    .book-desc{
        font-size:12.5px !important;
        line-height:1.55;
    }
}

/* RESPONSIVE FLOATING CHATBOT */
@media(max-width:768px){

    #floatingChat{
        right:12px !important;
        bottom:12px !important;
    }

    #floatingChat > button{
        padding:12px 15px !important;
        font-size:13px !important;
        border-radius:999px !important;
    }

    #chatPanel{
        position:fixed !important;
        left:8px !important;
        right:8px !important;
        bottom:72px !important;
        width:auto !important;
        height:76vh !important;
        border-radius:20px !important;
    }

    #chatPanel iframe{
        width:100% !important;
        height:calc(100% - 58px) !important;
    }
}
/* FIX MOBILE HASIL PENCARIAN */
@media screen and (max-width:768px){

    .result-grid{
        display:flex !important;
        flex-direction:column !important;
        width:100% !important;
        gap:14px !important;
    }

    .book-card{
        display:flex !important;
        flex-direction:row !important;
        align-items:flex-start !important;

        width:100% !important;
        max-width:100% !important;

        overflow:hidden !important;

        padding:14px !important;
        gap:12px !important;

        border-radius:18px !important;
        box-sizing:border-box !important;
    }

    .book-cover{
        width:70px !important;
        min-width:70px !important;
        max-width:70px !important;

        height:100px !important;
        overflow:hidden !important;

        border-radius:12px !important;
    }

    .book-cover img{
        width:70px !important;
        height:100px !important;
        object-fit:cover !important;
        display:block !important;
    }

    

    .book-content h3{
        font-size:15px !important;
        line-height:1.4 !important;

        width:100% !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;
    }

    .book-meta{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;

        width:100% !important;
        gap:6px !important;

        margin:8px 0 !important;
    }

    .book-meta span{
        display:inline-block !important;

        max-width:100% !important;

        font-size:11px !important;
        line-height:1.5 !important;

        word-break:break-word !important;
    }

    .book-desc{
        width:100% !important;

        font-size:12px !important;
        line-height:1.6 !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;
    }

    .read-more{
        display:inline-block !important;
        margin-top:6px !important;
    }

}
/* FIX TOTAL MOBILE RESULT */
@media(max-width:768px){

    .result-section{
        display:block !important;
        width:100% !important;
    }

    .result-header{
        display:block !important;
        width:100% !important;
        margin-bottom:18px !important;
    }

    .result-grid{
        display:flex !important;
        flex-direction:column !important;
        width:100% !important;
    }

    .book-card{
        display:flex !important;
        flex-direction:row !important;
        align-items:flex-start !important;

        width:100% !important;
        max-width:100% !important;

        gap:12px !important;

        overflow:hidden !important;
    }

    .book-cover{
        width:68px !important;
        min-width:68px !important;
        max-width:68px !important;

        height:96px !important;
    }

    .book-cover img{
        width:68px !important;
        height:96px !important;
        object-fit:cover !important;
    }

    .book-content{
        flex:1 !important;
        min-width:0 !important;

        width:100% !important;
        overflow:hidden !important;
    }

    .book-content h3{
        display:block !important;

        width:100% !important;

        font-size:15px !important;
        line-height:1.45 !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;

        white-space:normal !important;
    }

    .book-meta{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;

        width:100% !important;

        gap:6px !important;
    }

    .book-meta span{
        display:inline-block !important;

        width:auto !important;
        max-width:100% !important;

        white-space:normal !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;

        font-size:11px !important;
    }

    .book-desc{
        display:block !important;

        width:100% !important;

        white-space:normal !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;

        font-size:12px !important;
        line-height:1.6 !important;
    }

}
@media(max-width:768px){

    .result-section,
    .result-wrapper,
    .result-layout,
    .search-result,
    .result-container{
        display:block !important;
        width:100% !important;
    }

    .result-header{
        width:100% !important;
        margin-bottom:18px !important;
    }

    .result-grid{
        display:flex !important;
        flex-direction:column !important;
        width:100% !important;
    }

    .book-card{
        display:flex !important;
        flex-direction:row !important;
        align-items:flex-start !important;

        width:100% !important;
        max-width:100% !important;

        gap:12px !important;

        overflow:hidden !important;
    }

    .book-cover{
        width:68px !important;
        min-width:68px !important;
        max-width:68px !important;
        height:96px !important;
    }

    .book-cover img{
        width:68px !important;
        height:96px !important;
        object-fit:cover !important;
    }

    .book-content{
        flex:1 !important;
        min-width:0 !important;
        width:100% !important;
    }

    .book-content h3{
        font-size:15px !important;
        line-height:1.4 !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;

        white-space:normal !important;
    }

    .book-meta{
        display:flex !important;
        flex-direction:column !important;
        align-items:flex-start !important;
        gap:6px !important;
    }

    .book-meta span{
        white-space:normal !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;

        font-size:11px !important;
    }

    .book-desc{
        white-space:normal !important;

        word-break:break-word !important;
        overflow-wrap:break-word !important;

        font-size:12px !important;
        line-height:1.6 !important;
    }

}
/* FINAL FIX HASIL PENCARIAN MOBILE */
@media(max-width:768px){

    .result-section{
        display:block !important;
    }

    .result-header{
        display:block !important;
       

        margin-bottom:18px !important;
    }

    .result-grid{
        display:block !important;
        width:100% !important;
    }

    .book-card{
        display:flex !important;
        flex-direction:row !important;

        width:100% !important;
        max-width:100% !important;

        margin-bottom:14px !important;
    }

}
#liveResult{
    margin-top:18px;
}

.live-box{
    background:white;
    border-radius:24px;
    overflow:hidden;
    border:1px solid rgba(196,181,253,.35);
    box-shadow:0 20px 40px rgba(88,28,135,.12);
}

.live-item{
    display:flex;
    gap:14px;
    padding:14px 18px;
    border-bottom:1px solid #eee;
    transition:.2s;
}

.live-item:last-child{
    border-bottom:0;
}

.live-item:hover{
    background:#faf5ff;
}

.live-cover{
    width:55px;
    min-width:55px;
    height:78px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:24px;
}

.live-content{
    flex:1;
}

.live-title{
    font-size:15px;
    font-weight:700;
    color:#24184f;
    margin-bottom:6px;
}

.live-author,
.live-call{
    font-size:12px;
    color:#6b6282;
    line-height:1.6;
}

@media(max-width:768px){

    .live-item{
        padding:12px;
    }

    .live-title{
        font-size:14px;
    }

}