/* ============================================================
   STATS MODAL — Detailed analytics view
   ============================================================ */

/* More Stats Button on Sidebar */
.more-stats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    width: 100%;
    margin-top: var(--space-md);
    padding: calc(8px * var(--master-scale)) calc(16px * var(--master-scale));
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: var(--border-radius-sm);
    color: var(--accent-primary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-family: var(--font-display);
    position: relative;
    overflow: hidden;
}

.more-stats-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: translateX(-110%);
    transition: transform 0.55s ease;
}

.more-stats-btn:hover {
    background: rgba(0, 170, 255, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.2);
    transform: translateY(-1px);
}

.more-stats-btn:hover::before {
    transform: translateX(110%);
}

.more-stats-btn .btn-icon {
    flex-shrink: 0;
    transition: transform var(--transition-smooth);
}

.more-stats-btn:hover .btn-icon {
    transform: scale(1.1);
}

/* Modal Content Grid layout */
.stats-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-sm);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.stats-tab-btn {
    padding: calc(8px * var(--master-scale)) calc(16px * var(--master-scale));
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-display);
}

.stats-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.stats-tab-btn.active {
    color: var(--accent-primary);
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.2);
}

/* Content Pane */
.stats-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.stats-tab-pane.active {
    display: block;
}

.stats-loading,
.stats-error,
.stats-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 50px;
    gap: 15px;
    color: var(--text-secondary);
    text-align: center;
}

.stats-error {
    color: var(--accent-error);
}

.stats-loading .spinner-small {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Flex layout with chart + table */
.stats-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

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

/* Glass card */
.stats-card {
    background: rgba(15, 25, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stats-card h4 {
    margin-top: 0;
    margin-bottom: var(--space-md);
    font-size: var(--font-size-md);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 600;
}

.stats-card-feature {
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 170, 255, 0.1), transparent 34%),
        rgba(15, 25, 42, 0.46);
}

.stats-card-heading,
.stats-section-heading {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    align-items: flex-start;
    margin-bottom: 10px;
}

.stats-card-heading h4,
.stats-section-heading h4 {
    margin-bottom: 0.25rem;
}

.stats-card-heading p,
.stats-section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.45;
}

.stats-section-heading {
    align-items: center;
}

.stats-range-control {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.stats-range-btn {
    min-height: 34px;
    padding: 0.35rem 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.035);
    font-family: var(--font-display);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stats-range-btn:hover,
.stats-range-btn.active {
    color: var(--text-primary);
    border-color: rgba(0, 170, 255, 0.38);
    background: rgba(0, 170, 255, 0.13);
    box-shadow: 0 0 18px rgba(0, 170, 255, 0.12);
}

.stats-custom-range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: -5px 0 14px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 170, 255, 0.13);
    border-radius: 10px;
    background: rgba(5, 10, 18, 0.48);
}

.stats-custom-range[hidden] {
    display: none;
}

.stats-custom-range label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stats-custom-range input {
    min-height: 28px;
    min-width: 140px;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    background: rgba(3, 8, 15, 0.82);
    font: inherit;
    font-size: var(--font-size-sm);
    color-scheme: dark;
}

.stats-custom-range input:focus {
    outline: none;
    border-color: rgba(0, 170, 255, 0.42);
    box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.12);
}

.stats-range-apply {
    min-height: 28px;
    padding: 2px 14px;
    border: 1px solid rgba(0, 170, 255, 0.34);
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(0, 170, 255, 0.14);
    font-family: var(--font-display);
    font-size: var(--font-size-sm);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stats-range-apply:hover {
    background: rgba(0, 170, 255, 0.22);
    box-shadow: 0 0 18px rgba(0, 170, 255, 0.12);
}

.stats-view-tabs {
    display: inline-flex;
    gap: 0.45rem;
    padding: 0.35rem;
    margin: 0 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(3, 8, 15, 0.62);
}

.stats-view-btn {
    min-height: 36px;
    padding: 0.42rem 0.9rem;
    border: 0;
    border-radius: 999px;
    color: var(--text-secondary);
    background: transparent;
    font-family: var(--font-display);
    font-size: var(--font-size-sm);
    font-weight: 800;
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.stats-view-btn:hover {
    color: var(--text-primary);
}

.stats-view-btn.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.2), rgba(58, 124, 237, 0.16));
    box-shadow: inset 0 0 0 1px rgba(0, 170, 255, 0.22), 0 0 18px rgba(0, 170, 255, 0.12);
}

.stats-view-pane {
    display: none;
    animation: fadeIn 0.22s ease-out;
}

.stats-view-pane.active {
    display: block;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    margin: auto;
}

