/* =========================================================================
 * MicroQuant UI Stylesheet
 * Vibrant, glassmorphic dark theme using modern CSS variables
 * =========================================================================
 */

/* Theme Variables */
:root {
    --bg-main: hsl(224, 25%, 5%);
    --bg-sidebar: hsl(224, 25%, 3%);
    --bg-card: rgba(16, 24, 40, 0.65);
    --bg-input: rgba(10, 15, 30, 0.6);
    --border-card: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.2);
    
    --color-primary: hsl(180, 100%, 50%); /* Glowing Cyan */
    --color-primary-glow: rgba(0, 240, 255, 0.35);
    --color-secondary: hsl(150, 100%, 43%); /* Emerald Green */
    --color-secondary-glow: rgba(0, 220, 130, 0.25);
    --color-accent: hsl(280, 100%, 65%); /* Neon Purple */
    --color-danger: hsl(350, 85%, 55%); /* Bright Coral Red */
    
    --text-main: hsl(210, 30%, 96%);
    --text-sub: hsl(215, 20%, 75%);
    --text-muted: hsl(215, 12%, 55%);
    --bg-code: hsl(220, 20%, 6%);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

/* Glowing Background Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.15;
    mix-blend-mode: screen;
}
.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    top: -10%;
    right: -10%;
}
.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
    bottom: -15%;
    left: -10%;
}
.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
    top: 40%;
    left: 40%;
    opacity: 0.08;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    flex-shrink: 0;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
}
.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--bg-main);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}
.logo-area h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, var(--text-sub));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.tagline {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    color: var(--text-sub);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}
.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
    color: var(--color-primary);
    background-color: rgba(0, 240, 255, 0.06);
    border-color: rgba(0, 240, 255, 0.15);
    box-shadow: inset 0 0 10px rgba(0, 240, 255, 0.05);
}
.nav-item .icon {
    font-size: 1.1rem;
}

.system-status {
    border-top: 1px solid var(--border-card);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.status-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-dot.online {
    background-color: var(--color-secondary);
    box-shadow: 0 0 10px var(--color-secondary);
}
.status-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Top Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1.5rem;
}
.top-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.cta-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--text-sub);
}

/* Sections */
.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}
.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
}
.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    margin-bottom: 0.4rem;
}
.section-header p {
    color: var(--text-sub);
    font-size: 1rem;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 1.8rem;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.glass-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-weight: 600;
}
.panel-desc {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

/* Layout Grids */
.section-grid-3 {
    display: grid;
    grid-template-columns: 280px 1fr 340px;
    gap: 1.8rem;
    align-items: stretch;
}
.section-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-sub);
}
input[type="number"], select, textarea, input[type="email"], input[type="text"] {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary-glow);
}
.input-note {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Slider Style */
.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}
input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    height: 6px;
    border-radius: 3px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--color-primary);
    transition: var(--transition-smooth);
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}
#outlier-ratio-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    min-width: 35px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    text-decoration: none;
}
.btn-primary {
    background-color: var(--color-primary);
    color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}
.btn-primary:hover {
    background-color: hsl(180, 100%, 45%);
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.4);
    transform: translateY(-1px);
}
.btn-accent {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    color: var(--bg-main);
    box-shadow: 0 4px 15px rgba(0, 220, 130, 0.2);
}
.btn-accent:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px rgba(0, 220, 130, 0.4);
    transform: translateY(-1px);
}
.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-card);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 6px;
}
.btn-large {
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
}
.btn-full {
    width: 100%;
}
.mt-2 { margin-top: 0.8rem; }
.mt-3 { margin-top: 1.5rem; }

/* Panel Headers */
.panel-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.legend {
    display: flex;
    gap: 0.8rem;
}
.legend-item {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-sub);
}
.color-box {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}
.color-box.outlier {
    background-color: var(--color-secondary);
    border: 1px solid var(--color-secondary-glow);
}
.color-box.int4 {
    background-color: rgba(0, 240, 255, 0.15);
    border: 1px solid var(--color-primary-glow);
}

