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

/* =====================================================
   T-GUIDE DESIGN SYSTEM
   Professional Bioinformatics Tool - Flat Design
   ===================================================== */

:root {
    /* Primary Palette - Modern Teal */
    --primary: #0d9488;
    /* Teal 600 - Main brand color */
    --primary-dark: #0f766e;
    /* Teal 700 - Hover states */
    --primary-light: #5eead4;
    /* Teal 300 - Accents */

    /* Secondary - Deep Navy */
    --secondary: #1e3a5f;
    /* Navy - Headers, contrast */
    --secondary-dark: #0f172a;
    /* Slate 900 - Strong text */

    /* Semantic Colors - Flat */
    --success: #059669;
    /* Emerald 600 */
    --warning: #d97706;
    /* Amber 600 */
    --danger: #dc2626;
    /* Red 600 */
    --info: #0284c7;
    /* Sky 600 */

    /* Genomic Feature Colors */
    --cds-color: #0f766e;
    /* Teal - Coding sequences */
    --utr-color: #64748b;
    /* Slate - UTR regions */
    --intron-color: #94a3b8;
    /* Slate 400 - Introns */
    --forward-strand: #2563eb;
    /* Blue 600 */
    --reverse-strand: #db2777;
    /* Pink 600 */
    --pam-color: #dc2626;
    /* Red - PAM highlight */

    /* Backgrounds */
    --bg-body: #f8fafc;
    /* Slate 50 - Page background */
    --bg-card: #ffffff;
    /* White - Cards */
    --bg-section: #f1f5f9;
    /* Slate 100 - Section backgrounds */
    --bg-hover: #e2e8f0;
    /* Slate 200 - Hover states */
    --bg-browser: #0f172a;
    /* Dark - Genome browser */

    /* Text */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #94a3b8;
    /* Slate 400 */
    --text-inverse: #ffffff;

    /* Borders */
    --border-light: #e2e8f0;
    /* Slate 200 */
    --border-medium: #cbd5e1;
    /* Slate 300 */
    --border-focus: #0d9488;
    /* Primary */

    /* Shadows - Minimal */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);

    /* Spacing Scale - Compact */
    --space-1: 0.25rem;
    /* 4px */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-5: 1.25rem;
    /* 20px */
    --space-6: 1.5rem;
    /* 24px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
}

/* =====================================================
   RESET & BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    /* Modern mesh gradient background */
    background:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 0%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: 56px;
    /* Navbar height */
    -webkit-font-smoothing: antialiased;
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
    max-width: 100%;
    padding: 0 var(--space-4);
    margin: 0 auto;
}

/* =====================================================
   HERO HEADER - Modern & Attractive
   ===================================================== */
.hero-header {
    text-align: center;
    padding: var(--space-5) 0 var(--space-4);
    margin-bottom: var(--space-4);
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.hero-logo-img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
    transition: transform var(--transition-fast);
}

.hero-logo-img:hover {
    transform: scale(1.05);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.03em;
}

.hero-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* =====================================================
   TWO-COLUMN INPUT LAYOUT (CRISPOR-inspired)
   ===================================================== */
.input-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-5);
}

@media (max-width: 900px) {
    .input-container {
        grid-template-columns: 1fr;
    }
}

.input-column {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

/* columns use clean styling from .input-column */

/* Section Headers */
.section-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-light);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin: 0 0 var(--space-1) 0;
}

