@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0B1120;
    --bg-secondary: #1E293B;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --accent: #06B6D4;
    --accent-hover: #0891B2;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    margin: 0;
}

/* Animated Live Background */
.live-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 8s infinite ease-in-out alternate;
}

.orb-1 { width: 50vw; height: 50vw; background: #06b6d4; top: -20%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 45vw; height: 45vw; background: #3b82f6; bottom: -20%; right: -10%; animation-delay: -3s; }
.orb-3 { width: 40vw; height: 40vw; background: #10b981; top: 30%; left: 30%; animation-delay: -6s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15vw, 15vh) scale(1.2); }
    66% { transform: translate(-10vw, 20vh) scale(0.8); }
    100% { transform: translate(-15vw, -10vh) scale(1.1); }
}

/* Background Pattern for subtle clinical feel */
.bg-pattern {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: 1;
    pointer-events: none;
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 10;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

#screen-dashboard.active {
    display: flex;
    flex-direction: row;
}

/* Premium Glass */
.glass-panel {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Inputs */
.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Tabs */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

.sidebar-nav-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.sidebar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-nav-btn.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Agent animations */
.agent-spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dynamic Text Animation */
.dynamic-text-fade {
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: translateY(0);
}
.dynamic-text-fade.out {
    opacity: 0;
    transform: translateY(-10px);
}
.dynamic-text-fade.in-prepare {
    opacity: 0;
    transform: translateY(10px);
}

/* Agent Trace Terminal Modal */
@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: #22d3ee; } /* cyan-400 */
}
.animate-blink {
    animation: blink 1s step-end infinite;
}

#agent-trace-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#agent-trace-modal.active {
    opacity: 1;
    pointer-events: auto;
}
.terminal-window {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background: #0B1120;
    border: 1px solid #334155;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#agent-trace-modal.active .terminal-window {
    transform: scale(1);
}
.terminal-header {
    background: #1E293B;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #334155;
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.terminal-body {
    padding: 1.5rem;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #cbd5e1;
    flex-1;
}
.term-agent { color: #06B6D4; font-weight: bold; }
.term-thought { color: #94A3B8; font-style: italic; }
.term-action { color: #10B981; }
.term-obs { color: #F59E0B; }

