/* ---------- RESET ---------- */

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

/* ---------- TOP BAR ---------- */

.topbar {
    height: 60px;
    background: white;

    display: flex;
    align-items: center;
    gap: 15px;

    padding: 0 20px;

    box-sizing: border-box;
}

.menu-btn {
    background: none;
    border: none;

    font-size: 28px;
    cursor: pointer;
}

.topbar-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

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

/* ---------- SIDEBAR ---------- */

.sidebar {
    position: fixed;

    top: 60px;
    left: -220px;

    width: 220px;
    height: calc(100vh - 60px);

    background: white;

    border-right: 1px solid #e5e5e5;

    transition: left 0.3s ease;

    display: flex;
    flex-direction: column;

    box-sizing: border-box;
}

.sidebar.open {
    left: 0;
}

.menu {
    padding: 20px;
}

.bottom {
    margin-top: auto;
    padding: 20px;
}

.menu a {
    display: block;

    text-decoration: none;
    color: black;

    font-size: 16px;

    margin-bottom: 20px;
}

.bottom {
    margin-top: auto;
    padding: 20px;
}

.bottom a {
    text-decoration: none;
    color: black;
}

.sidebar a:hover {
    opacity: 0.7;
}

/* ---------- MAIN CONTENT ---------- */

.main {
    padding: 40px;
    transition: margin-left 0.3s ease;

    box-sizing: border-box;
}

.main.shift {
    margin-left: 220px;
}


/* ---------- LOGIN / REGISTER ---------- */

.login-container {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    align-items: center;

    text-align: center;

    padding-top: 100px;

    box-sizing: border-box;
}

.login-header {
    height: 220px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.login-logo {
    width: 120px;
    height: 120px;

    object-fit: contain;

    margin-bottom: 20px;
}

.login-container h1 {
    margin: 0;
}

.login-container p {
    margin: 10px 0;
}

.login-container form {
    width: 300px;

    display: flex;
    flex-direction: column;

    gap: 15px;
}

.input-field {
    width: 100%;

    padding: 12px;

    font-size: 16px;

    border: 1px solid #ddd;
    border-radius: 8px;

    box-sizing: border-box;
}

.login-button {
    width: 100%;

    padding: 12px;

    font-size: 16px;

    border: none;
    border-radius: 8px;

    background: black;
    color: white;

    cursor: pointer;
}

.login-button:hover {
    opacity: 0.9;
}

.register-link {
    margin-top: 20px;
}

.register-link a {
    text-decoration: none;
}

.success {
    color: green;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
}

.error {
    color: #d93025;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
}

/* ---------- CHAT PLACEHOLDER ---------- */

.chat-container {
    max-width: 900px;
    margin: 0 auto;
}

.chat-placeholder {
    margin-top: 80px;
    font-size: 24px;
    color: #444;
}

/* ---------- CHAT HOME ---------- */

.chat-home {
    height: calc(100vh - 70px);

    display: flex;
    flex-direction: column;

    align-items: center;

    padding-top: 40px;

    box-sizing: border-box;
}

.chat-home h1 {
    margin-bottom: 10px;
}

.chat-home p {
    color: #666;
    margin-bottom: 30px;
}

.chat-box {
    width: 100%;
    max-width: 900px;

    margin: 20px auto;

    flex-shrink: 0;
}

.chat-input {
    width: 100%;

    padding: 16px 20px;

    font-size: 16px;

    border: 1px solid #ddd;
    border-radius: 30px;

    box-sizing: border-box;

    outline: none;
}

.chat-input:focus {
    border-color: #999;
}

.welcome {
    text-align: center;
    width: 100%;
    margin-top: 120px;
    margin-bottom: 50px;
}

.chat-messages {

    flex: 1;
    min-height: 0;

    width: 100%;

    overflow-y: auto;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 12px;
}

.message {
    max-width: 70%;

    padding: 12px 16px;
    width: fit-content;
    display: inline-block;
    border-radius: 18px;

    word-wrap: break-word;
    line-height: 1.2;
}

.message.user {
    background: white;
    color: black;

    border: 1px solid #dcdcdc;
    border-radius: 20px;

    padding: 12px 16px;

    align-self: flex-end;
    max-width: 70%;
}

.message.aj {
    background: #e9e9e9;
    color: black;

    border-radius: 20px;

    padding: 12px 16px;

    align-self: flex-start;
    max-width: 70%;
}

.chat-layout {
    height: calc(100vh - 140px);

    display: flex;
    flex-direction: column;

    width: 100%;
    max-width: 900px;

    margin: 0 auto;
}

.chat-messages::-webkit-scrollbar {

    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {

    background: #c0c0c0;

    border-radius: 10px;
}

/* ---------- THINKING ---------- */

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

.thinking-label {
    font-weight: 600;
    opacity: 0.8;
}

.typing-indicator {
    display: flex;
    gap: 6px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: bounce 1.2s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

.thinking-bubble {
    white-space: nowrap;
}
@keyframes bounce {

    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.thinking {
    background: transparent;
    padding: 0;
    margin: 0;
}