.section-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Input Type Toggle (Radio buttons) */
.input-toggle {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.toggle-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.toggle-option span {
    font-weight: 500;
}

/* Input Areas */
.input-area {
    margin-bottom: var(--space-2);
}

/* Large Gene Input */
.gene-input-large {
    width: 100%;
    padding: var(--space-4) var(--space-4);
    font-size: 1.25rem;
    font-family: 'Courier New', monospace;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: white;
    transition: all var(--transition-fast);
}

.gene-input-large:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.gene-input-large::placeholder {
    color: var(--text-muted);
}

/* Gene Input Wrapper for Autocomplete */
.gene-input-wrapper {
    position: relative;
    width: 100%;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 2px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 1000;
}

.autocomplete-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

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

.autocomplete-item:hover {
    background: var(--bg-section);
}

.autocomplete-item .gene-symbol {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-family: 'JetBrains Mono', monospace;
}

.autocomplete-item .gene-id {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.autocomplete-item .gene-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.autocomplete-loading {
    padding: var(--space-3) var(--space-4);
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
}

/* Gene Input Help Row */
.gene-input-help {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-2);
    font-size: 0.85rem;
}

.help-icon {
    cursor: help;
    color: var(--text-muted);
}

.browse-genes-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.browse-genes-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Large Sequence Textarea */
.sequence-textarea-large {
    width: 100%;
    min-height: 200px;
    padding: var(--space-3);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: white;
    resize: vertical;
    transition: all var(--transition-fast);
    line-height: 1.5;
}

.sequence-textarea-large:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.sequence-textarea-large::placeholder {
    color: var(--text-muted);
}

/* NCBI Fetch Row */
.ncbi-fetch-row {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.ncbi-fetch-row .gene-input-large {
    flex: 1;
}

.fetch-btn {
    padding: 0 var(--space-5);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-width: 100px;
}

.fetch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.ncbi-status {
    font-size: 0.875rem;
    margin-bottom: var(--space-2);
    min-height: 1.5em;
}

.error-text {
    color: #dc2626;
}

.success-text {
    color: #16a34a;
}

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

.loader-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Setting Blocks */
.setting-block {
    margin-bottom: var(--space-4);
}

.setting-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-dark);
    margin-bottom: var(--space-2);
}

.setting-select {
    width: 100%;
    padding: var(--space-3);
    font-size: 0.9375rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.setting-select:hover {
    border-color: var(--primary);
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.setting-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-style: italic;
}

/* Submit Button - Orange like CRISPOR */
.submit-btn {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
    margin-top: var(--space-3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Legacy header styles */
header {
    text-align: center;
    padding: var(--space-4) 0 var(--space-3);
    margin-bottom: var(--space-3);
}

.main-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.header-logo {
    height: 60px;
    /* Adjust based on logo proportions */
    width: auto;
}

h1 {
    font-size: 2.5rem;
    /* Prominent title */
    font-weight: 800;
    color: #000000;
    /* Pure black */
    margin: 0;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.1rem;
    color: #000000;
    /* Solid black */
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
}

/* =====================================================
   SEARCH SECTION - Compact
   ===================================================== */
.search-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    max-width: 1400px;
    margin: 0 auto var(--space-4);
    box-shadow: var(--shadow-xs);
}

/* Mode Toggle - Tab Style */
.mode-toggle {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: var(--space-2);
}

.mode-btn {
    padding: var(--space-1) 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    transition: color var(--transition-fast);
}

.mode-btn:hover {
    color: var(--text-secondary);
}

.mode-btn.active {
    color: var(--primary);
    font-weight: 600;
}

.mode-btn.active::after {
    content: '';
    position: absolute;
    bottom: calc(-1 * var(--space-2) - 1px);
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* Settings Row - Professional Bioinformatics Layout */
.settings-row {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
    min-width: 200px;
}

.setting-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--secondary-dark);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-label::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
}

/* Input Tabs - Cleaner Design */
.input-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 6px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.input-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.input-tab:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

.input-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

/* Input Section */
.input-section {
    margin-bottom: var(--space-4);
}

/* Large Gene Input - Professional */
.gene-input {
    width: 100%;
    padding: var(--space-4);
    font-size: 1.125rem;
    font-family: 'Courier New', monospace;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: white;
    transition: all var(--transition-fast);
}

.gene-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.gene-input::placeholder {
    color: var(--text-muted);
}

/* Large Primary Button */
.btn-primary-large {
    width: 100%;
    padding: var(--space-4);
    font-size: 1.0625rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    margin-top: var(--space-2);
}

.btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.btn-primary-large:active {
    transform: translateY(0);
}

/* Professional Sequence Textarea */
.sequence-textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--space-3);
    font-size: 0.9375rem;
    font-family: 'Courier New', monospace;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    resize: vertical;
    transition: all var(--transition-fast);
}

