/* ==========================================================================
   Details Page Styles - Editorial Scientific Aesthetic
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout Container
   -------------------------------------------------------------------------- */
.details-page {
    min-height: 100vh;
    background: #faf8f5;
    padding-top: 72px;
}

.details-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Sidebar Navigation
   -------------------------------------------------------------------------- */
.sidebar {
    position: fixed;
    left: 0;
    top: 72px;
    width: 260px;
    height: calc(100vh - 72px);
    background: #ffffff;
    border-right: 1px solid #e5e0d8;
    padding: 2rem 0;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(26, 35, 50, 0.04);
}

.sidebar__title {
    padding: 0 1.5rem 1.5rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a2332;
    border-bottom: 1px solid #e5e0d8;
    margin-bottom: 1rem;
}

.sidebar__nav {
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a6473;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.nav-item:hover {
    color: #e8927c;
    background: #faf8f5;
}

.nav-item.active {
    color: #e8927c;
    background: rgba(232, 146, 124, 0.08);
    border-left-color: #e8927c;
    font-weight: 600;
}

.nav-item__icon {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    opacity: 0.7;
}

.nav-item--highlight {
    background: linear-gradient(90deg, rgba(232, 146, 124, 0.12) 0%, rgba(232, 146, 124, 0.04) 100%);
    border-left-color: #e8927c;
    font-weight: 600;
}

.nav-badge {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: #e8927c;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Main Content Area
   -------------------------------------------------------------------------- */
.details-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 3rem 4rem 4rem;
    max-width: calc(100% - 260px);
}

/* --------------------------------------------------------------------------
   Section Cards
   -------------------------------------------------------------------------- */
.section-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.section-card:hover {
    box-shadow: 0 8px 24px rgba(26, 35, 50, 0.12);
}

.section-card__header {
    background: #1a2332;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-card__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
}

.section-card__body {
    padding: 2rem;
}

/* --------------------------------------------------------------------------
   General Information Section
   -------------------------------------------------------------------------- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.info-column {
    min-width: 0;
}

.info-section {
    margin-bottom: 2rem;
}

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

.info-section__title {
    display: flex;
    align-items: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8927c;
}

.info-section__title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e0d8;
    margin-left: 1rem;
}

.info-row {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-row__label {
    flex-shrink: 0;
    width: 100px;
    font-weight: 600;
    color: #5a6473;
}

.info-row__value {
    color: #1a2332;
    word-break: break-word;
}

.info-row__value--mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Experiment Information - Scrollable */
.experiment-info {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 1rem;
}

.experiment-info::-webkit-scrollbar {
    width: 6px;
}

.experiment-info::-webkit-scrollbar-track {
    background: #f5f2ed;
    border-radius: 3px;
}

.experiment-info::-webkit-scrollbar-thumb {
    background: #d1c9bd;
    border-radius: 3px;
}

.experiment-info::-webkit-scrollbar-thumb:hover {
    background: #b8afa0;
}

.info-block {
    margin-bottom: 1.5rem;
}

.info-block__label {
    font-weight: 600;
    color: #5a6473;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.info-block__text {
    color: #1a2332;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Cell Clustering Section
   -------------------------------------------------------------------------- */
.cluster-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    background: #faf8f5;
    border-radius: 12px;
    overflow: hidden;
}

.cluster-container iframe {
    width: 100%;
    height: 800px;
    border: none;
}

/* --------------------------------------------------------------------------
   Enhanced Panel Headers
   -------------------------------------------------------------------------- */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.header-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.panel-body {
    padding: 2.5rem;
}

/* --------------------------------------------------------------------------
   DEG Results Section - Refined
   -------------------------------------------------------------------------- */
.deg-controls {
    margin-bottom: 2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.filter-card {
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.filter-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.875rem;
}

.filter-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5a6473;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.filter-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: #e8927c;
    font-weight: 600;
    min-width: 48px;
    text-align: right;
}

.filter-hint {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: #8b95a5;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Elegant Range Slider */
.elegant-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #e5e0d8 0%, #d1c9bd 100%);
    border-radius: 3px;
    outline: none;
    position: relative;
    transition: background 0.3s ease;
}

.elegant-slider:hover {
    background: linear-gradient(90deg, #d1c9bd 0%, #c4b8a6 100%);
}

.elegant-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #e8927c 0%, #d4755d 100%);
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(232, 146, 124, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.elegant-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(232, 146, 124, 0.5);
}

.elegant-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(232, 146, 124, 0.6);
}

.elegant-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #e8927c 0%, #d4755d 100%);
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(232, 146, 124, 0.4);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.elegant-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(232, 146, 124, 0.5);
}

