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

body {
    font-family: 'Cal Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 20px;
}

.header {
    padding: 30px 0 20px;
    text-align: center;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
}

.messages::-webkit-scrollbar {
    width: 6px;
}

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

.messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.message {
    margin-bottom: 24px;
    animation: fadeInUp 0.3s ease-out;
}

.message-content {
    max-width: 70%;
    padding: 16px 20px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
}

.user-message .message-content {
    background: #1a1a1a;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: white;
    color: #1a1a1a;
    border: 1px solid #e5e5e5;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-form {
    display: flex;
    gap: 12px;
    padding: 20px 0 30px;
    border-top: 1px solid #e5e5e5;
}

#userInput {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 25px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

#userInput:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.send-btn {
    padding: 16px 24px;
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.send-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.send-btn:active {
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    color: #666;
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typing 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 typing {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    #userInput {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

