:root {
    --bg-dark: #0a0a0c;
    --sidebar-bg: #111114;
    --accent: #7c4dff;
    --accent-glow: rgba(124, 77, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(255, 255, 255, 0.03);
    --msg-user: #2d2d35;
    --msg-ai: rgba(124, 77, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar Styling */
.sidebar {
    width: 300px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #b388ff);
    border-radius: 8px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.model-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.model-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: 1px solid transparent;
}

.model-option:hover {
    background: var(--glass);
    border-color: var(--border);
}

.model-option.active {
    background: var(--msg-ai);
    border-color: var(--accent);
    color: var(--text-primary);
}

.model-option i {
    width: 18px;
    color: var(--text-secondary);
}

.model-option.active i {
    color: var(--accent);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 12px;
    width: 16px;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pulse {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Main Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: radial-gradient(circle at top right, rgba(124, 77, 255, 0.05), transparent 40%);
}

.chat-header {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.header-info h1 {
    font-size: 1.1rem;
    font-weight: 700;
}

.header-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--glass);
    color: var(--text-primary);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-screen {
    margin: auto;
    text-align: center;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent), #b388ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-screen h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.welcome-screen p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.message {
    max-width: 80%;
    padding: 16px 20px;
    border-radius: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    animation: slideUp 0.3s ease-out;
}

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

.message.ai {
    align-self: flex-start;
    background: var(--msg-ai);
    border: 1px solid rgba(124, 77, 255, 0.2);
    border-bottom-left-radius: 4px;
}

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

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px 16px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px 0;
    resize: none;
    max-height: 200px;
    outline: none;
    font-size: 0.95rem;
}

.send-btn {
    background: var(--accent);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.disclaimer {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