/* Elegant Select Dropdown */
.elegant-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #1a2332;
    background: #ffffff;
    border: 2px solid #e5e0d8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235a6473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.elegant-select:hover {
    border-color: #d4a574;
}

.elegant-select:focus {
    outline: none;
    border-color: #e8927c;
    box-shadow: 0 0 0 4px rgba(232, 146, 124, 0.15);
}

/* Export Button - Header Style */
.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
}

.export-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.export-icon {
    width: 16px;
    height: 16px;
}

/* Table Wrapper */
.table-wrapper {
    background: #ffffff;
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
}

/* Elegant Table */
.elegant-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
}

.elegant-table thead {
    background: linear-gradient(135deg, #1a2332 0%, #2a3442 100%);
}

.elegant-table th {
    padding: 1.125rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.95);
    border-bottom: 2px solid #e8927c;
}

.elegant-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f5f2ed;
    color: #5a6473;
    font-size: 0.9rem;
}

.elegant-table tbody tr {
    transition: all 0.2s ease;
    position: relative;
}

.elegant-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(232, 146, 124, 0.04) 0%, transparent 100%);
}

.elegant-table tbody tr:hover td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e8927c;
}

.elegant-table tbody tr:last-child td {
    border-bottom: none;
}

/* DataTables Override - Refined */
.dataTables_wrapper {
    font-family: 'Montserrat', sans-serif;
    padding: 1.5rem;
    background: #ffffff;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 0 0 1.25rem 0;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 1.25rem 0 0 0;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem;
    color: #8b95a5;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0 0.5rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid #e5e0d8;
    border-radius: 6px;
    background: #ffffff;
    color: #1a2332;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 2px solid #e5e0d8;
    border-radius: 8px;
    background: #faf8f5;
    color: #1a2332;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: #e8927c;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(232, 146, 124, 0.15);
}

.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.5rem 0.875rem;
    margin: 0;
    border-radius: 8px;
    border: 1px solid #e5e0d8 !important;
    background: #ffffff !important;
    color: #5a6473 !important;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
    border-color: #e8927c !important;
    color: #e8927c !important;
    background: rgba(232, 146, 124, 0.05) !important;
    transform: translateY(-1px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #e8927c 0%, #d4755d 100%) !important;
    border-color: #e8927c !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(232, 146, 124, 0.3);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    border-color: #e5e0d8 !important;
    color: #5a6473 !important;
    background: #ffffff !important;
    transform: none;
}

/* --------------------------------------------------------------------------
   CellPhoneDB Analysis Section - Refined
   -------------------------------------------------------------------------- */
.cpdb-section {
    margin-bottom: 3rem;
}

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

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e5e0d8 20%, #e5e0d8 80%, transparent 100%);
    margin: 3rem 0;
    position: relative;
}

.section-divider::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    padding: 0 1rem;
    color: #d4a574;
    font-size: 0.625rem;
}

.cpdb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 2rem;
}

.cpdb-section-info {
    flex: 1;
}

.cpdb-section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.cpdb-section-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    color: #8b95a5;
    margin: 0;
    line-height: 1.5;
}

/* Generate Button */
.generate-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #e8927c 0%, #d4755d 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(232, 146, 124, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232, 146, 124, 0.4);
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(232, 146, 124, 0.35);
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Receiver Controls */
.cpdb-receiver-controls {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.receiver-select-wrapper {
    flex: 1;
    max-width: 400px;
}

.receiver-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5a6473;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.625rem;
}

.receiver-select {
    width: 100%;
}

/* Plot Container */
.plot-container {
    min-height: 450px;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    border: 2px dashed #e5e0d8;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plot-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #e8927c, #d4a574, #e8927c, #d4a574);
    background-size: 300% 300%;
    border-radius: 16px;
    opacity: 0;
    z-index: -1;
    animation: gradientShift 8s ease infinite;
    transition: opacity 0.3s ease;
}

.plot-container:hover::before {
    opacity: 0.15;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.plot-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(26, 35, 50, 0.12);
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Placeholder State */
.plot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    color: #d1c9bd;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.placeholder-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #8b95a5;
    margin: 0;
    max-width: 320px;
    line-height: 1.6;
}

/* Loading Spinner */
.loader {
    width: 56px;
    height: 56px;
    border: 4px solid #e5e0d8;
    border-top-color: #e8927c;
    border-right-color: #d4a574;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    position: relative;
}

.loader::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid transparent;
    border-top-color: #e8927c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

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

/* --------------------------------------------------------------------------
   Enrichment Analysis Section
   -------------------------------------------------------------------------- */
.enrichment-iframe-container {
    background: #faf8f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(26, 35, 50, 0.04);
}

.enrichment-iframe-container iframe {
    display: block;
    background: transparent;
}

/* --------------------------------------------------------------------------
   Gene Set Scoring Section
   -------------------------------------------------------------------------- */