.sequence-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.sequence-textarea::placeholder {
    color: var(--text-muted);
}

/* Sequence Stats */
.sequence-stats {
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: var(--space-2) 0;
    font-family: 'Courier New', monospace;
}

/* Input Group - Horizontal */
.input-group {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}

/* Professional Dropdown Selects */
.protein-select {
    padding: 0 var(--space-4);
    height: 44px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    background-color: white;
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.protein-select:hover {
    border-color: var(--primary);
}

.protein-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Legacy gene input style */
#geneInput {
    flex: 1;
    min-width: 200px;
    padding: 0 var(--space-3);
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

#geneInput::placeholder {
    color: var(--text-light);
}

#geneInput:focus {
    outline: none;
    border-color: var(--border-focus);
}

/* Large Search Buttons */
#searchBtn,
#searchBtnSeq {
    height: 52px;
    padding: 0 var(--space-6);
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

#searchBtn:hover,
#searchBtnSeq:hover {
    background: var(--primary-dark);
}

#searchBtn:active,
#searchBtnSeq:active {
    transform: translateY(1px);
}

.error-message {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: #fef2f2;
    border-radius: var(--radius-sm);
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* =====================================================
   SEQUENCE INPUT MODE
   ===================================================== */
.sequence-input-container {
    margin: var(--space-3) 0;
}

.sequence-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.sequence-textarea {
    width: 100%;
    min-height: 120px;
    padding: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-primary);
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.sequence-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
}

.sequence-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-2);
    font-family: 'JetBrains Mono', monospace;
}

/* =====================================================
   RESULTS SECTION
   ===================================================== */
.results-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Results Header - Compact */
.results-header {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.gene-info h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.gene-info p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: var(--space-1) 0 0;
}

.stats {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-1);
}

.stat {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.stat strong {
    color: var(--text-muted);
    font-weight: 500;
}

.guide-count {
    text-align: right;
    flex-shrink: 0;
}

.count-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.count-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-1);
}

/* --- GENOME BROWSER SECTION --- */
#browserSection,
.genome-browser-section {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 100px;
    /* Buffer for sticky navbar */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
    padding: 0;
    background: transparent;
    border: none;
}

.section-header.collapsible {
    cursor: pointer;
}

.section-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.quick-actions {
    display: flex;
    gap: var(--space-2);
}

.quick-btn {
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}


.browser-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
}

.browser-control-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.browser-control-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.browser-control-group select {
    height: 28px;
    padding: 0 var(--space-2);
    font-size: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}

#zoomDisplay {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.genome-browser-svg-container {
    background: var(--bg-browser);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

#genomeBrowser {
    display: block;
    background: var(--bg-browser);
}

.svg-tooltip {
    position: absolute;
    background: var(--secondary-dark);
    color: var(--text-inverse);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 100;
    max-width: 300px;
    box-shadow: var(--shadow-md);
}

.browser-legend {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    padding: var(--space-2) 0;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.legend-box {
    display: inline-block;
    border-radius: 2px;
}

/* =====================================================
   GUIDES SECTION
   ===================================================== */
.guides-section {
    background: var(--bg-card);
}

.guides-section .section-header {
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
}

.view-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.analyze-all-btn {
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-inverse);
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.analyze-all-btn:hover {
    background: var(--primary-dark);
}

.progress-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.view-btn {
    padding: var(--space-1) var(--space-2);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.view-btn.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}

/* Filter Toolbar */
.filter-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group input[type="text"] {
    height: 30px;
    padding: 0 var(--space-2);
    font-size: 0.8125rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    min-width: 200px;
    background: var(--bg-card);
}

.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--border-focus);
}

.filter-group select {
    height: 30px;
    padding: 0 var(--space-2);
    font-size: 0.8125rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
}

.filter-clear-btn {
    height: 30px;
    padding: 0 var(--space-3);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-clear-btn:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* =====================================================
   DATA TABLE - Compact & Dense
   ===================================================== */
.table-container {
    overflow-x: auto;
}

.guides-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.guides-table th {
    position: sticky;
    top: 0;
    background: var(--bg-section);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-medium);
    white-space: nowrap;
    z-index: 10;
}

.guides-table th.mm-header {
    text-align: center;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.guides-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.guides-table tbody tr {
    transition: background-color var(--transition-fast);
}

.guides-table tbody tr:nth-child(even) {
    background: var(--bg-section);
}

.guides-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Selected Row - When clicking on a guide in the genome browser */
.guides-table tbody tr.selected-row {
    background: #eef2ff !important;
    box-shadow: inset 3px 0 0 var(--primary);
}

.guides-table tbody tr.selected-row:hover {
    background: #e0e7ff !important;
}

/* Sequence Cell */
.sequence-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

.sequence-pam {
    background: #fef2f2;
    color: var(--pam-color);
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
}

/* Position Cell */
.position-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Mismatch Cell */
.mm-cell {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

/* Badges */
.strand-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.strand-badge.forward,
.strand-plus {
    background: #eff6ff;
    color: var(--forward-strand);
}

.strand-badge.reverse,
.strand-minus {
    background: #fdf2f8;
    color: var(--reverse-strand);
}

.gc-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: var(--bg-section);
    color: var(--text-secondary);
}

.gc-optimal {
    background: #ecfdf5;
    color: var(--success);
}

.location-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.location-exon,
.location-cds {
    background: #ecfdf5;
    color: var(--success);
}

.location-intron {
    background: var(--bg-section);
    color: var(--text-muted);
}

/* Action Buttons */
.action-btn {
    padding: 4px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-section);
    color: var(--text-primary);
}

.action-btn.primary {
    color: var(--primary);
    border-color: var(--primary);
}

.action-btn.primary:hover {
    background: var(--primary);
    color: var(--text-inverse);
}

/* =====================================================
   CARD VIEW
   ===================================================== */
.guides-list {
    padding: var(--space-3);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-3);
}

.guide-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    transition: all var(--transition-fast);
}

.guide-card:hover {
    border-color: var(--border-medium);
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   PAGINATION - Compact
   ===================================================== */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pagination-info select {
    height: 26px;
    padding: 0 var(--space-2);
    font-size: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.pagination-buttons button {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-buttons button:hover {
    background: var(--bg-section);
    color: var(--text-primary);
}

.pagination-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0 var(--space-2);
}

/* =====================================================
   MODAL
   ===================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-4);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-section);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
}

.modal-info {
    margin-bottom: var(--space-4);
}

.modal-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.modal-info code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    background: var(--bg-section);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.offtarget-table-container {
    overflow-x: auto;
}

.offtarget-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.offtarget-table th {
    background: var(--bg-section);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-medium);
}

.offtarget-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.modal-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
}

.btn-secondary {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-section);
}

/* =====================================================
   LOADER
   ===================================================== */
.loader {
    width: 14px;
    height: 14px;
    border: 2px solid var(--text-inverse);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }

    .container {
        padding: 0 var(--space-3);
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .protein-select,
    #geneInput {
        width: 100%;
        min-width: auto;
    }

    #searchBtn,
    #searchBtnSeq {
        width: 100%;
        justify-content: center;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
    }

    .guide-count {
        text-align: center;
    }

    .filter-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group input[type="text"] {
        min-width: auto;
        width: 100%;
    }
}

/* =====================================================
   MODAL - Off-Target Details
   ===================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-4);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 950px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-section);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-4);
}

.modal-info {
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
}

.modal-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.modal-info p:last-child {
    margin-bottom: 0;
}

.modal-info code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem;
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--primary);
}

.offtarget-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.offtarget-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.offtarget-table th {
    background: var(--bg-section);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-medium);
    position: sticky;
    top: 0;
}

.offtarget-table td {
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-light);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.offtarget-table tbody tr:nth-child(even) {
    background: var(--bg-section);
}

.offtarget-table tbody tr:hover {
    background: var(--bg-hover);
}

.modal-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    background: var(--bg-section);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.btn-secondary {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-medium);
}

/* =====================================================
   SELECTED GUIDE CARD
   ===================================================== */