.chart-wrapper-large {
    height: min(54vh, 500px);
    min-height: 360px;
}

.chart-wrapper-tall {
    height: min(64vh, 650px);
    min-height: 460px;
}

.stats-ranking-card .chart-wrapper-tall {
    min-height: 540px;
}

.chart-scroll-shell {
    position: relative;
    max-height: min(48vh, 480px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.4rem;
    cursor: grab;
    scrollbar-color: rgba(0, 170, 255, 0.42) rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
}

.chart-scroll-shell.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.chart-scroll-shell::-webkit-scrollbar {
    width: 8px;
}

.chart-scroll-shell::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
}

.chart-scroll-shell::-webkit-scrollbar-thumb {
    background: rgba(0, 170, 255, 0.42);
    border-radius: 999px;
}

.chart-wrapper-scrollable {
    height: 640px;
    min-height: 520px;
    margin: 0;
}

.stats-mini-note {
    align-self: flex-start;
    max-width: 330px;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(0, 170, 255, 0.16);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(0, 170, 255, 0.06);
    font-size: var(--font-size-xs);
    font-weight: 700;
    line-height: 1.35;
}

/* Beautiful custom tables */
.stats-table-wrapper {
    overflow-x: auto;
    max-height: min(34vh, 260px);
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
    text-align: left;
    min-width: 760px;
}

.stats-table th {
    background: rgba(5, 10, 18, 0.94);
    position: sticky;
    top: 0;
    z-index: 10;
    color: var(--text-primary);
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

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

.stats-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

/* Profession indicator badge */
.prof-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 600;
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 10px;
}

.stats-kpi-card {
    padding: 8px 12px;
    border: 1px solid rgba(0, 170, 255, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(0, 170, 255, 0.05), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.02);
    min-width: 0;
}

.stats-kpi-label {
    display: block;
    margin-bottom: 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stats-kpi-card strong {
    display: block;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-kpi-detail {
    display: block;
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profession-leader-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.profession-leader-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: stretch;
}

.top-class-highlights {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.top-class-highlight {
    padding: 8px 12px;
    border: 1px solid rgba(0, 170, 255, 0.14);
    border-radius: 10px;
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 170, 255, 0.12), transparent 34%),
        rgba(255, 255, 255, 0.025);
    min-width: 0;
}

.top-class-highlight-main,
.top-class-highlight-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.top-class-highlight-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-class-highlight-meta {
    justify-content: space-between;
    margin-top: 0.45rem;
    color: var(--text-secondary);
    font-weight: 800;
}

.top-class-highlight-meta small {
    color: var(--text-muted);
    font-weight: 700;
}

.top-class-table-wrapper {
    overflow-x: auto;
    max-height: min(34vh, 260px);
    overflow-y: auto;
    border: 1px solid rgba(0, 170, 255, 0.12);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(0, 170, 255, 0.035), rgba(255, 255, 255, 0.012)),
        rgba(5, 10, 18, 0.54);
}

.top-class-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.top-class-table th,
.top-class-table td {
    padding: 0.55rem 0.7rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.top-class-table th {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(5, 10, 18, 0.94);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-class-table td {
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.top-class-table tbody tr:last-child td {
    border-bottom: 0;
}

.top-class-table tbody tr:hover td {
    color: var(--text-primary);
    background: rgba(0, 170, 255, 0.045);
}

.top-class-name {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-primary);
    min-width: 0;
}

.top-class-badge {
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    font-size: var(--font-size-xs);
    font-weight: 800;
}

.top-class-popularity {
    min-width: 180px;
}

.top-class-popularity .profession-share-track {
    height: 8px;
}

.stats-empty-cell {
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
}

.profession-leader-row {
    display: grid;
    gap: 0.72rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.profession-leader-row:hover {
    border-color: rgba(0, 170, 255, 0.18);
    background: rgba(0, 170, 255, 0.045);
    transform: translateY(-1px);
}

.profession-leader-main,
.profession-leader-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.profession-leader-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.profession-leader-stats span {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.profession-leader-stats strong {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: var(--font-size-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profession-leader-stats small {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profession-leader-main {
    color: var(--text-primary);
    font-weight: 800;
}

.profession-leader-meta {
    justify-content: space-between;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.profession-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: var(--accent-primary);
    background: rgba(0, 170, 255, 0.1);
    font-size: var(--font-size-xs);
}

.profession-leader-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profession-delta {
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    font-weight: 800;
}

.profession-delta.positive {
    color: var(--accent-success);
    background: rgba(48, 211, 140, 0.1);
}

.profession-delta.negative {
    color: var(--accent-error);
    background: rgba(255, 92, 104, 0.1);
}

.profession-delta.neutral {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
}

.profession-rank-move {
    margin-left: auto;
    padding: 0.12rem 0.38rem;
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    font-size: var(--font-size-xs);
    font-weight: 900;
}

.profession-rank-move.positive {
    color: var(--accent-success);
    background: rgba(48, 211, 140, 0.1);
}

.profession-rank-move.negative {
    color: var(--accent-error);
    background: rgba(255, 92, 104, 0.1);
}

.profession-share-track {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
}

.profession-share-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    box-shadow: 0 0 14px rgba(0, 170, 255, 0.16);
}

.profession-sparkline {
    display: flex;
    align-items: end;
    gap: 4px;
    height: 34px;
    padding-top: 0.2rem;
}

.profession-sparkline span {
    flex: 1;
    min-width: 4px;
    border-radius: 999px 999px 2px 2px;
    opacity: 0.78;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.1);
}

.prof-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Analytics overview stats row */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

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

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

.overview-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
}

.overview-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 2px;
}

.overview-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stats Modal Structural Layout */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2vw, var(--space-lg));
    animation: modalFadeIn 0.3s ease-out;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.stats-modal.show {
    opacity: 1;
}

.stats-overlay {
    width: 100%;
    max-width: min(1480px, calc(100vw - clamp(1rem, 2.5vw, 2.5rem)));
    max-height: 94vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.stats-content {
    background: linear-gradient(145deg, rgba(10, 18, 32, 0.97), rgba(7, 13, 22, 0.95));
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 170, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(94vh, 1080px);
}

.stats-header {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: rgba(5, 10, 18, 0.6);
    border-bottom: 1px solid rgba(0, 170, 255, 0.15);
    position: relative;
}

.stats-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.stats-header h3 svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.stats-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), rgba(0, 170, 255, 0.3) 60%, transparent);
}

