/* ═══════════════════════════════════════════════════
   UbiFilter — Global Stylesheet  (Indigo/Violet theme)
   ═══════════════════════════════════════════════════ */

:root {
    /* ── Core palette (Sky Blue theme) ── */
    --color-primary:  #2563EB;   /* blue-600        */
    --color-violet:   #1D4ED8;   /* blue-700        */
    --color-accent:   #3B82F6;   /* blue-500        */
    --color-sky:      #0EA5E9;   /* sky-500         */
    --color-positive: #059669;   /* emerald-600     */
    --color-negative: #DC2626;   /* red-600         */
    --color-warning:  #D97706;   /* amber-600       */
    --color-pink:     #DB2777;   /* pink-600        */
    --color-teal:     #0D9488;   /* teal-600        */
    --color-purple:   #7C3AED;   /* violet-600      */
    --color-cyan:     #06B6D4;   /* cyan-500        */

    /* ── Backgrounds / borders ── */
    --color-bg:       #EAF4FD;   /* light sky tint  */
    --color-card:     #FFFFFF;
    --color-row-alt:  #DCEEFB;   /* sky-100         */
    --color-border:   #BBDEFB;   /* sky-200         */

    /* ── Typography ── */
    --color-text:     #16314F;   /* deep navy       */
    --color-muted:    #5C7A96;   /* slate-blue      */

    /* ── Sidebar (light blue) ── */
    --sidebar-bg1:    #DCEEFB;
    --sidebar-bg2:    #C7E3F9;
    --sidebar-text:   #2C4A6B;   /* navy text       */
    --sidebar-active: #2563EB;   /* blue-600        */
}

/* ── Reset / base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'Inter', 'DM Sans', 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

h1, h2, h3, h4, .card-title {
    color: var(--color-primary);
    font-weight: 700;
}

.smaller, .caption-text {
    font-size: 13px;
    color: var(--color-muted);
}

/* ── Sidebar (dark gradient) ── */
#sidebar-wrapper {
    min-height: 100vh;
    width: 240px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(175deg, var(--sidebar-bg1) 0%, var(--sidebar-bg2) 100%);
    border-right: 1px solid var(--color-border);
    box-shadow: 4px 0 20px rgba(37,99,235,.08);
}

.sidebar-heading {
    border-bottom: 1px solid rgba(22,49,79,.08) !important;
    color: var(--color-text) !important;
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    color: var(--sidebar-text);
    border: none !important;
    transition: background .18s, color .18s;
}

#sidebar-wrapper .list-group-item:hover {
    background: rgba(255,255,255,.6);
    color: var(--color-primary);
}

#sidebar-wrapper .list-group-item i {
    color: var(--sidebar-active);
}

/* Active page in sidebar */
#sidebar-container .active-page,
.list-group-item.active-page {
    background: #FFFFFF !important;
    color: var(--color-primary) !important;
    border-left: 3px solid var(--sidebar-active) !important;
    font-weight: 700 !important;
    border-right: none !important;
    box-shadow: 0 2px 8px rgba(37,99,235,.12);
}

#sidebar-container .active-page i,
.list-group-item.active-page i {
    color: var(--sidebar-active) !important;
}

.sidebar-footer-link {
    color: var(--sidebar-text) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .18s;
}
.sidebar-footer-link:hover { color: var(--color-primary) !important; }
.sidebar-footer-link i { color: var(--sidebar-active); }

/* ── Cards ── */
.card {
    background: var(--color-card);
    border: 1px solid rgba(187,222,251,.6) !important;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(37,99,235,.06);
}

/* Colored top-accent stat cards */
.card-stat-indigo  { border-top: 3px solid var(--color-primary)  !important; }
.card-stat-violet  { border-top: 3px solid var(--color-violet)   !important; }
.card-stat-emerald { border-top: 3px solid var(--color-positive) !important; }
.card-stat-amber   { border-top: 3px solid var(--color-warning)  !important; }

/* ── Sequence textarea ── */
.sequence-area {
    height: 350px !important;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    background: #FDFCFF;
    padding: 15px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 13px;
    color: var(--color-text);
    resize: none;
    transition: border-color .2s, box-shadow .2s;
}
.sequence-area:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    outline: none;
}

