/* =====================================================
   CHATBOT ITSBM SELAYAR
   DARK MODERN RESPONSIVE DESIGN
===================================================== */


/* ================= RESET ================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI",Tahoma,Geneva,Verdana,sans-serif;
}


body{

    background:#0b1120;
    color:white;
    min-height:100vh;

}

/* ================= TOPBAR ================= */

.topbar{

    width:100%;

    background:#111827;

    padding:15px 35px;

    display:flex;

    justify-content:flex-end;

    align-items:center;

    border-bottom:1px solid #243045;

}



.top-menu{

    display:flex;

    align-items:center;

    gap:12px;

}



/* SEMUA BUTTON TOPBAR */

.top-btn{

    display:flex;

    align-items:center;

    justify-content:center;

    min-width:150px;

    height:42px;

    padding:0 20px;

    background:#ffffff;

    color:#111827;

    border-radius:8px;

    text-decoration:none;

    font-size:14px;

    font-weight:600;

    border:none;

    cursor:pointer;

    transition:0.3s;

    box-sizing:border-box;

}



.top-btn:hover{

    background:#2563eb;

    color:white;

}


/* LOGIN ADMIN */

.admin-btn{

    background:#ffffff;

    color:#111827;

    border:1px solid transparent;

}



.admin-btn:hover{

    background:#2563eb;

    color:white;

}

/* TITIK HIJAU LOGIN */

.admin-dot{

    width:10px;

    height:10px;

    background:#22c55e;

    border-radius:50%;

    margin-right:8px;

}

/* ================= HEADER ================= */

.header{

    width:90%;

    margin:20px auto;

    background:#111827;

    border-radius:18px;

    padding:20px 25px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:30px;

}



.header-left{

    display:flex;

    align-items:center;

    gap:15px;

}



/* LOGO */

.logo{

    width:65px;

    height:65px;

    border-radius:50%;

    object-fit:cover;

}



.title h1{

    font-size:26px;

    font-weight:700;

}



.title p{

    margin-top:5px;

    color:#94a3b8;

    font-size:14px;

}



.welcome{

    background:#1d4ed8;

    color:white;

    padding:12px 18px;

    border-radius:12px;

    font-size:14px;

    font-weight:600;

    width:fit-content;

    max-width:450px;

    line-height:1.5;

    display:flex;

    align-items:center;

    gap:8px;

    flex-shrink:0;

}

/* ================= CHAT CONTAINER ================= */


.chat-container{

    width:90%;

    margin:auto;

    background:#111827;

    border-radius:20px;

    overflow:hidden;

    box-shadow:

    0 0 20px rgba(37,99,235,.2);

}




.chat-header{

    background:#172554;

    padding:15px 20px;

    display:flex;

    justify-content:space-between;

    align-items:center;

}


.chat-title{

    font-size:22px;

    font-weight:bold;

    color:#facc15; /* kuning emas */

}



.online{

    color:#facc15; /* kuning emas */

    font-size:14px;

    margin-top:5px;

    font-weight:600;

}


/* MODE BUTTON */

.theme-btn{

    width:42px;

    height:42px;

    border:none;

    border-radius:10px;

    background:#facc15;

    cursor:pointer;

    font-size:18px;

}




/* ================= CHAT AREA ================= */


.chat-box{

    height:420px;

    overflow-y:auto;

    padding:20px;

    background:#0f172a;

}



.chat-box::-webkit-scrollbar{

    width:7px;

}


.chat-box::-webkit-scrollbar-thumb{

    background:#334155;

    border-radius:20px;

}




/* ================= CHAT BUBBLE ================= */


.bot,
.user{

    position:relative;

    max-width:60%;

    padding:12px 15px;

    border-radius:15px;

    margin-bottom:15px;

    line-height:1.5;

    font-size:14px;

    animation:fade .3s;

}



.bot{

    background:#1e293b;

    margin-left:5px;

}



.user{

    background:#2563eb;

    margin-left:auto;

    margin-right:5px;

}




.bot::before{

    content:"";

    position:absolute;

    left:-10px;

    top:18px;

    border-width:10px;

    border-style:solid;

    border-color:transparent #1e293b transparent transparent;

}