.guide-card.selected {
    border-color: var(--primary);
    background: #eef2ff;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* =====================================================
   BROWSER LEGEND
   ===================================================== */
.browser-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-section);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.legend-box {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    display: inline-block;
}

/* Footer Institute Logos - Round */
.institute-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

/* =====================================================
   TEAM PAGE - Integrated Styles
   ===================================================== */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    padding: var(--space-4) 0;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 600px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1000px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.team-member {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.member-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto var(--space-4);
    overflow: hidden;
    border: 3px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    background: var(--bg-section);
}

.member-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    font-family: 'Inter', sans-serif;
}

.member-role {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

/* =====================================================
   DOCUMENTATION PAGE - Integrated Styles
   ===================================================== */
.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-5);
    align-items: start;
}

@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
}

.docs-nav {
    position: sticky;
    top: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    box-shadow: var(--shadow-sm);
}

.docs-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-link {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.docs-link:hover {
    background: var(--bg-section);
    color: var(--text-primary);
}

.docs-link.active {
    background: var(--bg-section);
    color: var(--primary);
    font-weight: 600;
}

.docs-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.docs-section {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--border-light);
}

.docs-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    position: relative;
    padding-left: var(--space-3);
}

.docs-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.docs-section p {
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.7;
}

.docs-section ul {
    padding-left: var(--space-4);
    margin-bottom: var(--space-3);
}

.docs-section li {
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.step-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-4);
}

.step {
    display: flex;
    gap: var(--space-3);
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.step-content h3 {
    margin: 0 0 var(--space-1);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   CONTACT PAGE - Integrated Styles
   ===================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-5);
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.info-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary);
}

.info-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-section);
    border-radius: 50%;
}

.info-content h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.info-content a {
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.info-content a:hover {
    text-decoration: underline;
}

.contact-form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--space-3);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
/* =====================================================
   GENE BROWSER STYLES
   ===================================================== */

.gene-browser-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
}

/* Search Controls */
.search-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    background: var(--bg-section);
    padding: var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.search-row {
    display: flex;
    gap: var(--space-4);
    align-items: flex-end;
}

.search-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.search-field label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-input-field {
    flex: 2;
}

.gene-input-large {
    padding: var(--space-3);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
}

.gene-input-large:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.search-btn {
    height: 46px;
    padding: 0 var(--space-6);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.search-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Results Table */
.results-table-section {
    margin-top: var(--space-6);
}

.results-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--border-light);
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.gene-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.gene-table th,
.gene-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.gene-table th {
    background: var(--bg-section);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.gene-table tr:hover {
    background: var(--bg-hover);
}

.symbol-cell {
    font-weight: 700;
    color: var(--primary-dark);
}

.id-cell {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.type-badge {
    background: var(--bg-section);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    text-transform: capitalize;
}

.use-gene-btn {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.use-gene-btn:hover {
    background: var(--primary);
    color: white;
}

/* States */
.initial-state,
.loading-state,
.no-results {
    text-align: center;
    padding: var(--space-6) 0;
    color: var(--text-muted);
}

.initial-icon,
.no-results-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

.loader-large {
    border: 4px solid var(--bg-section);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

.example-searches {
    margin-top: var(--space-5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.example-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.example-btn {
    background: white;
    border: 1px solid var(--border-medium);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-section);
}

/* Download Section */
.gene-download-section {
    margin-top: var(--space-6);
}

.section-label {
    margin: var(--space-6) 0 var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-light);
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

.download-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.download-card h4 {
    margin: 0 0 var(--space-1);
    color: var(--text-primary);
    font-size: 1rem;
}

.download-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--space-3);
}

.download-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    background: var(--bg-section);
    color: var(--text-secondary);
    padding: 6px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.download-btn:hover {
    background: var(--primary);
    color: white;
}

.sample-genes {
    margin-top: var(--space-2);
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gene-table {
        min-width: 600px; /* Force scroll on mobile */
    }
}
