/* NEO-BRUTALIST / CYBER-INDUSTRIAL AESTHETIC - BLUE, BLACK AND WHITE */

:root {
    --bg-base: #000000;
    --bg-surface: #0a0a0a;
    --bg-glass: rgba(0, 0, 0, 0.7);
    
    --accent-primary: #0066FF;
    --accent-secondary: #0044CC;
    --accent-tertiary: #FFFFFF;
    
    --text-main: #FFFFFF;
    --text-muted: #A0AAB5;
    
    --border-color: rgba(255, 255, 255, 0.15);
    --border-glow: rgba(0, 102, 255, 0.4);
    
    --font-display: 'Unbounded', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 8px;
    --radius-lg: 24px;
    
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-mono);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.bg-mesh {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2;
    background: 
        radial-gradient(circle at 15% 50%, rgba(0, 102, 255, 0.1), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(0, 68, 204, 0.1), transparent 30%);
    filter: blur(60px);
}
.bg-noise {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

.app-container { display: flex; flex-direction: column; min-height: 100vh; }

/* Navbar */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 2rem; position: sticky; top: 0; z-index: 100;
    background: var(--bg-glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}
.navbar-brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.navbar-logo {
    width: 48px; height: 48px;
    background: var(--text-main);
    color: var(--bg-base); font-family: var(--font-display); font-weight: 900;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.navbar-text { display: flex; flex-direction: column; gap: 0.2rem; }
.navbar-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.05em; }
.navbar-subtitle { font-size: 0.75rem; color: var(--accent-primary); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }

.navbar-actions { display: flex; align-items: center; gap: 1rem; }
.status-badge {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border: 1px solid var(--accent-primary);
    border-radius: 100px; font-size: 0.75rem; font-weight: 700;
    color: var(--accent-primary); background: rgba(0, 102, 255, 0.1);
}
.status-badge.offline { border-color: #ff3333; color: #ff3333; background: rgba(255, 51, 51, 0.1); }
.status-dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; box-shadow: 0 0 10px currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.btn-icon {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border-color); color: var(--text-main);
    border-radius: 50%; cursor: pointer; transition: all 0.3s var(--ease-bounce);
}
.btn-icon:hover { border-color: var(--accent-primary); color: var(--accent-primary); transform: rotate(45deg); box-shadow: 0 0 15px var(--border-glow); }

/* Hero Slider */
.hero { padding: 4rem 2rem 2rem; max-width: 1200px; margin: 0 auto; width: 100%; transition: all 0.5s var(--ease-smooth); }
.hero.minimized { height: 0; padding: 0; opacity: 0; overflow: hidden; pointer-events: none; margin: 0 auto; }

.slider-container {
    position: relative; height: 400px; border-radius: var(--radius-lg);
    background: var(--bg-surface); border: 1px solid var(--border-color);
    overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.slide {
    position: absolute; inset: 0; display: flex; align-items: center;
    padding: 3rem; opacity: 0; transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
    transform: translateX(5%); pointer-events: none; z-index: 1;
}
.slide.active { opacity: 1; transform: translateX(0); pointer-events: auto; z-index: 2; }
.slide.prev { transform: translateX(-5%); }

.slide-content { flex: 1; z-index: 2; display: flex; flex-direction: column; gap: 1.5rem; }
.slide-visual { flex: 1; position: relative; height: 100%; display: flex; align-items: center; justify-content: center; }

.slide-badge {
    display: inline-block; padding: 0.4rem 1rem; border: 1px solid var(--accent-primary);
    color: var(--accent-primary); font-size: 0.75rem; font-weight: 700;
    border-radius: 100px; text-transform: uppercase; letter-spacing: 0.15em;
    width: fit-content; background: rgba(0, 102, 255, 0.1);
}
.slide-title { font-family: var(--font-display); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 900; line-height: 1.1; }
.slide-title span { color: var(--accent-primary); }
.slide-description { font-size: 1.1rem; color: var(--text-muted); max-width: 480px; line-height: 1.6; }

.slide-image { max-width: 45%; max-height: 250px; object-fit: contain; filter: drop-shadow(0 0 20px rgba(0, 102, 255, 0.3)); z-index: 2; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

.visual-glow { position: absolute; width: 300px; height: 300px; background: var(--accent-primary); filter: blur(120px); opacity: 0.15; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; }

.stats-grid, .suggestions-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat-item { padding: 1rem 1.5rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-item span { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-main); display: block; margin-bottom: 0.2rem; }

.suggestion-chip {
    padding: 0.8rem 1.5rem; background: transparent; border: 1px solid var(--accent-primary);
    color: var(--text-main); font-family: var(--font-mono); font-size: 0.85rem;
    border-radius: 100px; cursor: pointer; transition: all 0.3s var(--ease-bounce);
}
.suggestion-chip:hover { background: var(--accent-primary); color: var(--text-main); transform: translateY(-3px); box-shadow: 0 10px 20px var(--border-glow); }

/* Abstract Visuals for other slides */
.abstract-shape { position: absolute; border-radius: 50%; filter: blur(40px); }
.shape-1 { width: 200px; height: 200px; background: var(--accent-primary); top: 10%; right: 20%; opacity: 0.2; animation: morph 8s infinite alternate; }
.shape-2 { width: 250px; height: 250px; background: var(--text-main); bottom: 10%; left: 10%; opacity: 0.1; animation: morph 12s infinite alternate-reverse; }
@keyframes morph { 0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 100% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; } }

.code-block-visual { width: 80%; background: var(--bg-base); border: 1px solid var(--border-color); padding: 2rem; border-radius: var(--radius-sm); box-shadow: 0 20px 40px rgba(0,0,0,0.5); display: flex; flex-direction: column; gap: 1rem; }
.code-line { height: 12px; background: rgba(255,255,255,0.1); border-radius: 4px; }
.w-80 { width: 80%; } .w-60 { width: 60%; background: var(--accent-primary); opacity: 0.8; } .w-90 { width: 90%; } .w-40 { width: 40%; background: var(--text-main); opacity: 0.5;}

/* Slider Controls */
.slider-controls {
    position: absolute; bottom: 2rem; left: 0; width: 100%; display: flex;
    justify-content: center; align-items: center; gap: 2rem; z-index: 10;
}
.slider-btn { background: var(--bg-glass); border: 1px solid var(--border-color); color: var(--text-main); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all 0.2s; backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center;}
.slider-btn:hover { background: var(--accent-primary); color: var(--text-main); border-color: var(--accent-primary); }
.slider-dots { display: flex; gap: 0.5rem; }
.dot { width: 30px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; cursor: pointer; transition: all 0.3s; }
.dot.active { background: var(--accent-primary); width: 50px; box-shadow: 0 0 10px var(--border-glow); }

/* Chat Area */
.chat-area { flex: 1; max-width: 1000px; width: 100%; margin: 0 auto; padding: 0 2rem 140px; display: flex; flex-direction: column; gap: 2rem; }

.message { display: flex; gap: 1.5rem; opacity: 0; animation: slideUp 0.5s var(--ease-bounce) forwards; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.message.user { flex-direction: row-reverse; }

.message-avatar {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 900; font-size: 1.2rem;
}
.message.assistant .message-avatar { background: var(--accent-primary); color: var(--text-main); box-shadow: 0 0 15px rgba(0, 102, 255, 0.4); }
.message.user .message-avatar { background: var(--bg-surface); border: 1px solid var(--border-color); color: var(--text-muted); }

.message-content {
    background: var(--bg-surface); padding: 1.5rem 2rem; border-radius: var(--radius-lg);
    border: 1px solid var(--border-color); max-width: 800px; line-height: 1.7; font-size: 1rem;
    position: relative;
}
.message.assistant .message-content { border-top-left-radius: 4px; border-left: 2px solid var(--accent-primary); }
.message.user .message-content { border-top-right-radius: 4px; border-right: 2px solid var(--text-main); background: rgba(255,255,255,0.05); }

.message-content p { margin-bottom: 1rem; }
.message-content p:last-child { margin-bottom: 0; }
.message-content h1, .message-content h2, .message-content h3 { font-family: var(--font-display); color: var(--text-main); margin: 1.5rem 0 1rem; }
.message-content code { background: rgba(0, 102, 255, 0.15); padding: 0.2rem 0.4rem; border-radius: 4px; color: #88bbff; }
.message-content pre { background: var(--bg-base); padding: 1.5rem; border-radius: var(--radius-sm); overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border-color); }
.message-content pre code { background: transparent; padding: 0; color: var(--text-main); }
.message-content ul, .message-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.message-content li { margin-bottom: 0.5rem; }

.sources { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px dashed var(--border-color); }
.sources-title { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.8rem; }
.sources-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.source-tag {
    padding: 0.4rem 0.8rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 4px;
    font-size: 0.75rem; color: var(--text-main); background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s; cursor: default;
}
.source-tag:hover { background: rgba(0, 102, 255, 0.2); border-color: var(--accent-primary); color: var(--accent-primary); }

.thinking { display: flex; gap: 1.5rem; }
.thinking-dots {
    background: var(--bg-surface); padding: 1.5rem 2rem; border-radius: var(--radius-lg); border-top-left-radius: 4px;
    border: 1px solid var(--border-color); border-left: 2px solid var(--accent-primary);
    display: flex; align-items: center; gap: 0.5rem; height: 60px;
}
.thinking-dots span { width: 8px; height: 8px; background: var(--accent-primary); border-radius: 50%; animation: bounce 1.4s infinite ease-in-out both; }
.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* Input Area */
.input-area {
    position: fixed; bottom: 0; left: 0; width: 100%; padding: 0 2rem 2rem;
    background: linear-gradient(to top, var(--bg-base) 60%, transparent); z-index: 50;
}
.input-wrapper { max-width: 1000px; margin: 0 auto; }
.input-glass {
    background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    display: flex; align-items: flex-end; padding: 0.8rem; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    transition: all 0.3s var(--ease-smooth); backdrop-filter: blur(10px);
}
.input-glass:focus-within { border-color: var(--accent-primary); box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px var(--border-glow); }

.input-field {
    flex: 1; background: transparent; border: none; outline: none; color: var(--text-main);
    font-family: var(--font-mono); font-size: 1rem; padding: 0.8rem 1rem; resize: none;
    min-height: 24px; max-height: 200px; line-height: 1.5;
}
.input-field::placeholder { color: var(--text-muted); }

.send-btn {
    width: 48px; height: 48px; border-radius: 50%; background: var(--text-main);
    color: var(--bg-base); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s var(--ease-bounce); margin-left: 0.8rem; flex-shrink: 0;
}
.send-btn:hover { background: var(--accent-primary); transform: scale(1.05); }
.send-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.input-footer { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-top: 1rem; letter-spacing: 0.05em; }

/* Feedback Area */
.feedback-bar { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--border-color); }
.feedback-btn { width: 32px; height: 32px; border: 1px solid var(--border-color); background: transparent; color: var(--text-main); border-radius: 4px; cursor: pointer; transition: all 0.2s; opacity: 0.5; }
.feedback-btn:hover { opacity: 1; border-color: var(--accent-primary); }
.feedback-btn.active-up { opacity: 1; border-color: #0066FF; background: rgba(0,102,255,0.1); }
.feedback-btn.active-down { opacity: 1; border-color: #ff3333; background: rgba(255,51,51,0.1); }
.feedback-label { font-size: 0.8rem; color: var(--text-muted); margin-left: 0.5rem; }

.correction-form { margin-top: 1rem; }
.correction-textarea { width: 100%; min-height: 80px; padding: 1rem; background: rgba(255,255,255,0.05); border: 1px solid var(--accent-primary); color: var(--text-main); font-family: var(--font-mono); font-size: 0.9rem; border-radius: var(--radius-sm); outline: none; margin-bottom: 0.8rem; resize: vertical; }
.correction-textarea:focus { box-shadow: 0 0 15px rgba(0, 102, 255, 0.2); }
.correction-actions { display: flex; justify-content: flex-end; gap: 1rem; }
.correction-btn { padding: 0.6rem 1.2rem; border-radius: 4px; font-family: var(--font-mono); font-weight: 700; cursor: pointer; transition: all 0.2s; font-size: 0.8rem; border: none; }
.correction-btn.primary { background: var(--accent-primary); color: white; }
.correction-btn.primary:hover { opacity: 0.9; box-shadow: 0 0 15px rgba(0,102,255,0.4); }
.correction-btn.secondary { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }
.correction-btn.secondary:hover { color: var(--text-main); border-color: var(--text-main); }
.feedback-success { margin-top: 1rem; padding: 1rem; border: 1px solid var(--accent-primary); background: rgba(0,102,255,0.05); color: var(--accent-primary); border-radius: var(--radius-sm); font-size: 0.85rem; }

/* Responsive */
@media(max-width: 900px) {
    .slide { flex-direction: column; padding: 2rem; text-align: center; justify-content: center; gap: 2rem; }
    .slide-visual { display: none; }
    .slider-container { height: 500px; }
    .stats-grid, .suggestions-grid { justify-content: center; }
    .hero-title { font-size: 2.5rem; }
}

@media(max-width: 600px) {
    .navbar { padding: 1rem; }
    .navbar-subtitle { display: none; }
    .navbar-logo { width: 36px; height: 36px; font-size: 0.9rem; }
    .slider-container { height: 450px; }
    .slide-title { font-size: 2rem; }
    .chat-area { padding: 0 1rem 120px; }
    .input-area { padding: 0 1rem 1rem; }
    .message { gap: 1rem; }
    .message-content { padding: 1rem; font-size: 0.9rem; }
    .message-avatar { width: 36px; height: 36px; font-size: 1rem; }
    .stats-grid { flex-direction: column; gap: 0.5rem; }
}

/* Learn Modal */
.learn-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; pointer-events: none; transition: all 0.3s var(--ease-smooth);
}
.learn-modal.active { opacity: 1; pointer-events: auto; }
.learn-modal-content {
    background: var(--bg-surface); border: 1px solid var(--accent-primary);
    width: 90%; max-width: 800px; border-radius: var(--radius-lg);
    box-shadow: 0 0 40px rgba(0, 102, 255, 0.3);
    display: flex; flex-direction: column; transform: translateY(20px); transition: all 0.3s var(--ease-bounce);
}
.learn-modal.active .learn-modal-content { transform: translateY(0); }
.learn-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; border-bottom: 1px solid var(--border-color); }
.learn-header h3 { font-family: var(--font-display); color: var(--text-main); font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; }
.learn-body { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.learn-input { width: 100%; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-main); font-family: var(--font-display); padding: 1rem; border-radius: var(--radius-sm); outline: none; font-size: 1.1rem; }
.learn-textarea { width: 100%; min-height: 250px; background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-main); font-family: var(--font-mono); padding: 1rem; border-radius: var(--radius-sm); outline: none; resize: vertical; line-height: 1.6; }
.learn-input:focus, .learn-textarea:focus { border-color: var(--accent-primary); box-shadow: 0 0 15px rgba(0, 102, 255, 0.2); }
.learn-actions { padding: 1.5rem 2rem; border-top: 1px solid var(--border-color); display: flex; justify-content: flex-end; gap: 1rem; background: rgba(255,255,255,0.02); border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }