:root {
    --primary: #8e2de2;
    --secondary: #4a00e0;
    --bg-dark: #0f0c29;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    z-index: -1;
}

.chat-container {
    width: 95%;
    max-width: 800px;
    height: 90vh;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: fadeIn 0.8s ease-out;
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.message.assistant {
    align-self: flex-start;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-bottom-right-radius: 4px;
}

.chat-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
}

.input-wrapper {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px 12px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    padding: 8px 0;
    resize: none;
    outline: none;
}

.send-btn {
    background: var(--text);
    color: var(--bg-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    background: var(--primary);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.active { display: flex; }

.modal-content {
    background: #1a1a2e;
    padding: 32px;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    border: 1px solid var(--glass-border);
}

.modal-content h2 { margin-bottom: 12px; font-size: 1.5rem; }
.modal-content p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }

input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    margin-bottom: 16px;
    outline: none;
}

.primary-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.4s ease-out;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .chat-container { height: 100vh; border-radius: 0; width: 100%; }
    .message { max-width: 90%; }
}
