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

:root {
    --bg-deep: #06060a;
    --bg-main: #0a0b10;
    --bg-sidebar: #0d0e14;
    --bg-surface: #12131a;
    --bg-card: #161720;
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.12);
    --primary: #7c5cfc;
    --primary-light: #9b7dff;
    --primary-glow: rgba(124,92,252,0.3);
    --accent: #00e5a0;
    --accent-glow: rgba(0,229,160,0.25);
    --text-main: #eaedf3;
    --text-secondary: #a0a8bf;
    --text-muted: #5a6178;
    --error: #ff6b6b;
    --warning: #f5a623;
    --success: #00e5a0;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== ANIMATED BACKGROUND ===== */
body::before, body::after {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    z-index: 0;
    pointer-events: none;
}
body::before {
    background: radial-gradient(circle at 50% 50%, rgba(124,92,252,0.15), transparent 60%);
    animation: bgPulse 12s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
    mix-blend-mode: screen;
}
body::after {
    background: 
        linear-gradient(rgba(0, 229, 160, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 160, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridScroll 15s linear infinite;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(2);
    transform-origin: top;
    opacity: 0.8;
}

@keyframes bgPulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.5; filter: hue-rotate(0deg); }
    100% { transform: scale(1.3) translate(5%, 5%); opacity: 1; filter: hue-rotate(45deg); }
}

@keyframes gridScroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

.hidden { display: none !important; }

/* ===== LOGIN OVERLAY ===== */
.login-overlay {
    position: fixed; inset: 0;
    background: rgba(6,6,10,0.97);
    backdrop-filter: blur(30px);
    z-index: 100;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}
.login-overlay.hidden-overlay { opacity: 0; pointer-events: none; visibility: hidden; }

.login-box {
    background: linear-gradient(135deg, rgba(22,23,32,0.95), rgba(13,14,20,0.98));
    border: 1px solid var(--border);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    text-align: center;
    max-width: 420px; width: 92%;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
    position: relative;
    overflow: hidden;
}
.login-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.login-box .login-logo-img {
    width: 64px; height: 64px; border-radius: 16px;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}
.logo {
    font-size: 2.2rem; font-weight: 900; margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary-light) 50%, var(--text-secondary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.login-box > p { color: var(--text-muted); font-size: 0.9rem; font-weight: 400; }
.input-group { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.75rem; }
.input-group input {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    padding: 0.9rem 1.2rem; color: white; border-radius: var(--radius);
    font-family: inherit; font-size: 0.9rem; outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.input-group input::placeholder { color: var(--text-muted); }
.error-msg { color: var(--error); font-size: 0.85rem; margin-top: 0.5rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6344e0);
    color: white; border: none; padding: 0.9rem 1.5rem;
    border-radius: var(--radius); cursor: pointer;
    font-weight: 700; font-size: 0.9rem; font-family: inherit;
    transition: all var(--transition);
    position: relative; overflow: hidden;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--primary-glow); }
.btn-primary::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    transform: translateX(-100%); transition: transform 0.6s;
}
.btn-primary:hover::after { transform: translateX(100%); }

