.main-title {
    color: var(--mantine-color-gray-6);
}

[data-mantine-color-scheme="dark"] .main-title {
    color: var(--mantine-color-gray-3);
}

/* Mobile responsive enhancements */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Allow smooth touch scrolling vertically over Plotly charts on mobile */
.js-plotly-plot .plotly .draglayer {
    touch-action: pan-y !important;
}

/* Scale down Plotly modebar on mobile so it doesn't overlap chart headers */
@media (max-width: 768px) {
    .js-plotly-plot .plotly .modebar-container {
        transform: scale(0.8);
        transform-origin: top right;
    }

    .main-title {
        font-size: 1.25rem !important;
    }
}

/* Smooth scrolling for table scroll areas */
.mantine-ScrollArea-viewport {
    -webkit-overflow-scrolling: touch;
}

/* Ensure market page section titles have equal height in two-column layout */
.market-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
}

@media (min-width: 88em), (min-width: 1408px) {
    .market-section-title {
        height: 100px !important;
        min-height: 100px !important;
    }
}

/* Prevent badges from truncating in tables across all screen sizes */
table .table-badge,
table [class*="m_347db0ec"],
.mantine-Table-table .table-badge,
.mantine-Table-table [class*="m_347db0ec"],
td .table-badge,
td [class*="m_347db0ec"] {
    max-width: none !important;
    width: max-content !important;
    min-width: max-content !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

table .table-badge span,
table [class*="m_5add502a"],
.mantine-Table-table .table-badge span,
.mantine-Table-table [class*="m_5add502a"],
td .table-badge span,
td [class*="m_5add502a"] {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

/* Ensure table cells and headers containing badges do not compress below content */
table td:has(.table-badge),
table td:has([class*="m_347db0ec"]),
table th:has(.table-badge),
table th:has([class*="m_347db0ec"]),
.table-badge-cell {
    white-space: nowrap !important;
    min-width: max-content !important;
}

/* ==========================================================================
   Initial Page Loading Screen with Website Logo
   ========================================================================== */

:root {
    --loader-bg: #141517;
    --loader-text: #c1c2c5;
    --loader-ring-spin: #228be6;
    --loader-glow: rgba(34, 139, 230, 0.4);
    --loader-track-bg: rgba(255, 255, 255, 0.1);
}

@media (prefers-color-scheme: light) {
    :root {
        --loader-bg: #ffffff;
        --loader-text: #495057;
        --loader-ring-spin: #228be6;
        --loader-glow: rgba(34, 139, 230, 0.25);
        --loader-track-bg: rgba(0, 0, 0, 0.08);
    }
}

[data-mantine-color-scheme="dark"] {
    --loader-bg: #141517;
    --loader-text: #c1c2c5;
    --loader-ring-spin: #228be6;
    --loader-glow: rgba(34, 139, 230, 0.4);
    --loader-track-bg: rgba(255, 255, 255, 0.1);
}

[data-mantine-color-scheme="light"] {
    --loader-bg: #ffffff;
    --loader-text: #495057;
    --loader-ring-spin: #228be6;
    --loader-glow: rgba(34, 139, 230, 0.25);
    --loader-track-bg: rgba(0, 0, 0, 0.08);
}

/* Full-screen initial loading overlay */
._dash-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--loader-bg, #141517);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    color: transparent;
    font-size: 0;
    user-select: none;
    -webkit-user-select: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--loader-text);
}

.loader-logo-container {
    position: relative;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--loader-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: loader-glow-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.loader-ring {
    position: absolute;
    inset: 0;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--loader-ring-spin);
    border-right-color: rgba(34, 139, 230, 0.4);
    animation: loader-spin 1.2s linear infinite;
    pointer-events: none;
}

.loader-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
    z-index: 2;
    animation: loader-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    will-change: transform, filter;
}

.loader-brand {
    margin-top: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--loader-text);
}

.loader-track {
    width: 140px;
    height: 4px;
    background-color: var(--loader-track-bg);
    border-radius: 9999px;
    margin-top: 14px;
    overflow: hidden;
    position: relative;
}

.loader-track-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, #1c7ed6, #228be6, #4dabf7);
    border-radius: 9999px;
    animation: loader-bar-slide 1.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* Fallback if inner wrapper is missing */
._dash-loading:not(:has(.loader-wrapper))::after {
    content: "";
    width: 64px;
    height: 64px;
    background-image: url('/assets/favicon-192x192.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 16px;
    animation: loader-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

@keyframes loader-pulse {
    0%, 100% {
        transform: scale(0.95);
        filter: drop-shadow(0 0 10px rgba(34, 139, 230, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(34, 139, 230, 0.6));
    }
}

@keyframes loader-glow-pulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.9;
    }
}

@keyframes loader-bar-slide {
    0% { left: -50%; width: 30%; }
    50% { left: 25%; width: 50%; }
    100% { left: 100%; width: 30%; }
}

@media (prefers-reduced-motion: reduce) {
    .loader-logo,
    .loader-ring,
    .loader-glow,
    .loader-track-bar,
    ._dash-loading:not(:has(.loader-wrapper))::after {
        animation: none !important;
    }
}



