/* =========================
   GLOBAL RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    background:#0f172a;
    font-family:Arial, sans-serif;
}

/* =========================
   GLOBAL ELEMENTS
========================= */

input,
textarea,
button{
    font-family:inherit;
}

button,
input,
textarea,
a{
    transition:0.3s;
}

/* =========================
   NAVBAR
========================= */

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#111827;
    padding:14px 20px;
    color:white;
    flex-wrap:wrap;
    position:sticky;
    top:0;
    z-index:999;
}

.logo{
    font-size:22px;
    font-weight:bold;
}

.menu{
    display:flex;
    gap:20px;
    align-items:center;
}

.menu a{
    color:white;
    text-decoration:none;
    font-size:15px;
}

.menu a:hover{
    color:#3b82f6;
}

.right{
    display:flex;
    gap:10px;
    align-items:center;
}

.user-name{
    color:#cbd5e1;
    font-size:14px;
}

/* =========================
   BUTTONS
========================= */

.btn{
    padding:8px 14px;
    border-radius:8px;
    text-decoration:none;
    color:white;
    font-size:14px;
    border:none;
    cursor:pointer;
}

.login-btn{
    background:#2563eb;
}

.register-btn{
    background:#059669;
}

.logout-btn{
    background:#dc2626;
}

.btn:hover{
    opacity:0.9;
}

/* =========================
   CONTAINER
========================= */

.container{
    padding:20px;
}

/* =========================
   AUTH AREA
========================= */

.auth-container{
    width:100%;
    min-height:calc(100vh - 80px);
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.auth-card{
    width:100%;
    max-width:420px;
    background:#111827;
    border-radius:20px;
    padding:35px;
    box-shadow:0 0 30px rgba(0,0,0,0.3);
}

.auth-logo{
    width:70px;
    height:70px;
    margin:auto;
    margin-bottom:20px;
    border-radius:50%;
    background:#2563eb;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
}

.auth-card h2{
    color:white;
    text-align:center;
    margin-bottom:10px;
}

.subtitle{
    color:#94a3b8;
    text-align:center;
    margin-bottom:30px;
    font-size:14px;
}

/* =========================
   INPUTS
========================= */

.input-group{
    margin-bottom:20px;
}

.input-group input{
    width:100%;
    padding:14px 16px;
    border:none;
    outline:none;
    border-radius:12px;
    background:#1e293b;
    color:white;
    font-size:15px;
}

.input-group input::placeholder{
    color:#94a3b8;
}

/* =========================
   PASSWORD FIELD
========================= */

.password-group{
    position:relative;
}

.password-group input{
    padding-right:50px;
}

.toggle-password{
    position:absolute;
    right:15px;
    top:50%;
    transform:translateY(-50%);
    cursor:pointer;
    color:#94a3b8;
    font-size:18px;
}

/* =========================
   FORM BUTTON
========================= */

.register-btn{
    width:100%;
    padding:14px;
    border:none;
    border-radius:12px;
    background:#2563eb;
    color:white;
    font-size:16px;
    cursor:pointer;
}

.register-btn:hover{
    background:#1d4ed8;
}

/* =========================
   BOTTOM TEXT
========================= */

.bottom-text{
    text-align:center;
    margin-top:25px;
    color:#cbd5e1;
    font-size:14px;
}

.bottom-text a{
    color:#3b82f6;
    text-decoration:none;
    font-weight:bold;
}

/* =========================
   ERROR MESSAGE
========================= */

.error-box{
    background:#7f1d1d;
    color:#fecaca;
    padding:12px;
    border-radius:10px;
    margin-bottom:20px;
    font-size:14px;
}

/* =========================
   CHAT PAGE
========================= */

.chat-page{
    width:100%;
    min-height:100vh;
    background:#0f172a;
    padding:20px;
}

/* =========================
   CHAT HEADER
========================= */

.chat-header{
    margin-bottom:25px;
}

.chat-header h2{
    color:white;
    margin-bottom:5px;
}

.chat-header p{
    color:#94a3b8;
}

/* =========================
   CHAT AREA
========================= */

.chat-container{
    width:100%;
    max-width:900px;
    margin:auto;
    min-height:10vh;
}

/* =========================
   MESSAGE ROW
========================= */

.message-row{
    display:flex;
    margin-bottom:20px;
}

.bot-row{
    justify-content:flex-start;
}

.user-row{
    justify-content:flex-end;
}

/* =========================
   MESSAGE
========================= */

.message{
    max-width:75%;
    padding:15px;
    border-radius:18px;
    font-size:15px;
    line-height:1.5;
}

.bot-message{
    background:#1e293b;
    color:white;
}

.user-message{
    background:#2563eb;
    color:white;
}

/* =========================
   INPUT SECTION
========================= */

.input-section{
    width:100%;
    margin-top:20px;
}

.upload-box{
    width:100%;
    max-width:900px;
    margin:auto;
    background:#111827;
    padding:20px;
    border-radius:20px;
}

/* =========================
   FILE INPUT
========================= */

.upload-box input[type=file]{
    width:100%;
    background:#1e293b;
    border:none;
    border-radius:12px;
    padding:12px;
    color:#cbd5e1;
    margin-bottom:15px;
    cursor:pointer;
}

.upload-box input[type=file]::file-selector-button{
    background:#2563eb;
    border:none;
    color:white;
    padding:10px 14px;
    border-radius:8px;
    margin-right:12px;
    cursor:pointer;
}

/* =========================
   TEXTAREA
========================= */

.upload-box textarea{
    width:100%;
    min-height:120px;
    max-height:250px;
    background:#1e293b;
    border:none;
    border-radius:14px;
    padding:15px;
    color:white;
    resize:none;
    margin-bottom:15px;
    outline:none;
}

/* =========================
   CHAT BUTTON
========================= */

.upload-box button{
    width:100%;
    background:#2563eb;
    color:white;
    border:none;
    padding:14px;
    border-radius:14px;
    font-size:16px;
    cursor:pointer;
}

.upload-box button:hover{
    background:#1d4ed8;
}

/* dashboard */

.upload-box input,
.upload-box textarea,
.upload-box select{
    width:100%;
    margin-bottom:12px;
    padding:12px;
    border-radius:12px;
    border:none;
    outline:none;
    background:#1e293b;
    color:white;
    font-size:14px;
}

.upload-box select{
    cursor:pointer;
}

.upload-box textarea{
    min-height:90px;
    resize:none;
}

.upload-box input::placeholder,
.upload-box textarea::placeholder{
    color:#94a3b8;
}

/* =========================
   MOBILE
========================= */

@media(max-width:768px){

    .navbar{
        gap:15px;
        justify-content:center;
    }

    .menu{
        width:100%;
        justify-content:center;
        flex-wrap:wrap;
    }

    .right{
        width:100%;
        justify-content:center;
    }

    .chat-page{
        padding:15px;
    }

    .message{
        max-width:100%;
    }

    .upload-box{
        padding:15px;
    }

}

@media(max-width:500px){

    .auth-card{
        padding:25px;
        border-radius:16px;
    }

    .auth-card h2{
        font-size:24px;
    }

}