/* ===== STUDIO LAYOUT ===== */
.studio-layout {
    display: flex; flex-direction: column;
    height: 100vh; position: relative; z-index: 1;
    animation: layout-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes layout-enter {
    0% { opacity: 0; transform: scale(0.98) translateY(10px); filter: blur(5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* ===== TOPBAR ===== */
.topbar {
    height: 56px;
    background: rgba(10,11,16,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 30px rgba(124,92,252,0.1);
    display: flex; align-items: center;
    padding: 0 1.25rem; gap: 1rem;
    position: relative; z-index: 10;
}
.topbar::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124,92,252,0.2), transparent);
}
.topbar-logo {
    display: flex; align-items: center; gap: 0.6rem;
    padding-right: 1.5rem; border-right: 1px solid var(--border);
}
.topbar-logo img { width: 28px; height: 28px; border-radius: 6px; }
.topbar-logo h1 {
    font-size: 0.95rem; font-weight: 800; letter-spacing: 0.3px;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.topbar-logo h1 span { font-weight: 500; opacity: 0.5; }

/* ===== MAIN TABS ===== */
.main-tabs {
    display: flex; align-items: center; gap: 0.25rem;
    margin-left: 0.5rem;
}
.main-tab {
    background: transparent; border: none; color: var(--text-muted);
    padding: 0.5rem 1rem; border-radius: 8px;
    font-family: inherit; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
    display: flex; align-items: center; gap: 0.4rem;
    position: relative;
}
.main-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.03); }
.main-tab.active {
    color: var(--primary-light);
    background: rgba(124,92,252,0.08);
}
.main-tab.active::after {
    content: ''; position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 2px; background: var(--primary);
    border-radius: 1px;
}
.main-tab svg { width: 15px; height: 15px; }

.topbar-right {
    margin-left: auto; display: flex; align-items: center; gap: 0.75rem;
}
.topbar-right label {
    cursor: pointer; display: flex; align-items: center; gap: 6px;
    font-weight: 500; font-size: 0.8rem; color: var(--text-muted);
}
.topbar-right input[type="checkbox"] { accent-color: var(--primary); }

.topbar-btn {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); padding: 0.35rem 0.75rem;
    border-radius: 8px; cursor: pointer; font-family: inherit;
    font-size: 0.78rem; font-weight: 600;
    transition: all var(--transition);
    display: flex; align-items: center; gap: 0.3rem;
}
.topbar-btn:hover { color: var(--text-main); border-color: var(--border-hover); background: rgba(255,255,255,0.03); }
.topbar-btn.admin { border-color: rgba(255,107,107,0.3); color: var(--error); }
.topbar-btn.admin:hover { background: rgba(255,107,107,0.08); }

/* ===== STUDIO BODY ===== */
.studio-body { display: flex; flex: 1; overflow: hidden; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: 272px; min-width: 272px;
    background: rgba(13,14,20,0.7);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.sidebar-header { padding: 1.25rem 1.25rem 0.75rem; }
.sidebar-header h2 {
    font-size: 0.7rem; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700;
}
.sidebar-actions {
    padding: 0 1.25rem 1rem;
    display: flex; flex-direction: column; gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.btn-outline {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    color: var(--text-secondary); padding: 0.6rem 0.75rem;
    border-radius: var(--radius); font-family: inherit;
    font-weight: 600; font-size: 0.8rem; cursor: pointer;
    display: flex; align-items: center; gap: 0.4rem;
    transition: all var(--transition);
    position: relative; overflow: hidden;
}
.btn-outline::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(124,92,252,0.1) 0%, transparent 70%);
    opacity: 0; transition: opacity 0.3s ease;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.05); border-color: rgba(124,92,252,0.4);
    color: white; box-shadow: 0 0 15px rgba(124,92,252,0.2);
    transform: translateY(-1px);
}
.btn-outline:hover::before { opacity: 1; }
.btn-outline svg { opacity: 0.7; transition: transform 0.3s; }
.btn-outline:hover svg { transform: scale(1.1); color: var(--primary-light); }

.search-box input {
    width: 100%; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); padding: 0.6rem 0.75rem;
    border-radius: var(--radius); color: white;
    font-family: inherit; font-size: 0.8rem; outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box input:focus {
    border-color: rgba(124,92,252,0.4);
    box-shadow: 0 0 0 2px rgba(124,92,252,0.1);
}
.search-box input::placeholder { color: var(--text-muted); }

.sidebar-list-header { padding: 1rem 1.25rem 0.4rem; }
.sidebar-list-header h3 { font-size: 0.65rem; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; }