.user::after{

    content:"";

    position:absolute;

    right:-10px;

    top:18px;

    border-width:10px;

    border-style:solid;

    border-color:transparent transparent transparent #2563eb;

}




.bot-name{

    color:#60a5fa;

    font-weight:bold;

    margin-bottom:8px;

}



.user-name{

    font-weight:bold;

    margin-bottom:8px;

}



.time{

    margin-top:8px;

    font-size:11px;

    color:#cbd5e1;

}



/* ================= FAQ ================= */


.faq-btn{

    margin:5px;

    padding:8px 14px;

    border:none;

    border-radius:20px;

    background:#2563eb;

    color:white;

    cursor:pointer;

    font-size:13px;

}



.faq-btn:hover{

    background:#1d4ed8;

}




/* ================= INPUT ================= */


.input-area{

    background:#111827;

    display:flex;

    gap:12px;

    padding:15px;

}



.input-area input{

    flex:1;

    padding:12px;

    border:none;

    outline:none;

    border-radius:12px;

    background:#1e293b;

    color:white;

    font-size:14px;

}



.input-area input:focus{

    box-shadow:0 0 12px rgba(37,99,235,.4);

}




.input-area button{

    width:100px;

    background:#2563eb;

    color:white;

    border:none;

    border-radius:12px;

    cursor:pointer;

    font-weight:bold;

    transition:.3s;

}



.input-area button:hover{

    background:#1d4ed8;

    transform:scale(1.05);

}




/* ================= FOOTER ================= */


.footer{

    text-align:center;

    padding:18px;

    color:#94a3b8;

    font-size:13px;

}



/* ================= ANIMATION ================= */


@keyframes fade{

    from{

        opacity:0;

        transform:translateY(10px);

    }


    to{

        opacity:1;

        transform:translateY(0);

    }

}




/* =====================================================
   TABLET
===================================================== */


@media(max-width:768px){


.topbar{

    flex-direction:column;

    padding:15px;

}


.top-menu{

    flex-direction:column;

    width:100%;

}



.header{

    flex-direction:column;

    text-align:center;

}



.header-left{

    flex-direction:column;

}



.title h1{

    font-size:22px;

}



.welcome{

    width:100%;

}



.chat-container{

    width:95%;

}



.chat-box{

    height:380px;

}



.bot,
.user{

    max-width:85%;

}



.input-area{

    flex-direction:column;

}



.input-area button{

    width:100%;

    height:42px;

}


}





/* =====================================================
   HP KECIL
===================================================== */


@media(max-width:768px){

    .welcome{

        width:100%;

        max-width:100%;

        justify-content:center;

        text-align:center;

    }


.logo{

    width:55px;

    height:55px;

}



.title h1{

    font-size:18px;

}



.chat-title{

    font-size:17px;

}



.chat-box{

    height:350px;

}



.bot,
.user{

    max-width:90%;

    font-size:13px;

}


}

/* =====================================================
   LIGHT MODE
===================================================== */


body.light-mode{

    background:#f1f5f9;

    color:#111827;

}
body.light-mode .welcome{

    background:#dbeafe;

    color:#1e3a8a;

}
body.light-mode .welcome i{

    color:#2563eb;

}


/* TOPBAR */

body.light-mode .topbar{

    background:white;

    border-bottom:1px solid #ddd;

}



body.light-mode .top-btn{

    color:#111827;

}



/* HEADER */

body.light-mode .header{

    background:white;

}



body.light-mode .title h1{

    color:#111827;

}



body.light-mode .title p{

    color:#64748b;

}



/* CHAT CONTAINER */

body.light-mode .chat-container{

    background:white;

}



/* CHAT HEADER */

body.light-mode .chat-header{

    background:#2563eb;

}



/* AREA CHAT */

body.light-mode .chat-box{

    background:#e2e8f0;

}



/* BOT */

body.light-mode .bot{

    background:white;

    color:#111827;

}



/* USER */

body.light-mode .user{

    background:#2563eb;

    color:white;

}



/* INPUT */

body.light-mode .input-area{

    background:white;

}



body.light-mode .input-area input{

    background:#e2e8f0;

    color:#111827;

}



/* FOOTER */

body.light-mode .footer{

    color:#475569;

}