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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a1a;
    color: #fff;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* LOGIN */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-box {
    background: #2a2a2a;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
}

.login-box h1 {
    margin-bottom: 1.5rem;
}

.login-box input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #1a1a1a;
    color: #fff;
    font-size: 1rem;
}

.login-box button {
    width: 100%;
    padding: 0.75rem;
    background: #0066ff;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.login-box button:hover {
    background: #0052cc;
}

#login-error {
    color: #ff4444;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* CHAT */
#chat-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.chat-header {
    background: #2a2a2a;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

#messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column-reverse;
}

#messages {
    display: flex;
    flex-direction: column;
}

.message {
    background: #2a2a2a;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #0066ff;
}

.message.bot {
    border-left-color: #ff6600;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #aaa;
}

.message-author {
    font-weight: bold;
    color: #0066ff;
}

.message.bot .message-author {
    color: #ff6600;
}

.message-text {
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: #2a2a2a;
    border-top: 1px solid #444;
}

.chat-input textarea {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #444;
    border-radius: 4px;
    background: #1a1a1a;
    color: #fff;
    font-family: inherit;
    resize: none;
    min-height: 60px;
}

.chat-input button {
    padding: 0 2rem;
    background: #0066ff;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}

.chat-input button:hover {
    background: #0052cc;
}

/* Scrollbar */
#messages-container::-webkit-scrollbar {
    width: 8px;
}

#messages-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#messages-container::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