/* Weight Grid Visualizer */
.weight-map-container {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1rem;
    height: 250px;
    overflow: auto;
    margin-bottom: 1.5rem;
}
.weight-grid {
    display: grid;
    gap: 4px;
}
.weight-cell {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.03);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: crosshair;
    transition: all 0.15s ease;
}
.weight-cell:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff;
    transform: scale(1.1);
    z-index: 10;
}
.weight-cell.is-outlier {
    background: rgba(0, 220, 130, 0.15);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    font-weight: bold;
}
.weight-cell.is-int4 {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.15);
}

/* Bit Packing Widget */
.bit-packing-display {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    padding: 1rem;
}
.bit-packing-display h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    margin-bottom: 0.8rem;
    text-align: center;
}
.packing-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}
.pack-cell-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    text-align: center;
    min-width: 80px;
}
.pack-cell-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.pack-cell-val {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
}
.pack-cell-bits {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-primary);
}
.pack-arrow {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-muted);
}
.packed-result {
    border-color: var(--color-secondary);
    background: rgba(0, 220, 130, 0.05);
}
.packed-result .pack-cell-bits {
    color: var(--color-secondary);
}

/* Code Editor Display */
.code-panel-wrapper {
    display: flex;
    flex-direction: column;
}
.code-editor-container {
    background: var(--bg-code);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 1.2rem;
    flex-grow: 1;
    overflow: auto;
    max-height: 480px;
}
.code-editor-container pre {
    margin: 0;
}
.code-editor-container code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    color: hsl(200, 30%, 80%);
    white-space: pre;
}

/* Table Style */
.benchmark-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.benchmark-table th, .benchmark-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-card);
}
.benchmark-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.01);
}
.benchmark-table td {
    font-size: 0.9rem;
    color: var(--text-sub);
}
.benchmark-table tr:hover {
    background: rgba(255,255,255,0.01);
}
.better {
    color: var(--color-secondary) !important;
    font-weight: 600;
}

/* Alerts */
.alert-box {
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    line-height: 1.4;
}
.alert-note {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    color: var(--text-sub);
}

/* Charts Elements */
.charts-container {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}
.chart-box h5 {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-sub);
    margin-bottom: 0.8rem;
}