.scoring-iframe-container {
    background: #faf8f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(26, 35, 50, 0.04);
}

.scoring-iframe-container iframe {
    display: block;
    background: transparent;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
    .basic {
        max-width: 960px;
        margin-left: 280px;
    }

    .CellClustering {
        max-width: 960px;
    }
}

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

    .details-content {
        padding: 2rem;
    }

    .details-box {
        padding: 0 1.5rem;
    }

    .basic {
        max-width: 860px;
        margin-left: 270px;
    }

    .CellClustering {
        max-width: 860px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .details-content {
        margin-left: 220px;
        max-width: calc(100% - 220px);
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .basic {
        max-width: 100%;
        margin-left: 240px;
    }

    .CellClustering {
        max-width: 100%;
    }

    .cpdb-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .generate-btn {
        width: 100%;
        justify-content: center;
    }

    .cpdb-receiver-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .receiver-select-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .details-content {
        margin-left: 0;
        max-width: 100%;
        padding: 1.5rem;
    }

    .section-card__body {
        padding: 1.5rem;
    }

    .details-box {
        padding: 0 1rem;
    }

    .basic {
        margin-left: 0;
        margin-top: 60px;
    }

    .panel-body {
        padding: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .export-btn {
        width: 100%;
        justify-content: center;
    }

    .filter-card {
        padding: 1rem 1.25rem;
    }

    .elegant-table th,
    .elegant-table td {
        padding: 0.75rem 1rem;
    }

    .plot-container {
        padding: 2rem 1.5rem;
        min-height: 350px;
    }

    .placeholder-icon {
        width: 48px;
        height: 48px;
    }
}

/* --------------------------------------------------------------------------
   Legacy Support (for backward compatibility)
   -------------------------------------------------------------------------- */
.details-box {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.basic {
    width: 100%;
    max-width: 1080px;
    margin-left: 290px;
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
    display: block;
    overflow: hidden;
    margin-top: 90px;
    border-radius: 16px;
    padding: 0 0 2rem;
    background: #ffffff;
}

.CellClustering {
    width: 100%;
    max-width: 1080px;
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
    display: block;
    overflow: hidden;
    margin-top: 2rem;
    border-radius: 16px;
    padding: 0 0 2rem;
    background: #ffffff;
}

.basic .header,
.cluster .header {
    height: 60px;
    width: 100%;
    background: #1a2332;
    color: white;
    text-align: left;
    align-content: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 0 2rem;
    display: flex;
    align-items: center;
}

.general_info {
    width: 100%;
    color: #1a2332;
}

.general_info_part {
    display: flex;
    width: 100%;
    padding: 2rem 2.5rem;
    gap: 3rem;
}

.title_1 {
    display: flex;
    color: #1a2332;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.25rem;
    padding-right: 1rem;
    align-items: center;
}

.detail_container_1 {
    margin: 0.5rem 1.25rem;
    display: flex;
    font-size: 0.95rem;
}

.detail_container_2 {
    margin: 0.5rem 1.25rem;
    font-size: 0.95rem;
}

.subtitle {
    font-size: 0.95rem;
    color: #5a6473;
    font-weight: 600;
    min-width: 80px;
}

.text_2 {
    font-size: 0.95rem;
    color: #1a2332;
    display: inline;
    line-height: 1.6;
}

/* GEO Database Links */
.geo-link {
    color: #e8927c;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    padding-bottom: 1px;
}

.geo-link:hover {
    color: #d4755d;
    border-bottom-color: #e8927c;
}

.geo-link::after {
    content: '↗';
    font-size: 0.75em;
    margin-left: 0.25em;
    opacity: 0.6;
    vertical-align: super;
}

.geo-link:active {
    transform: translateY(1px);
}

.separator {
    flex-grow: 1;
    height: 2px;
    background: #e8927c;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    opacity: 0.5;
}

.cluster {
    background: #ffffff;
    border-radius: 16px;
    margin-top: 2rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(26, 35, 50, 0.08);
}

.deg {
    margin-left: 5%;
    display: flex;
}

.v_divider {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: #e5e0d8;
}

input[type="number"],
textarea {
    width: 100px;
    padding: 0.625rem;
    border: 1px solid #e5e0d8;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #1a2332;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="number"]:focus,
textarea:focus {
    border-color: #e8927c;
    box-shadow: 0 0 0 3px rgba(232, 146, 124, 0.15);
    outline: none;
}

.pagination {
    margin-top: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination button {
    margin: 0;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e0d8;
    background: #fff;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pagination button:hover:not(:disabled) {
    border-color: #e8927c;
    color: #e8927c;
}

.pagination button.active {
    background: #e8927c;
    color: #fff;
    border-color: #e8927c;
}

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

/* --------------------------------------------------------------------------
   Quick Action Button (Visualization Link)
   -------------------------------------------------------------------------- */
.viz-quick-btn {
    display: inline-block;
    padding: 0.875rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #e8927c 0%, #d4755d 100%);
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(232, 146, 124, 0.3);
    position: relative;
    overflow: hidden;
}

.viz-quick-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.viz-quick-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(232, 146, 124, 0.4);
}

.viz-quick-btn:hover::before {
    left: 100%;
}

.viz-quick-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232, 146, 124, 0.35);
}

/* --------------------------------------------------------------------------
   CellPhoneDB Dynamic Analysis Section
   -------------------------------------------------------------------------- */

/* Badge indicator */
.cpdb-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #e8927c 0%, #d4755d 100%);
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 1rem;
}

/* Configuration section */
.cpdb-config-section {
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Multi-select container */
.cpdb-cell-selector {
    margin-bottom: 1.5rem;
}

/* Multi-select dropdown */
.cpdb-multiselect {
    width: 100%;
    min-height: 120px;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #1a2332;
    background: #ffffff;
    border: 2px solid #e5e0d8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cpdb-multiselect:hover {
    border-color: #d4a574;
}

.cpdb-multiselect:focus {
    outline: none;
    border-color: #e8927c;
    box-shadow: 0 0 0 4px rgba(232, 146, 124, 0.15);
}

.cpdb-multiselect option {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #f5f2ed;
    transition: background 0.15s ease;
}

.cpdb-multiselect option:checked {
    background: linear-gradient(90deg, rgba(232, 146, 124, 0.15) 0%, rgba(232, 146, 124, 0.08) 100%);
    color: #1a2332;
}

.cpdb-multiselect option:hover {
    background: #faf8f5;
}

/* Mode toggle */
.cpdb-mode-toggle {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cpdb-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #5a6473;
    transition: color 0.2s ease;
}

.cpdb-radio:hover {
    color: #1a2332;
}

.cpdb-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #e8927c;
    cursor: pointer;
}

/* Directed mode controls */
.cpdb-directed-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cpdb-directed-col {
    flex: 1;
}

.cpdb-directed-col label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #5a6473;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.cpdb-directed-col select {
    width: 100%;
    min-height: 80px;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #1a2332;
    background: #ffffff;
    border: 2px solid #e5e0d8;
    border-radius: 8px;
}