.stats-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 16px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    line-height: 1;
    flex-shrink: 0;
}

.stats-close:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
    color: var(--text-primary);
}

.stats-body {
    padding: 10px 16px 16px 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

@media (max-width: 760px) {
    .stats-section-heading,
    .stats-card-heading {
        flex-direction: column;
    }

    .stats-range-control {
        justify-content: flex-start;
        width: 100%;
    }

    .stats-range-btn {
        flex: 1 1 calc(50% - 0.5rem);
    }

    .stats-view-tabs {
        display: grid;
        grid-template-columns: 1fr;
        border-radius: 18px;
        width: 100%;
    }

    .stats-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .top-class-highlights {
        grid-template-columns: 1fr 1fr;
    }

    .chart-wrapper-large,
    .chart-wrapper-tall {
        min-height: 380px;
        height: 500px;
    }

    .stats-body {
        padding: var(--space-md);
    }
}

@media (max-width: 520px) {
    .stats-kpi-grid,
    .top-class-highlights,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .profession-leader-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stats-range-btn {
        flex-basis: 100%;
    }
}

/* ============================================================
   TIMELINE MINIMAP SLIDER (GW2 EFFICIENCY STYLE)
   ============================================================ */
.timeline-zoom-container {
    margin-top: var(--space-md);
    background: rgba(3, 8, 15, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 6px;
    position: relative;
    user-select: none;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.timeline-minimap-wrapper {
    position: relative;
    width: 100%;
    height: 48px;
    overflow: hidden;
    border-radius: 6px;
}

.timeline-minimap-wrapper canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.timeline-slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.timeline-slider-selection {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0%;
    right: 0%;
    background: rgba(0, 170, 255, 0.06);
    border-left: 2px solid var(--accent-primary);
    border-right: 2px solid var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 170, 255, 0.2);
    cursor: grab;
    touch-action: none;
    z-index: 5;
}

.timeline-slider-selection:active {
    cursor: grabbing;
}

.timeline-unselected-left,
.timeline-unselected-right {
    position: absolute;
    top: 0;
    bottom: 0;
    background: rgba(3, 8, 15, 0.7);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.15s ease;
}

.timeline-unselected-left {
    left: 0;
}

.timeline-unselected-right {
    right: 0;
}

.timeline-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 28px;
    background: #00aaff;
    border: 1.5px solid #ffffff;
    border-radius: 3px;
    cursor: ew-resize;
    box-shadow: 0 0 6px rgba(0, 170, 255, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    touch-action: none;
    z-index: 10;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.timeline-handle::before,
.timeline-handle::after {
    content: '';
    width: 1.5px;
    height: 12px;
    background: rgba(255, 255, 255, 0.85);
}

.handle-left {
    left: -6px;
}

.handle-right {
    right: -6px;
}

.timeline-handle:hover,
.timeline-handle:active {
    background: #ffffff;
    border-color: #00aaff;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.8);
}
