* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.logo {
    color: #667eea;
    margin-bottom: 20px;
}

.login-box h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group input {
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.primary-btn {
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

.error-message {
    color: #e53e3e;
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
}

/* Chat Screen */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f7fafc;
    position: relative;
}

.chat-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-content svg {
    color: #667eea;
    flex-shrink: 0;
}

.header-content h2 {
    font-size: 20px;
    color: #1a202c;
    margin-bottom: 4px;
}

.header-content p {
    font-size: 14px;
    color: #718096;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.assistant-icon {
    background: #4a5568;
    color: white;
}

.message-content {
    flex: 1;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 800px;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-content p {
    line-height: 1.6;
    color: inherit;
    white-space: pre-wrap;
}

/* Typing Indicator */
.typing-indicator .message-content {
    padding: 12px 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Input Container */
.input-container {
    background: white;
    padding: 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 50px;
}

.input-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}

.input-wrapper input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
}

.send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar Styling */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-header {
        padding: 16px;
    }

    .messages-container {
        padding: 16px;
    }

    .input-container {
        padding: 16px;
    }

    .message-content {
        max-width: 100%;
    }
}