.cpdb-directed-col select:focus {
    outline: none;
    border-color: #e8927c;
    box-shadow: 0 0 0 3px rgba(232, 146, 124, 0.15);
}

.cpdb-directed-arrow {
    font-size: 1.5rem;
    color: #e8927c;
    font-weight: 700;
    margin-top: 1.25rem;
}

/* Progress section */
.cpdb-progress {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f2ed 100%);
    border: 2px dashed #e5e0d8;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.cpdb-progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: #e5e0d8;
    border-radius: 4px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
}

.cpdb-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #e8927c 0%, #d4755d 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: cpdbProgressPulse 2s ease-in-out infinite;
}

@keyframes cpdbProgressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.cpdb-progress-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a2332;
    margin: 0 0 0.5rem 0;
}

.cpdb-progress-hint {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #8b95a5;
    margin: 0;
}

/* Results tabs */
.cpdb-results-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e0d8;
    padding-bottom: 0;
}

.cpdb-tab {
    padding: 0.75rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5a6473;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cpdb-tab:hover {
    color: #1a2332;
    background: #faf8f5;
}

.cpdb-tab.active {
    color: #e8927c;
    font-weight: 600;
    border-bottom-color: #e8927c;
}

/* Tab content */
.cpdb-tab-content {
    display: none;
}

.cpdb-tab-content.active {
    display: block;
    animation: cpdbFadeIn 0.3s ease;
}

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

/* Plot container */
.cpdb-plot-container {
    min-height: 500px;
    background: #ffffff;
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpdb-plot-container .js-plotly-plot {
    width: 100%;
}

/* Error state */
.cpdb-error {
    text-align: center;
    padding: 2rem;
    color: #c0392b;
}

.cpdb-error-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: #e74c3c;
}

.cpdb-error-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    margin: 0;
}

/* Responsive adjustments for CPDB */
@media (max-width: 768px) {
    .cpdb-mode-toggle {
        flex-direction: column;
        gap: 1rem;
    }

    .cpdb-directed-row {
        flex-direction: column;
    }

    .cpdb-directed-arrow {
        transform: rotate(90deg);
        margin: 0.5rem 0;
    }

    .cpdb-results-tabs {
        flex-wrap: wrap;
    }

    .cpdb-tab {
        flex: 1;
        text-align: center;
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}
