:root {
    --primary: #382c84;
    --primary-light: #4a3ca0;
    --secondary: #2e2370;
    --accent: #4cc9f0;
    --success: #4ade80;
    --danger: #f87171;
    --warning: #facc15;
    --info: #60a5fa;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

/* Bootstrap Override - Navbar */
.navbar.bg-primary,
.navbar-dark.bg-primary {
    background-color: var(--primary) !important;
}

.navbar-brand {
    color: white !important;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 24px !important;
    width: auto;
    max-width: 24px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
}

/* Custom Navbar Icon */
.navbar-icon {
    height: 24px;
    width: 24px;
    filter: brightness(0) invert(1);
}

/* Bootstrap Override - Buttons */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

/* Bootstrap Override - Text Colors */
.text-primary {
    color: var(--primary) !important;
}

/* Bootstrap Override - Background Colors */
.bg-primary {
    background-color: var(--primary) !important;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--bg-color);
    color: var(--dark);
    line-height: 1.6;
}

/* Header Styles */
.page-header {
    background-color: var(--light);
    padding: 16px 24px;
    border-left: 0px solid var(--primary);
    margin-bottom: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.page-header h1 {
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--primary);
}

.page-header-logo {
    height: 60px;
    max-width: 100%;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.page-header p {
    color: var(--gray);
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.section-header h2 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0.3;
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: none;
    transition: var(--transition);
    margin-bottom: 24px;
}

.card-header {
    background-color: var(--light);
    border-bottom: none;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--dark);
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--primary-light);
    color: white;
    font-weight: 500;
    border: none;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    position: relative;
    background-clip: padding-box;
    border-radius: var(--border-radius);
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length, 
.dataTables_wrapper .dataTables_filter, 
.dataTables_wrapper .dataTables_info, 
.dataTables_wrapper .dataTables_processing, 
.dataTables_wrapper .dataTables_paginate {
    color: var(--dark);
    margin-bottom: 10px;
}

/* DataTables Top Controls Alignment */
.dataTables_wrapper .dataTables_length {
    float: left;
    margin-bottom: 15px !important;
}

.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
    margin-bottom: 15px !important;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 8px;
    display: inline-block;
    width: auto;
}

.dataTables_wrapper .row:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.dataTables_wrapper .row:first-child .col-sm-12.col-md-6 {
    display: flex;
    align-items: center;
}

.dataTables_wrapper .row:first-child .col-sm-12.col-md-6:first-child {
    justify-content: flex-start;
}

.dataTables_wrapper .row:first-child .col-sm-12.col-md-6:last-child {
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current, 
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary) !important;
    color: white !important;
    border: 1px solid var(--primary) !important;
    border-radius: 30px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-light) !important;
    color: white !important;
    border: 1px solid var(--primary-light) !important;
    border-radius: 30px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 30px;
    transition: var(--transition);
}

/* Bootstrap Pagination Override */
.paginate_button.page-item.active .page-link,
.page-item.active .page-link {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}

.paginate_button.page-item.active .page-link:hover,
.page-item.active .page-link:hover {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: white !important;
}

.page-link {
    color: var(--primary) !important;
}

.page-link:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
    color: white !important;
}

/* Filter Controls */
.filter-controls-container {
    background-color: var(--light);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--dark);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
    margin-left: auto;
}

.repeat-filter-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.repeat-count-input {
    width: 70px;
    text-align: center;
    border-radius: var(--border-radius);
    margin-left: auto;
}

.form-check-label {
    font-size: 0.85rem;
}

/* Exon Legend Items */
.exon-legend-item {
    margin-bottom: 8px;
    padding: 4px 0;
    font-size: 0.9rem;
}

.exon-legend-item ul {
    margin-left: 16px;
    padding-left: 8px;
}

.exon-legend-item ul li {
    margin-bottom: 2px;
}

/* UI Components */
.badge {
    padding: 6px 10px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.75rem;
}

.action-button {
    font-size: 0.875rem;
    padding: 6px 12px;
    text-decoration: none;
    color: var(--primary);
    background-color: rgba(96, 108, 180, 0.1);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.action-button:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Loading Indicator */
#loading {
    padding: 40px;
    text-align: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25rem;
    color: var(--primary);
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 24px 0;
    text-align: center;
    color: var(--gray);
    font-size: 0.875rem;
}

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

.table-container {
    animation: fadeIn 0.5s ease-out;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 40%, var(--accent) 100%);
    padding: 75px 0 75px;
    margin-bottom: 40px;
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-logo-container {
    margin-bottom: 30px;
    animation: fadeInDown 0.5s ease-out;
}

.hero-logo {
    height: 175px;
    max-width: 250px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

.hero-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 180px;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .dataTables_wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dataTables_length, .dt-buttons, .dataTables_filter {
        margin-bottom: 10px !important;
        margin-right: 0;
        width: 100%;
    }
    
    .dataTables_filter {
        text-align: left !important;
    }
    
    .dataTables_filter input {
        width: 100%;
    }
    
    .hero-section {
        padding: 60px 0 80px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-logo {
        height: 75px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-logo {
        height: 65px;
    }
}
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-logo {
        height: 65px;
    }
}