.file-list {
    flex: 1; overflow-y: auto; padding: 0.4rem 0.5rem;
    display: flex; flex-direction: column; gap: 2px;
}
.file-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 0.75rem; border-radius: 8px; cursor: pointer;
    border: 1px solid transparent; transition: all 0.3s ease;
    background: rgba(255,255,255,0.01);
    animation: slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative; overflow: hidden;
}
@keyframes slide-in {
    0% { opacity: 0; transform: translateX(-15px); }
    100% { opacity: 1; transform: translateX(0); }
}
.file-item:hover { 
    background: rgba(255,255,255,0.04); 
    transform: translateX(4px);
    border-color: rgba(255,255,255,0.05);
}
.file-item.active {
    background: linear-gradient(90deg, rgba(124,92,252,0.1), rgba(124,92,252,0.02));
    border-color: rgba(124,92,252,0.3);
    box-shadow: inset 2px 0 0 var(--primary), 0 0 15px rgba(124,92,252,0.05);
}
.file-item.processing {
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
    border-left: 2px solid var(--primary-neon);
    animation: pulse-processing 1s infinite alternate;
}
@keyframes pulse-processing {
    0% { box-shadow: inset 0 0 5px rgba(0, 240, 255, 0); }
    100% { box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.2); }
}

.file-name { font-size: 0.82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.file-status { display: flex; align-items: center; gap: 4px; font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }
.file-status.processing { color: var(--primary-neon); font-weight: 700; text-shadow: 0 0 5px var(--primary-neon); }

@keyframes spin-neon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.file-status.processing::before {
    content: ''; display: inline-block; width: 12px; height: 12px;
    border: 2px solid transparent; border-top-color: var(--primary-neon); border-right-color: var(--primary-light);
    border-radius: 50%; animation: spin-neon 0.6s linear infinite;
    margin-right: 4px;
}
.file-status.processing span.icon-hide { display: none; }

.file-status.error { color: var(--error); }
.file-status.success { color: var(--success); text-shadow: 0 0 5px var(--success); }

/* ===== EDITOR AREA ===== */
.editor-area {
    flex: 1; display: flex; flex-direction: column;
    background: var(--bg-main); position: relative;
}
.editor-tabs {
    height: 44px; border-bottom: 1px solid var(--border);
    display: flex; padding: 0 1rem; align-items: flex-end; gap: 0.25rem;
}
.tab {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border);
    border-bottom: none; color: var(--text-muted);
    padding: 0.4rem 1.25rem; border-radius: 8px 8px 0 0;
    cursor: pointer; font-family: inherit; font-size: 0.8rem; font-weight: 600;
    display: flex; align-items: center; gap: 0.4rem;
    transition: all var(--transition);
}
.tab.active {
    background: var(--bg-main); color: var(--text-main);
    border-top: 2px solid var(--primary);
}
.editor-actions {
    display: flex; gap: 6px; padding-right: 12px;
    margin-left: auto; align-items: center;
}

.editor-content {
    flex: 1; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}

.no-file-selected {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%); text-align: center;
}
.icon-circle {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(124,92,252,0.12), rgba(0,229,160,0.06));
    display: flex; justify-content: center; align-items: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 0 30px rgba(124,92,252,0.1);
}
.no-file-selected h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.no-file-selected p { color: var(--text-muted); font-size: 0.85rem; }

/* ===== COMPILER TAB AREA ===== */
.compiler-panel {
    flex: 1; display: flex; flex-direction: column;
    background: var(--bg-main); position: relative;
}
.compiler-header {
    padding: 1.5rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
}
.compiler-header h2 {
    font-size: 1.1rem; font-weight: 800;
    display: flex; align-items: center; gap: 0.5rem;
}
.compiler-header h2 svg { color: var(--primary-light); }
.compiler-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.3rem; }

