/* Spectral Protein - Green/Teal Biology Theme */

:root {
    /* Backgrounds */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0d1117;
    --bg-tertiary: #161b22;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1e2530;

    /* Accent colors - Emerald/Teal for biology */
    --accent-primary: #10b981;
    --accent-secondary: #14b8a6;
    --accent-gradient: linear-gradient(135deg, #10b981, #14b8a6);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #c9d1d9;
    --text-muted: #8892b0;

    /* Borders */
    --border-color: #21262d;
    --border-hover: #30363d;

    /* Status colors */
    --status-valid: #22c55e;
    --status-invalid: #ef4444;
    --status-warning: #f59e0b;
    --status-info: #3b82f6;

    /* Violation type colors */
    --violation-bond-length: #ef4444;
    --violation-bond-angle: #eab308;
    --violation-steric-clash: #f97316;
    --violation-hydrogen-bond: #22c55e;
    --violation-secondary: #3b82f6;
    --violation-distance: #8b5cf6;
    --violation-chirality: #ec4899;

    /* Fonts */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===========================================
   LANDING PAGE STYLES
   =========================================== */

.landing-page {
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0d1a14 50%, var(--bg-tertiary) 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.value-props {
    list-style: none;
    max-width: 500px;
    margin: 0 auto 2rem;
    text-align: left;
}

.value-props li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.value-props li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.85rem;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-small:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.btn-demo {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-demo:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Stats Section */
.stats-section {
    padding: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* How It Works */
.how-it-works {
    padding: 3rem 0;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.ascii-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow-x: auto;
}

.ascii-box pre {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    line-height: 1.4;
    margin: 0;
}

/* Features */
.features-section {
    padding: 3rem 0;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.2s;
}

.feature:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.feature-icon {
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Code Section */
.code-section {
    padding: 3rem 0;
}

.code-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.code-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.code-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.code-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.code-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.code-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    overflow-x: auto;
    max-width: 700px;
    margin: 0 auto;
}

.code-box pre {
    margin: 0;
}

.code-box code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.code-box .keyword { color: #c678dd; }
.code-box .string { color: #98c379; }
.code-box .comment { color: #5c6370; }

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ===========================================
   APP PAGE STYLES
   =========================================== */

.app-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* App Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
}

.logo-text {
    color: var(--text-primary);
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-center {
    flex: 1;
    text-align: center;
}

.structure-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* App Main Layout */
.app-main {
    display: grid;
    grid-template-columns: 1fr 440px;
    flex: 1;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .app-main {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 1fr;
    }
}

/* Viewer Panel */
.viewer-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
}

.viewer-container {
    flex: 1;
    position: relative;
    background: #0a0a0f;
}

.viewer-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.viewer-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.viewer-3d {
    position: absolute;
    inset: 0;
}

/* Split View Container */
.viewer-split-container {
    position: absolute;
    inset: 0;
    display: flex;
}

.viewer-split-container.split-active {
    gap: 2px;
}

.viewer-pane {
    position: relative;
    flex: 1;
    min-width: 0;
}

.viewer-pane-left {
    flex: 1;
}

.viewer-pane-right {
    flex: 1;
    border-left: 2px solid var(--border-color);
}

.viewer-split-container:not(.split-active) .viewer-pane-left {
    flex: 1;
}

.viewer-split-container:not(.split-active) .viewer-pane-right {
    display: none;
}

.viewer-pane .viewer-3d,
.viewer-pane .viewer-3d-mutant {
    position: absolute;
    inset: 0;
    top: 24px;
}

.viewer-pane-label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    z-index: 10;
}

.viewer-pane-left .viewer-pane-label {
    color: #3b82f6;
}

.viewer-pane-right .viewer-pane-label {
    color: #f59e0b;
}

.viewer-3d-mutant {
    background: #0a0a0f;
}

/* Mutation Actions */
.mutation-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.btn-compare {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.btn-compare:hover {
    opacity: 0.9;
}

/* Viewer Toolbar */
.viewer-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.toolbar-select {
    padding: 0.3rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toggle-label input {
    accent-color: var(--accent-primary);
}

.toolbar-actions {
    margin-left: auto;
}

/* Analysis Panel */
.analysis-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

/* Ensure panels don't overflow horizontally */
.analysis-panel > * {
    min-width: 0;
    flex-shrink: 0;
}

/* Panel Component */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.panel-controls {
    display: flex;
    gap: 0.5rem;
}

.panel-content {
    padding: 1rem;
}

.panel-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.05);
}

.upload-zone svg {
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Fetch Section */
.fetch-section {
    display: flex;
    gap: 0.5rem;
}

.text-input {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.text-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.text-input::placeholder {
    text-transform: none;
}

/* Example Section */
.example-section {
    margin-top: 1rem;
}

.example-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.example-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Example Categories for Medical Examples */
.example-category {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.example-category:last-child {
    margin-bottom: 0;
}

.category-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
    min-width: 80px;
    opacity: 0.8;
}

.example-category .example-buttons {
    flex: 1;
}

.example-category .btn-demo {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: pulse 2s infinite;
}

.status-indicator.valid .status-dot { background: var(--status-valid); }
.status-indicator.invalid .status-dot { background: var(--status-invalid); }
.status-indicator.warning .status-dot { background: var(--status-warning); }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-weight: 500;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.metric {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    text-align: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Violations List */
.violations-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

/* Custom scrollbar for lists */
.violations-list::-webkit-scrollbar,
.fixes-list::-webkit-scrollbar,
.analysis-panel::-webkit-scrollbar {
    width: 6px;
}

.violations-list::-webkit-scrollbar-track,
.fixes-list::-webkit-scrollbar-track,
.analysis-panel::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.violations-list::-webkit-scrollbar-thumb,
.fixes-list::-webkit-scrollbar-thumb,
.analysis-panel::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

.violations-list::-webkit-scrollbar-thumb:hover,
.fixes-list::-webkit-scrollbar-thumb:hover,
.analysis-panel::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

.violation-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.violation-item:hover {
    border-color: var(--accent-primary);
}

.violation-item.highlighted {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.violation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.violation-type {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.violation-type.bond_length { background: rgba(239, 68, 68, 0.2); color: var(--violation-bond-length); }
.violation-type.bond_angle { background: rgba(234, 179, 8, 0.2); color: var(--violation-bond-angle); }
.violation-type.steric_clash { background: rgba(249, 115, 22, 0.2); color: var(--violation-steric-clash); }
.violation-type.hydrogen_bond { background: rgba(34, 197, 94, 0.2); color: var(--violation-hydrogen-bond); }
.violation-type.secondary_structure { background: rgba(59, 130, 246, 0.2); color: var(--violation-secondary); }

.violation-severity {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.violation-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.violation-explanation {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    border-left: 2px solid var(--border-color);
}

.violation-atoms {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.atom-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* K-RUT Panel */
.krut-section {
    margin-bottom: 1rem;
}

.krut-section:last-child {
    margin-bottom: 0;
}

.krut-section h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.krut-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.krut-row:last-child {
    border-bottom: none;
}

.krut-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.krut-value {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
}

.krut-value.valid { color: var(--status-valid); }
.krut-value.invalid { color: var(--status-invalid); }

/* Fixes List */
.fixes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.fix-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.fix-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.fix-type {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.fix-confidence {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.fix-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Filter Select */
.filter-select {
    padding: 0.3rem 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.75rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-muted);
}

/* Tooltip */
.tooltip {
    position: fixed;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 250px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip.visible {
    opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* ============================================================================
   Clinical Analysis Styles
   ============================================================================ */

/* Clinical Badge */
.clinical-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
}

/* Clinical Disclaimer */
.clinical-disclaimer {
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #f87171;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Clinical Section */
.clinical-section {
    margin-bottom: 1rem;
}

.clinical-section h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Mutation Input Group */
.mutation-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.mutation-input-group .text-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.chain-select {
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
}

/* Mutation Result */
.mutation-result {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.mutation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mutation-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.severity-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.severity-badge.pathogenic {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.severity-badge.likely_pathogenic {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.severity-badge.uncertain {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.severity-badge.likely_benign {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.severity-badge.benign {
    background: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.mutation-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mutation-metric {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mutation-metric .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.mutation-metric .value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.mutation-explanation {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* Perspective Boxes */
.perspective-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.perspective-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.perspective-box.protein-perspective {
    border-left: 3px solid #8b5cf6;
}

.perspective-box.host-perspective {
    border-left: 3px solid #f59e0b;
}

.perspective-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.perspective-icon {
    font-size: 1rem;
}

.perspective-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.perspective-assessment {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.perspective-assessment.assessment-positive {
    color: var(--status-valid);
}

.perspective-assessment.assessment-negative {
    color: var(--status-invalid);
}

.perspective-assessment.assessment-warning {
    color: var(--status-warning);
}

.perspective-assessment.assessment-neutral {
    color: var(--text-secondary);
}

.perspective-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Affected Features List */
.affected-features {
    margin-top: 0.75rem;
}

.affected-features h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-type {
    color: var(--accent-primary);
    font-weight: 500;
}

.feature-severity {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* Clinical Accordion */
.clinical-accordion {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.clinical-accordion summary {
    padding: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    list-style: none;
}

.clinical-accordion summary::-webkit-details-marker {
    display: none;
}

.clinical-accordion summary:hover {
    color: var(--text-secondary);
}

.clinical-accordion[open] summary {
    border-bottom: 1px solid var(--border-color);
}

/* Batch Input */
.batch-input-group {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.batch-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    resize: vertical;
}

.batch-results {
    padding: 0 0.75rem 0.75rem;
}

.batch-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.batch-result-item:last-child {
    margin-bottom: 0;
}

/* Misfolding Risk Styles */
.risk-overview {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.risk-gauge {
    text-align: center;
    min-width: 80px;
}

.risk-score {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.risk-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0.25rem;
}

.risk-label.low { color: #22c55e; }
.risk-label.moderate { color: #eab308; }
.risk-label.high { color: #f97316; }
.risk-label.very_high { color: #ef4444; }

.risk-metrics {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.risk-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.risk-metric .metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 100px;
}

.metric-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.risk-metric .metric-value {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    min-width: 40px;
    text-align: right;
}

/* Aggregation Regions */
.aggregation-regions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.aggregation-regions h4 {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.aggregation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.aggregation-residues {
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.aggregation-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
    border-radius: var(--radius-sm);
}

/* Clinical Report */
.report-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.report-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem;
}

.report-section {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.report-section:last-child {
    border-bottom: none;
}

.report-section h4 {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Button small variant */
.btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
}

/* ===========================================
   INTERFACE ATTENUATOR
   =========================================== */

.attenuator-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.attenuator-config {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.config-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-row label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 100px;
}

.attenuator-config .btn-primary {
    margin-top: 0.5rem;
}

/* Attenuator Stats */
.attenuator-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.attenuator-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.attenuator-stats .stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.attenuator-stats .stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Attenuator Candidates */
.attenuator-candidates {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.attenuator-candidate {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.attenuator-candidate:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.candidate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.candidate-mutation {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

.candidate-score {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.candidate-mechanisms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.mechanism-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: var(--radius-sm);
    text-transform: lowercase;
}

.candidate-explanation {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}
