/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Vibrant Palette */
    --color-bg: #030014; /* Deep space blue/black */
    --color-surface: #0f0c29;
    --color-surface-glass: rgba(15, 12, 41, 0.7);
    
    --color-primary: #a855f7; /* Purple */
    --color-secondary: #06b6d4; /* Cyan */
    --color-accent: #3b82f6; /* Blue */
    
    --gradient-main: linear-gradient(135deg, var(--color-secondary), var(--color-accent), var(--color-primary));
    --gradient-text: linear-gradient(to right, #22d3ee, #a855f7);
    --gradient-glow: radial-gradient(circle at center, rgba(168, 85, 247, 0.4) 0%, transparent 70%);

    /* Text */
    --text-main: #ffffff;
    --text-muted: #94a3b8;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --border-glass: 1px solid rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-bg);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Utilities */
.glass {
    background: var(--color-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--border-glass);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.btn-primary {
    background: var(--gradient-main);
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(168, 85, 247, 0.5);
}

/* Layout */
.app-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* Background Effects */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient-glow);
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.blob-1 { top: -10%; left: -10%; }
.blob-2 { bottom: -10%; right: -10%; animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, 50px); }
}

/* Landing Page Specifics */
#landing-page {
    display: flex; /* Changed via JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: 100vh;
}

.hero-logo {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    animation: pulse-glow 3s infinite;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: var(--spacing-xl);
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(6, 182, 212, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.6)); }
}

/* Chat Interface (Hidden by default) */
#chat-interface {
    display: none; /* Changed via JS */
    height: 100vh;
    width: 100vw;
    grid-template-columns: 260px 1fr;
    overflow: hidden;
}

.sidebar {
    background: rgba(3, 0, 20, 0.9);
    border-right: var(--border-glass);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
}

.chat-main {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chat-header {
    padding: var(--spacing-md);
    border-bottom: var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.messages-area {
    flex: 1;
    padding: var(--spacing-lg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.message {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    line-height: 1.5;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.message.user {
    align-self: flex-end;
    background: var(--color-primary);
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    color: white;
    border-bottom-right-radius: 4px;
}

.message.ai {
    align-self: flex-start;
    background: var(--color-surface-glass);
    border: var(--border-glass);
    border-bottom-left-radius: 4px;
}

.input-area {
    padding: var(--spacing-lg);
    /* border-top: var(--border-glass); */
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.chat-input {
    width: 100%;
    background: var(--color-surface);
    border: var(--border-glass);
    border-radius: var(--radius-full);
    padding: 16px 24px;
    padding-right: 60px; /* Space for button */
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.send-btn {
    position: absolute;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-main);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.send-btn:hover {
    transform: scale(1.1);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