.compiler-body {
    flex: 1; display: flex; gap: 0; overflow: hidden;
}
.compiler-pane {
    flex: 1; display: flex; flex-direction: column;
    border-right: 1px solid var(--border);
    position: relative;
}
.compiler-pane:last-child { border-right: none; }
.compiler-pane-header {
    padding: 0.75rem 1.25rem;
    background: rgba(255,255,255,0.015);
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.compiler-pane-header h3 {
    font-size: 0.7rem; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700;
}
.compiler-pane-body {
    flex: 1; position: relative; overflow: hidden;
}
/* Holographic Scanline Effect */
.compiler-pane-body::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.15) 10%, transparent);
    background-size: 100% 10px;
    animation: scanline 4s linear infinite;
    pointer-events: none; mix-blend-mode: overlay;
    opacity: 0.7;
}
@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.compiler-pane-body textarea {
    width: 100%; height: 100%; resize: none;
    background: transparent; border: none; color: var(--text-main);
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
    padding: 1rem 1.25rem; outline: none; line-height: 1.7;
    position: relative; z-index: 2;
}
.compiler-pane-body textarea::placeholder { color: var(--text-muted); }

/* Blinking Terminal Cursor */
.status-typing::after {
    content: '█';
    color: var(--primary-neon);
    animation: blink-cursor 1s step-end infinite;
    margin-left: 5px;
}
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.compiler-actions {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border);
    display: flex; gap: 0.75rem; align-items: center;
    background: rgba(255,255,255,0.01);
}
.btn-compile {
    background: linear-gradient(135deg, var(--accent), #00c98a);
    color: #0a0b10; border: none; padding: 0.7rem 1.5rem;
    border-radius: var(--radius); cursor: pointer;
    font-weight: 800; font-size: 0.85rem; font-family: inherit;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; gap: 0.5rem;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-compile::after {
    content: ''; position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}
.btn-compile:hover { 
    transform: translateY(-2px) scale(1.03); 
    box-shadow: 0 10px 25px rgba(0,229,160,0.5), 0 0 10px var(--accent) inset; 
    color: #000;
}
.btn-compile:hover::after { transform: rotate(45deg) translateX(100%); }
.btn-compile:active { transform: translateY(1px) scale(0.98); }

/* ===== MODEL COMPILER AREA ===== */
.model-panel {
    flex: 1; display: flex; flex-direction: column;
    background: var(--bg-main); position: relative;
    overflow-y: auto;
}
.model-header {
    padding: 2rem 2.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.model-header h2 {
    font-size: 1.2rem; font-weight: 800;
    display: flex; align-items: center; gap: 0.5rem;
}
.model-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.4rem; }

.model-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; padding: 2rem 2.5rem;
}
.model-card {
    background: linear-gradient(135deg, var(--bg-card), rgba(22,23,32,0.8));
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.75rem; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative; overflow: hidden;
}
.model-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: all 0.4s ease; opacity: 0;
    box-shadow: 0 5px 15px currentColor;
}
.model-card:hover { 
    border-color: rgba(124,92,252,0.3); 
    transform: translateY(-5px) scale(1.02); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), 0 0 20px rgba(124,92,252,0.1); 
}
.model-card:hover::before { opacity: 1; }
.model-card.dff::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.model-card.txd::before { background: linear-gradient(90deg, var(--accent), #00ffb3); }
.model-card.col::before { background: linear-gradient(90deg, var(--warning), #ffc85c); }

.model-card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 1.25rem; font-size: 1.2rem; font-weight: 800;
}
.model-card.dff .model-card-icon { background: rgba(124,92,252,0.12); color: var(--primary-light); }
.model-card.txd .model-card-icon { background: rgba(0,229,160,0.12); color: var(--accent); }
.model-card.col .model-card-icon { background: rgba(245,166,35,0.12); color: var(--warning); }

.model-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.model-card p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; margin-bottom: 1.25rem; }

.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 1.5rem; text-align: center; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); margin-bottom: 1rem;
    position: relative; overflow: hidden;
}
.upload-zone::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(124,92,252,0.15) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.upload-zone:hover, .upload-zone.dragover { 
    border-color: var(--primary-light); 
    background: rgba(124,92,252,0.05); 
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(124,92,252,0.1);
}
.upload-zone:hover::after, .upload-zone.dragover::after { opacity: 1; }
.upload-zone svg { color: var(--text-muted); margin-bottom: 0.5rem; transition: all 0.3s; }
.upload-zone:hover svg { transform: translateY(-3px) scale(1.1); color: var(--primary-light); }
.upload-zone span { display: block; color: var(--text-muted); font-size: 0.8rem; font-weight: 500; }
.upload-zone .file-name-display { color: var(--accent); font-weight: 600; margin-top: 0.3rem; }