/* ── Run button ── */
.btn-run {
    border-radius: 10px;
    border: none;
    font-weight: 700;
    letter-spacing: .02em;
    transition: opacity .2s, transform .1s;
}
.btn-run:active { transform: scale(.98); }

.btn-run-active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-sky) 100%) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.btn-run-active:hover { opacity: .92; }

.btn-run-disabled {
    background: #D1D5DB !important;
    color: #9CA3AF !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Example buttons ── */
.example-btn-p53  { font-size:11px;font-weight:600;padding:4px 11px;border-radius:20px;border:1.5px solid #60A5FA;color:#2563EB;background:#EAF4FD;transition:.15s; }
.example-btn-pcna { font-size:11px;font-weight:600;padding:4px 11px;border-radius:20px;border:1.5px solid #93C5FD;color:#1D4ED8;background:#EFF6FF;transition:.15s; }
.example-btn-ubq  { font-size:11px;font-weight:600;padding:4px 11px;border-radius:20px;border:1.5px solid #F9A8D4;color:#DB2777;background:#FDF2F8;transition:.15s; }
.example-btn-h2b  { font-size:11px;font-weight:600;padding:4px 11px;border-radius:20px;border:1.5px solid #6EE7B7;color:#059669;background:#ECFDF5;transition:.15s; }

.example-btn-p53:hover  { background:#2563EB;color:#fff;border-color:#2563EB; }
.example-btn-pcna:hover { background:#1D4ED8;color:#fff;border-color:#1D4ED8; }
.example-btn-ubq:hover  { background:#DB2777;color:#fff;border-color:#DB2777; }
.example-btn-h2b:hover  { background:#059669;color:#fff;border-color:#059669; }

/* ── Model badge ── */
.model-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #EAF4FD, #FFFFFF);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    width: 100%;
}
.model-badge i { font-size: 18px; color: var(--color-violet); }

/* ── Info / stats box ── */
.info-box {
    background: linear-gradient(135deg, #EAF4FD 0%, #FFFFFF 100%);
    border-left: 4px solid var(--color-primary) !important;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
}

/* ── Range slider ── */
.custom-range::-webkit-slider-runnable-track {
    background: var(--color-border);
    height: 6px;
    border-radius: 3px;
}
.custom-range::-webkit-slider-thumb {
    margin-top: -6px;
    background: white;
    border: 2.5px solid var(--color-primary);
    border-radius: 50%;
    width: 18px;
    height: 18px;
}

/* ── Page content ── */
#page-content-wrapper { background-color: var(--color-bg); width: 100%; }

/* ── Table ── */
.table-numeric {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

/* ── Badges (confidence) ── */
.badge-high   { background:rgba(5,150,105,.12);  color:#059669; border:1px solid rgba(5,150,105,.25);  font-weight:700; font-size:11px; }
.badge-medium { background:rgba(217,119,6,.12);  color:#D97706; border:1px solid rgba(217,119,6,.25);  font-weight:700; font-size:11px; }
.badge-low    { background:rgba(220,38,38,.10);  color:#DC2626; border:1px solid rgba(220,38,38,.2);   font-weight:700; font-size:11px; }

/* ── Heatmap bars ── */
.bar             { width:11px; height:40px; border-radius:2px; flex-shrink:0; background:#DCEEFB; }
.bar.bar-low     { background: #BFDBFE; }
.bar.bar-medium  { background: #60A5FA; }
.bar.bar-high    { background: #2563EB; }
.bar.bar-very-high { background: #1D4ED8; }

/* ── Export buttons ── */
.export-btn {
    background: #fff;
    border: 1.5px solid var(--color-border) !important;
    font-size: 13px;
    color: var(--color-text);
    border-radius: 8px;
    transition: .15s;
}
.export-btn:hover {
    background: var(--color-row-alt);
    color: var(--color-primary);
    border-color: var(--color-primary) !important;
}

/* ── Spinner overlay ── */
.spinner-overlay {
    position: fixed; inset: 0;
    background: rgba(234,244,253,.8);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; flex-direction: column; gap: 16px;
    backdrop-filter: blur(2px);
}
.spinner-overlay p { color: var(--color-primary); font-weight: 600; font-size: 15px; }

/* ── Utilities ── */
.text-indigo  { color: var(--color-primary); }
.text-violet  { color: var(--color-violet); }
.text-teal    { color: var(--color-teal); }
.text-success { color: var(--color-positive); }
.text-danger  { color: var(--color-negative); }
.font-mono    { font-family: 'JetBrains Mono', monospace; font-weight: 500; letter-spacing: -.02em; }

/* ── Gradient headline text ── */
.gradient-text {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 40%, #DB2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Hero title (index.html h1) ── */
.hero-title {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--color-text);
}

/* ── Hoverable card lift ── */
.card-lift {
    transition: box-shadow .2s, transform .18s;
}
.card-lift:hover {
    box-shadow: 0 8px 28px rgba(37, 99, 235, .16) !important;
    transform: translateY(-2px);
}

/* ── Section chip / label tag ── */
.section-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 4px 13px;
    border-radius: 20px;
    background: #EAF4FD;
    color: var(--color-primary);
    border: 1px solid rgba(37, 99, 235, .25);
    margin-bottom: 10px;
}

/* ── Pipeline "how it works" strip ── */
.pipeline-strip {
    background: linear-gradient(90deg, #EAF4FD 0%, #EFF6FF 50%, #ECFDF5 100%);
    border: 1.5px solid #BFDBFE;
    border-radius: 14px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pipeline-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 120px;
}
.pipeline-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}
.pipeline-arrow {
    color: #93C5FD;
    font-size: 17px;
    padding: 0 4px;
    flex-shrink: 0;
}
.pipeline-step-label {
    font-size: 12px;
    font-weight: 700;
}
.pipeline-step-sub {
    font-size: 10.5px;
    color: var(--color-muted);
    margin-top: 1px;
}

/* ── Stat icon circle (results page) ── */
.stat-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin: 0 auto 10px;
}

/* ── API method badges ── */
.badge-method-post {
    background: #ECFDF5; color: #059669;
    border: 1.5px solid #6EE7B7;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 700;
    padding: 3px 11px; border-radius: 6px;
    display: inline-block;
}
.badge-method-get {
    background: #EAF4FD; color: #2563EB;
    border: 1.5px solid #60A5FA;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; font-weight: 700;
    padding: 3px 11px; border-radius: 6px;
    display: inline-block;
}

/* ── Endpoint row (API docs) ── */
.endpoint-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #F8FBFE;
    border: 1.5px solid #BFDBFE;
    border-radius: 9px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.endpoint-path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}
.endpoint-desc {
    font-size: 12px;
    color: var(--color-muted);
    margin-left: auto;
}

/* ── Code block header bar ── */
.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1E2D40;
    border-radius: 10px 10px 0 0;
    padding: 9px 18px;
    font-size: 11.5px;
    color: #93C5FD;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    letter-spacing: .04em;
}
.code-header .code-dots { display: flex; gap: 6px; }
.code-header .code-dot {
    width: 11px; height: 11px; border-radius: 50%;
}
.code-block-body {
    background: #0f172a;
    border-radius: 0 0 10px 10px;
    padding: 20px 22px;
    position: relative;
}
.code-block-body pre {
    margin: 0;
    color: #f1f5f9;
    font-size: 13px;
    line-height: 1.65;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Highlight strip ── */
.highlight-strip {
    background: linear-gradient(90deg, #EAF4FD 0%, #EFF6FF 100%);
    border-left: 4px solid var(--color-primary);
    border-radius: 0 10px 10px 0;
    padding: 13px 18px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--color-text);
    margin-bottom: 12px;
}

/* ── Glossary term label ── */
.glossary-term-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.glossary-term-label::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}

/* ── Confidence color blocks (results table) ── */
.conf-dot-high   { width:8px;height:8px;border-radius:50%;background:#059669;display:inline-block;margin-right:5px; }
.conf-dot-medium { width:8px;height:8px;border-radius:50%;background:#D97706;display:inline-block;margin-right:5px; }
.conf-dot-low    { width:8px;height:8px;border-radius:50%;background:#DC2626;display:inline-block;margin-right:5px; }

/* ── Purple / cyan accent utilities ── */
.text-purple { color: var(--color-purple); }
.text-cyan   { color: var(--color-cyan); }
.bg-purple-soft { background: rgba(124,58,237,.08); }
.bg-cyan-soft   { background: rgba(6,182,212,.08); }
