:root {
    --primary: #38bdf8;
    --primary-dark: #1d80b9;
    --background: #1e293b;
    --surface: #1e293b;
    --text: #e2e8f0;
    --text-secondary: #add8e6;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #38bdf8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 90vh;
}

.chat-header {
    padding: 1rem;
    background: #334155;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #38bdf8;
    justify-content: space-between;
}

.chat-header h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0;
    flex-grow: 1;
}

.chat-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.clear-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.clear-button:hover {
    color: var(--primary);
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    align-items: start;
    gap: 1rem;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

.message i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 0.5rem;
}

.message-content {
    background: #334155;
    padding: 1rem;
    border-radius: 1rem;
    color: var(--text);
}

.user-message {
    margin-left: auto;
    flex-direction: row-reverse;
}

.user-message .message-content {
    background: var(--primary-dark);
}

.chat-input-container {
    padding: 1rem;
    background: #334155;
    border-top: 1px solid #38bdf8;
}

#chat-form {
    display: flex;
    gap: 1rem;
}

#user-input {
    flex-grow: 1;
    padding: 1rem;
    border: 1px solid #38bdf8;
    border-radius: 0.75rem;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
}

#user-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.3);
}

button {
    background: var(--primary);
    color: #0f172a;
    border: none;
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--surface);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 3px;
}

.back-button {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.back-button:hover {
    color: var(--primary);
    transform: translateX(-2px);
}