.model-card .btn-compile { width: 100%; justify-content: center; }
.model-card.dff .btn-compile { background: linear-gradient(135deg, var(--primary), #6344e0); color: white; }
.model-card.col .btn-compile { background: linear-gradient(135deg, var(--warning), #e09420); color: #1a1a1a; }

.model-output {
    margin-top: 1rem; border-radius: var(--radius);
    background: rgba(0,0,0,0.3); border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
    color: var(--text-muted); overflow-y: auto;
    display: none; height: 0; padding: 0; opacity: 0;
}
.model-output.visible { display: block; }
.model-output.success { 
    border-color: rgba(0,229,160,0.2); color: var(--accent); 
    animation: reveal-output 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.model-output.error { 
    border-color: rgba(255,107,107,0.2); color: var(--error); 
    animation: reveal-output 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes reveal-output {
    0% { height: 0; opacity: 0; padding: 0; box-shadow: 0 0 0 transparent; }
    100% { height: 80px; opacity: 1; padding: 1rem; box-shadow: 0 0 20px rgba(0,229,160,0.1); }
}

/* ===== TOAST ===== */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(22,23,32,0.95); backdrop-filter: blur(20px);
    border: 1px solid var(--border); padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg); display: flex; flex-direction: column;
    align-items: center; gap: 0.75rem; z-index: 200;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
.toast-content h4 { color: white; font-size: 0.85rem; font-weight: 700; }
.toast-content p { color: var(--text-muted); font-size: 0.82rem; }
.toast button {
    background: rgba(255,255,255,0.06); border: 1px solid var(--border);
    color: white; padding: 0.4rem 1.5rem; border-radius: 8px;
    cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.8rem;
    transition: all var(--transition);
}
.toast button:hover { background: rgba(255,255,255,0.1); }

/* ===== ADMIN MODAL ===== */
.admin-tab {
    background: transparent; border: none; color: var(--text-muted);
    padding: 0.5rem 1rem; font-family: inherit; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.admin-tab.active { color: white; border-bottom-color: var(--primary); }
.admin-tab:hover { color: var(--text-secondary); }

.admin-input {
    flex: 1; padding: 0.7rem 0.85rem; border-radius: 8px;
    border: 1px solid var(--border); background: rgba(255,255,255,0.03);
    color: white; font-family: inherit; font-size: 0.85rem; outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.admin-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(124,92,252,0.1); }

.badge {
    padding: 0.2rem 0.6rem; border-radius: 6px;
    font-size: 0.7rem; font-weight: 700;
    background: rgba(255,255,255,0.06);
}
.badge.success { background: rgba(0,229,160,0.12); color: var(--accent); }
.badge.error { background: rgba(245,166,35,0.12); color: var(--warning); }
.badge.danger { background: rgba(255,107,107,0.12); color: var(--error); }

/* ===== TAB CONTENT PAGES ===== */
.tab-page { display: none; flex: 1; overflow: hidden; }
.tab-page.active { display: flex; }

/* ===== PULSE ANIMATION ===== */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.file-status.processing { animation: pulse 1.5s infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .model-grid { grid-template-columns: 1fr; }
    .sidebar { width: 220px; min-width: 220px; }
}
