/* =========================================
   NIDROS AI - FULL SCREEN WEBSITE
   ========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: #f5f8fc;
    color: #152033;
    overflow: hidden;
}


/* =========================================
   MAIN APPLICATION
   ========================================= */

.app {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}


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

.topbar {
    width: 100%;
    min-height: 78px;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-bottom: 1px solid #e5eaf1;
    flex-shrink: 0;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 14px;
}


/* Logo */

.logo {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 13px;
    display: block;
}


/* Brand */

.brand {
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.brand span {
    color: #146ef5;
}

.subtitle {
    color: #748096;
    font-size: 13px;
    margin-top: 4px;
}


/* =========================================
   HEADER BUTTON
   ========================================= */

button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.secondary {
    padding: 10px 16px;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    background: #ffffff;
    color: #24354d;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.secondary:hover {
    background: #f5f8fc;
    border-color: #cbd5e1;
}

.secondary:active {
    transform: scale(0.97);
}


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

.chat {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 40px clamp(20px, 6vw, 100px);
    scroll-behavior: smooth;
}


/* Scrollbar */

.chat::-webkit-scrollbar {
    width: 8px;
}

.chat::-webkit-scrollbar-track {
    background: transparent;
}

.chat::-webkit-scrollbar-thumb {
    background: #d7dee8;
    border-radius: 20px;
}

.chat::-webkit-scrollbar-thumb:hover {
    background: #bcc7d5;
}


/* =========================================
   WELCOME AREA
   ========================================= */

.welcome {
    width: min(850px, 100%);
    margin: 10vh auto 0;
    text-align: center;
}


/* Logo in welcome */

.robot {
    width: 90px;
    height: 90px;
    margin: 0 auto 22px;
    border-radius: 25px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(20, 110, 245, 0.14), 0 3px 10px rgba(0, 0, 0, 0.06);
}

.robot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Welcome text */

.welcome h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -1.2px;
    color: #172238;
}

.welcome p {
    margin: 0 auto;
    max-width: 650px;
    color: #748096;
    font-size: 16px;
    line-height: 1.7;
}


/* =========================================
   SUGGESTIONS
   ========================================= */

.suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.suggestions button {
    padding: 12px 17px;
    border: 1px solid #e0e7f0;
    border-radius: 24px;
    background: #f7f9fc;
    color: #28415f;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.suggestions button:hover {
    background: #ffffff;
    border-color: #bcd0ed;
    box-shadow: 0 5px 18px rgba(20, 110, 245, 0.08);
    transform: translateY(-2px);
}


/* =========================================
   CHAT MESSAGES
   ========================================= */

.message {
    display: flex;
    width: 100%;
    max-width: 1000px;
    margin: 18px auto;
}

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

.bubble {
    max-width: min(75%, 760px);
    padding: 14px 17px;
    border-radius: 18px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.user .bubble {
    background: #146ef5;
    color: #ffffff;
    border-bottom-right-radius: 5px;
}

.assistant .bubble {
    background: #f1f4f8;
    color: #172238;
    border-bottom-left-radius: 5px;
}


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

.correction {
    max-width: 760px;
    margin: -7px auto 10px;
    padding-right: 5px;
    font-size: 12px;
    color: #6c7789;
    text-align: right;
}


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

.composer {
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px clamp(18px, 6vw, 100px);
    background: #ffffff;
    border-top: 1px solid #e7ebf0;
    flex-shrink: 0;
}

textarea {
    flex: 1;
    min-height: 50px;
    max-height: 140px;
    resize: none;
    padding: 14px 16px;
    border: 1px solid #d9e0e9;
    border-radius: 15px;
    outline: none;
    background: #ffffff;
    color: #152033;
    font: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea::placeholder {
    color: #9aa5b5;
}

textarea:focus {
    border-color: #146ef5;
    box-shadow: 0 0 0 3px rgba(20, 110, 245, 0.08);
}


/* =========================================
   SEND BUTTON
   ========================================= */

#sendBtn {
    min-height: 50px;
    padding: 0 22px;
    border-radius: 13px;
    background: #146ef5;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#sendBtn:hover {
    background: #0d5edb;
    box-shadow: 0 7px 18px rgba(20, 110, 245, 0.2);
}

#sendBtn:active {
    transform: scale(0.97);
}

#sendBtn:disabled {
    opacity: 0.6;
    cursor: wait;
}


/* =========================================
   PRIVACY TEXT
   ========================================= */

.privacy {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0 15px 10px;
    background: #ffffff;
    color: #8994a5;
    font-size: 11px;
    flex-shrink: 0;
}


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

@media (max-width: 700px) {
    body {
        overflow: hidden;
    }
    .topbar {
        min-height: 68px;
        padding: 10px 14px;
    }
    .brand-area {
        gap: 10px;
    }
    .logo {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    .brand {
        font-size: 20px;
    }
    .subtitle {
        font-size: 11px;
    }
    .secondary {
        padding: 8px 11px;
        font-size: 12px;
    }
    .chat {
        padding: 25px 14px;
    }
    .welcome {
        margin-top: 7vh;
    }
    .robot {
        width: 75px;
        height: 75px;
        border-radius: 20px;
    }
    .welcome h1 {
        font-size: 30px;
    }
    .welcome p {
        font-size: 14px;
    }
    .suggestions {
        gap: 8px;
    }
    .suggestions button {
        width: 100%;
        padding: 11px 13px;
    }
    .bubble {
        max-width: 88%;
        font-size: 14px;
    }
    .composer {
        padding: 10px;
    }
    textarea {
        min-height: 46px;
        padding: 12px;
    }
    #sendBtn {
        min-height: 46px;
        padding: 0 15px;
    }
    .privacy {
        padding-bottom: 7px;
    }
}


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

.chat-question {
    background: #e8f1f8;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    width: fit-content;
    max-width: 80%;
    margin-left: auto;
    font-size: 14px;
    line-height: 1.5;
}

.ai-answer {
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 6px;
    max-width: 85%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    line-height: 1.55;
}

.knowledge-source {
    margin-top: 10px;
    margin-left: 4px;
    margin-bottom: 18px;
    color: #198754;
    font-size: 12px;
    font-weight: 500;
}


/* =========================================
   SMALL PHONES
   ========================================= */

@media (max-width: 420px) {
    .subtitle {
        display: none;
    }
    .welcome {
        margin-top: 5vh;
    }
    .welcome h1 {
        font-size: 27px;
    }
    .robot {
        width: 68px;
        height: 68px;
    }
    .bubble {
        max-width: 94%;
    }
}