:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --msg-sent: #6366f1;
    --msg-received: #f3f4f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-gradient);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header Styles */
#header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    color: white;
}

#header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

#header span {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Chat Section */
#chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    width: 100%;
    margin: 2rem auto;
    background: var(--glass-bg);
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
}

/* Messages Area */
#messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

/* Scrollbar Styles */
#messages::-webkit-scrollbar {
    width: 6px;
}

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

#messages::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

/* Message Bubbles */
.message {
    max-width: 70%;
    padding: 0.875rem 1.25rem;
    border-radius: 18px;
    font-size: 0.9375rem;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

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

.message.sent {
    align-self: flex-end;
    background: var(--msg-sent);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: var(--msg-received);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.message-info {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    display: block;
}

.sent .message-info {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.received .message-info {
    color: var(--text-muted);
}

/* Form Area */
#form {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 1rem;
    align-items: center;
}

#input {
    flex: 1;
    background: #f9fafb;
    border: 2px solid transparent;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    outline: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

#input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

#form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#form button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#form button:active {
    transform: translateY(0);
}

/* Footer Section */
#footer-info {
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    #chat {
        margin: 0;
        border-radius: 0;
        height: 100%;
    }
    
    #header {
        padding: 1rem;
    }
}