/* Vertical Bar Chart */
.bar-chart-v {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.bar-item {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 1rem;
}
.bar-name {
    font-size: 0.8rem;
    color: var(--text-sub);
}
.bar-track {
    background: rgba(255,255,255,0.05);
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}
.bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.fp32 { background: var(--text-muted); }
.bar-fill.tflu { background: var(--color-accent); }
.bar-fill.uquant { background: var(--color-secondary); box-shadow: 0 0 10px var(--color-secondary-glow); }
.bar-val {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    text-align: right;
}

/* Horizontal Bar Chart */
.bar-chart-h {
    display: flex;
    justify-content: space-around;
    height: 180px;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1rem;
}
.bar-item-h {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    justify-content: flex-end;
}
.bar-track-h {
    background: rgba(255,255,255,0.05);
    width: 28px;
    height: 120px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.bar-fill-h {
    width: 100%;
    border-radius: 14px;
    transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill-h.fp32 { background: var(--text-muted); }
.bar-fill-h.tflu { background: var(--color-accent); }
.bar-fill-h.uquant { background: var(--color-primary); box-shadow: 0 0 10px var(--color-primary-glow); }
.bar-val-h {
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* Legal Badges & Lists */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.badge-agpl {
    background: rgba(230, 80, 80, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(230, 80, 80, 0.25);
}
.badge-commercial {
    background: rgba(0, 220, 130, 0.15);
    color: var(--color-secondary);
    border: 1px solid rgba(0, 220, 130, 0.25);
}
.border-agpl:hover {
    border-color: rgba(230, 80, 80, 0.2);
}
.border-commercial:hover {
    border-color: rgba(0, 220, 130, 0.2);
}

.legal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}
.legal-list li {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.4;
    position: relative;
    padding-left: 1.5rem;
}
.legal-list li::before {
    content: "🔸";
    position: absolute;
    left: 0;
    font-size: 0.8rem;
}
.button-group-row {
    display: flex;
    gap: 1rem;
}

/* Funnel Section / Lead Gen */
.funnel-container {
    display: grid;
    grid-template-columns: 4fr 5fr;
    gap: 2rem;
    align-items: stretch;
}
.funnel-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.benefit-item {
    display: flex;
    gap: 1.2rem;
}
.benefit-icon {
    font-size: 1.8rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-card);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.benefit-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.benefit-item p {
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.4;
}

/* Form Styles */
.funnel-form-card {
    position: relative;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}
.consulting-form textarea {
    resize: none;
}

/* Success Overlay */
.form-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 10;
}
.form-success-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.success-icon {
    font-size: 3rem;
    background: rgba(0, 220, 130, 0.15);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--color-secondary);
    box-shadow: 0 0 30px var(--color-secondary-glow);
}
.success-content h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}
.success-content p {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Footer Styling */
.bottom-footer {
    border-top: 1px solid var(--border-card);
    padding-top: 2rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}
.footer-links a:hover {
    color: var(--color-primary);
}

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

/* Responsive Scaling */
@media (max-width: 1200px) {
    .section-grid-3 {
        grid-template-columns: 1fr;
    }
    .funnel-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-card);
        padding: 1.5rem;
    }
    .logo-area {
        margin-bottom: 1.5rem;
    }
    .main-content {
        padding: 1.5rem;
    }
    .section-grid-2 {
        grid-template-columns: 1fr;
    }
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Upload Dropzone Styling */
.upload-area-container {
    margin-bottom: 1.25rem;
}
.upload-dropzone {
    border: 2px dashed var(--border-card);
    background: var(--bg-input);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}
.upload-dropzone:hover {
    border-color: var(--color-primary);
    background: rgba(0, 240, 255, 0.03);
    box-shadow: 0 0 12px var(--color-primary-glow);
}
.upload-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}
.upload-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    display: block;
    margin-bottom: 0.2rem;
}
.upload-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.upload-status {
    background: rgba(0, 220, 130, 0.05);
    border: 1px solid var(--color-secondary-glow);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
}
.status-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.status-size {
    font-size: 0.8rem;
    color: var(--text-sub);
}
.btn-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-clear:hover {
    color: var(--color-danger);
}

/* OR Separator */
.or-separator {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}
.or-separator::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-card);
    z-index: 1;
}
.or-separator span {
    background: var(--bg-sidebar);
    padding: 0 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    position: relative;
    z-index: 2;
}

/* Compile Log Box */
.compile-log-box {
    margin-top: 1.25rem;
    background: var(--bg-code);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    padding: 0.8rem;
    font-family: var(--font-mono);
    max-height: 180px;
    overflow-y: auto;
}
.log-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
}
.log-content {
    font-size: 0.7rem;
    color: var(--color-secondary);
    line-height: 1.4;
    white-space: pre-wrap;
    text-align: left;
}
.log-line {
    margin-bottom: 0.2rem;
}

/* Grid Preview Warning */
.grid-preview-banner {
    background: rgba(240, 150, 0, 0.08);
    border: 1px solid rgba(240, 150, 0, 0.2);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    color: hsl(40, 100%, 70%);
    line-height: 1.3;
    text-align: left;
}

/* Switch Toggle Switch Styles */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}
.switch-container .switch-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-sub);
}
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-input);
    border: 1px solid var(--border-card);
    transition: .3s;
    border-radius: 24px;
}
.slider-switch:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider-switch {
    background-color: var(--color-primary);
}
input:focus + .slider-switch {
    box-shadow: 0 0 8px var(--color-primary-glow);
}
input:checked + .slider-switch:before {
    transform: translateX(20px);
}

/* Benchmark Tabs */
.profile-tabs-container {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-card);
    padding: 0.4rem;
    border-radius: 12px;
    width: max-content;
}
.benchmark-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-sub);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.benchmark-tab-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.03);
}
.benchmark-tab-btn.active {
    color: var(--color-primary);
    background-color: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
}
