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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

.app-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #f1f5f9;
}

.app-header .badge {
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.upload-zone {
    border: 2px dashed #475569;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: #3b82f6;
    background: #1e3a5f;
}

.upload-zone .icon {
    font-size: 40px;
    margin-bottom: 12px;
    color: #64748b;
}

.upload-zone p {
    color: #94a3b8;
    font-size: 14px;
}

.upload-zone .hint {
    color: #64748b;
    font-size: 12px;
    margin-top: 8px;
}

.file-list {
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-item .file-name {
    font-weight: 500;
}

.file-item .file-type {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    background: #334155;
    color: #94a3b8;
}

.file-item .file-type.confident {
    background: #065f46;
    color: #6ee7b7;
}

.file-item .file-type.low {
    background: #78350f;
    color: #fbbf24;
}

.analysis-panel {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.analysis-panel h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #f1f5f9;
}

.analysis-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.analysis-btn {
    padding: 8px 16px;
    border: 1px solid #475569;
    border-radius: 8px;
    background: #0f172a;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.analysis-btn:hover {
    border-color: #3b82f6;
    color: #93c5fd;
}

.analysis-btn.active {
    background: #1d4ed8;
    border-color: #3b82f6;
    color: #fff;
}

.params-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.params-row label {
    font-size: 13px;
    color: #94a3b8;
}

.params-row input, .params-row select {
    padding: 6px 12px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 13px;
}

.params-row input:focus, .params-row select:focus {
    outline: none;
    border-color: #3b82f6;
}

.run-btn {
    padding: 10px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.run-btn:hover {
    background: #1d4ed8;
}

.run-btn:disabled {
    background: #475569;
    cursor: not-allowed;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.loading.active {
    display: block;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.results-section {
    display: none;
    margin-top: 20px;
}

.results-section.active {
    display: block;
}

.result-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #f1f5f9;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid #334155;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #1e293b;
    font-size: 13px;
}

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.05);
}

.viz-container {
    width: 100%;
    min-height: 500px;
    border-radius: 8px;
    overflow: hidden;
}

.gene-functions {
    margin-top: 16px;
}

.gene-functions h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #94a3b8;
}

.gene-func-item {
    padding: 12px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 8px;
}

.gene-func-item .gf-gene {
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 4px;
}

.gene-func-item .gf-summary {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
}

.gene-func-item .gf-source {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.status-badge.success {
    background: #065f46;
    color: #6ee7b7;
}

.status-badge.error {
    background: #7f1d1d;
    color: #fca5a5;
}

.venn-svg {
    width: 100%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
}

.error-message {
    padding: 12px 16px;
    background: #7f1d1d;
    border: 1px solid #991b1b;
    border-radius: 8px;
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #475569;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}
