/**
 * Theme Fix - Ensures text is visible in both light and dark modes
 * This file fixes any text visibility issues when switching themes
 */

/* CRITICAL: Prevent flash of white background on load */
html:not(.dark):not(.light) {
    background-color: #020617; /* Default to dark while theme loads */
    color: #f1f5f9;
}

/* Ensure body background changes with theme - FAST */
html {
    transition: background-color 150ms ease, color 150ms ease;
}

/* DARK MODE - Everything Dark */
html.dark {
    background-color: #0f172a !important; /* dark-900 */
    color: #f1f5f9 !important; /* gray-100 */
}

html.dark body {
    background-color: #0f172a !important; /* dark-900 */
    color: #f1f5f9 !important;
}

html.dark main {
    background-color: #0f172a !important; /* dark-900 */
}

/* LIGHT MODE - Everything White */
html:not(.dark) {
    background-color: #ffffff !important; /* white */
    color: #111827 !important; /* gray-900 */
}

html:not(.dark) body {
    background-color: #ffffff !important;
    color: #111827 !important;
}

html:not(.dark) main {
    background-color: #ffffff !important;
}

/* Fix any white text on white background issues */
/* IMPORTANT: .text-white should stay white on gradient/colored backgrounds */
.text-white {
    color: white !important;
}

html:not(.dark) .dark\:text-white {
    color: #111827 !important; /* Override to gray-900 in light mode */
}

/* ===== API PAGE LIGHT MODE FIXES ===== */
/* Ensure white text stays white when inside gradient containers */
html:not(.dark) .bg-gradient-to-br .text-white,
html:not(.dark) .bg-gradient-to-r .text-white,
html:not(.dark) [class*="from-indigo"] .text-white,
html:not(.dark) [class*="from-purple"] .text-white,
html:not(.dark) [class*="from-pink"] .text-white,
html:not(.dark) [class*="from-blue"] .text-white,
html:not(.dark) [class*="from-cyan"] .text-white,
html:not(.dark) [class*="from-emerald"] .text-white,
html:not(.dark) [class*="from-green"] .text-white,
html:not(.dark) [class*="from-amber"] .text-white,
html:not(.dark) [class*="from-orange"] .text-white,
html:not(.dark) [class*="from-red"] .text-white,
html:not(.dark) [class*="from-yellow"] .text-white {
    color: #ffffff !important;
}

/* SVG icons inside gradient containers - always white */
html:not(.dark) .bg-gradient-to-br svg,
html:not(.dark) .bg-gradient-to-r svg,
html:not(.dark) [class*="from-"] svg {
    color: #ffffff !important;
}

/* Step numbers inside gradient containers */
html:not(.dark) .bg-gradient-to-br > span.text-white,
html:not(.dark) .bg-gradient-to-r > span.text-white {
    color: #ffffff !important;
}

/* Buttons with gradient backgrounds */
html:not(.dark) a.bg-gradient-to-r,
html:not(.dark) button.bg-gradient-to-r {
    color: #ffffff !important;
}

/* Cards with gradient backgrounds - all text white */
html:not(.dark) .bg-gradient-to-br.text-white,
html:not(.dark) .bg-gradient-to-br.text-white h3,
html:not(.dark) .bg-gradient-to-br.text-white p,
html:not(.dark) .bg-gradient-to-br.text-white span {
    color: #ffffff !important;
}

/* Ensure proper text contrast in light mode */
html:not(.dark) {
    /* Gray text variations */
    .text-gray-100 { color: #f3f4f6; }
    .text-gray-200 { color: #e5e7eb; }
    .text-gray-300 { color: #d1d5db; }
    .text-gray-400 { color: #9ca3af; }
    .text-gray-500 { color: #6b7280; }
    .text-gray-600 { color: #4b5563; }
    .text-gray-700 { color: #374151; }
    .text-gray-800 { color: #1f2937; }
    .text-gray-900 { color: #111827; }
}

/* Fix search input text visibility */
html:not(.dark) input[type="text"],
html:not(.dark) input[type="search"],
html:not(.dark) textarea {
    color: #111827; /* gray-900 */
    background-color: #f3f4f6; /* gray-100 */
}

html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
    color: #9ca3af; /* gray-400 */
}

/* Fix dropdown menu text in light mode */
html:not(.dark) .dropdown-menu,
html:not(.dark) [role="menu"] {
    background-color: white;
    color: #111827;
}

/* Fix table in light mode */
html:not(.dark) .crypto-table {
    background-color: white;
    color: #111827;
}

html:not(.dark) .crypto-table thead {
    background-color: #f9fafb; /* gray-50 */
    border-color: #e5e7eb; /* gray-200 */
}

html:not(.dark) .crypto-table th {
    color: #4b5563; /* gray-600 */
}

html:not(.dark) .crypto-table td {
    color: #111827; /* gray-900 */
}

html:not(.dark) .crypto-table tbody tr {
    border-color: #f3f4f6; /* gray-100 */
}

html:not(.dark) .crypto-table tbody tr:hover {
    background-color: #f9fafb; /* gray-50 */
}

/* Fix card text in light mode */
html:not(.dark) .crypto-card {
    background-color: white;
    color: #111827;
}

/* Fix badge text visibility */
html:not(.dark) .badge-success {
    background-color: #dcfce7; /* green-100 */
    color: #166534; /* green-800 */
}

html:not(.dark) .badge-danger {
    background-color: #fee2e2; /* red-100 */
    color: #991b1b; /* red-800 */
}

/* Fix price indicators */
html:not(.dark) .price-up,
html:not(.dark) .price-positive {
    color: #16a34a !important; /* green-600 */
}

html:not(.dark) .price-down,
html:not(.dark) .price-negative {
    color: #dc2626 !important; /* red-600 */
}

/* Fix navbar in light mode */
html:not(.dark) nav {
    background-color: white;
    border-color: #e5e7eb; /* gray-200 */
}

html:not(.dark) nav a,
html:not(.dark) nav button {
    color: #374151; /* gray-700 */
}

html:not(.dark) nav a:hover,
html:not(.dark) nav button:hover {
    color: #059669; /* crypto-600 */
    background-color: #f3f4f6; /* gray-100 */
}

/* Fix footer in light mode */
html:not(.dark) footer {
    background-color: #f9fafb; /* gray-50 */
    color: #4b5563; /* gray-600 */
}

/* Fix live indicator in light mode */
html:not(.dark) .live-indicator {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #059669; /* green-600 */
}

html:not(.dark) .live-indicator-dot {
    background-color: #10b981; /* green-500 */
}

/* Fix modal/popup backgrounds */
html:not(.dark) .modal,
html:not(.dark) .popup {
    background-color: white;
    color: #111827;
}

/* Fix any remaining contrast issues */
html:not(.dark) h1,
html:not(.dark) h2,
html:not(.dark) h3,
html:not(.dark) h4,
html:not(.dark) h5,
html:not(.dark) h6 {
    color: #111827; /* gray-900 */
}

html:not(.dark) p {
    color: #475569; /* gray-600 */
}

html:not(.dark) a {
    text-decoration: none;
}

html:not(.dark) a:hover {
    text-decoration: none;
}

.btn-primary-link,
.btn-primary-link:hover,
.btn-primary-link:focus,
.btn-primary-link:active,
.btn-primary-link:visited {
    color: #ffffff !important;
    text-decoration: none;
}

/* Fix skeleton loaders */
html:not(.dark) .skeleton {
    background-color: #e5e7eb; /* gray-200 */
}

/* Fix scrollbar in light mode */
html:not(.dark) ::-webkit-scrollbar-track {
    background-color: #f3f4f6; /* gray-100 */
}

html:not(.dark) ::-webkit-scrollbar-thumb {
    background-color: #d1d5db; /* gray-300 */
}

html:not(.dark) ::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af; /* gray-400 */
}

/* Smooth theme transitions - OPTIMIZED FOR SPEED */
*,
*::before,
*::after {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: ease-in-out;
    transition-duration: 120ms; /* Faster! */
}

/* CRITICAL: Disable ALL transitions during theme switch for instant change */
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
    transition: none !important;
    animation: none !important;
}

/* Don't animate these properties - instant feel */
input,
textarea,
select,
button {
    transition-property: background-color, border-color, box-shadow;
    transition-duration: 100ms; /* Even faster for inputs */
}

/* No transitions on these - instant switch */
svg,
img,
.w-8,
.h-8,
.skeleton,
.animate-spin {
    transition: none !important;
}

/* Theme toggle animation */
[x-cloak] {
    display: none !important;
}

.theme-transition {
    transition: all 120ms ease-in-out;
}

/* Fix TradingView chart theme */
html:not(.dark) #tradingview_widget,
html:not(.dark) .tradingview-widget-container {
    background-color: white !important;
}

/* Fix ApexCharts theme */
html:not(.dark) .apexcharts-canvas {
    background: white !important;
}

html:not(.dark) .apexcharts-text {
    fill: #111827 !important;
}

/* Ensure buttons have proper contrast */
html:not(.dark) .btn-primary {
    background-color: #059669;
    color: white;
}

html:not(.dark) .btn-primary:hover {
    background-color: #047857;
}

html:not(.dark) .btn-secondary {
    background-color: #e5e7eb; /* gray-200 */
    color: #111827;
}

html:not(.dark) .btn-secondary:hover {
    background-color: #d1d5db; /* gray-300 */
}

/* Fix form inputs */
html:not(.dark) .input-modern {
    background-color: #f9fafb; /* gray-50 */
    border-color: #e5e7eb; /* gray-200 */
    color: #111827;
}

html:not(.dark) .input-modern:focus {
    border-color: #10b981;
    background-color: white;
}

/* Fix any stats/metrics displays */
html:not(.dark) .stat-item {
    background-color: #f9fafb; /* gray-50 */
    color: #111827;
}

html:not(.dark) .stat-value {
    color: #111827;
}

html:not(.dark) .stat-label {
    color: #6b7280; /* gray-500 */
}

/* ===== FAQ SECTION DARK MODE FIX ===== */
/* Ensure FAQ content text is visible in dark mode */
html.dark .faq-content,
html.dark .faq-content div,
html.dark .faq-content p,
html.dark .faq-content span,
html.dark .faq-content li,
html.dark .faq-content ul,
html.dark .faq-content ol {
    color: #e2e8f0 !important; /* slate-200 - visible white */
}

html.dark .faq-content strong,
html.dark .faq-content b,
html.dark .faq-content h1,
html.dark .faq-content h2,
html.dark .faq-content h3,
html.dark .faq-content h4,
html.dark .faq-content h5,
html.dark .faq-content h6 {
    color: #ffffff !important; /* pure white for emphasis */
}

html.dark .faq-content a {
    color: #4ade80 !important; /* green-400 for links */
}

/* Dark mode prose override for FAQ */
html.dark .prose,
html.dark .prose-sm,
html.dark .dark\:prose-invert {
    color: #e2e8f0 !important;
}

html.dark .prose p,
html.dark .prose-sm p {
    color: #e2e8f0 !important;
}

html.dark .prose strong,
html.dark .prose-sm strong {
    color: #ffffff !important;
}

html.dark .prose li,
html.dark .prose-sm li {
    color: #e2e8f0 !important;
}

/* Ensure text-gray classes show white in dark mode */
html.dark .text-gray-700,
html.dark .text-gray-600,
html.dark .text-gray-500 {
    color: #cbd5e1 !important; /* slate-300 */
}

html.dark .text-gray-300,
html.dark .text-gray-400 {
    color: #e2e8f0 !important; /* slate-200 */
}

/* Fix Tailwind dark utility override */
.dark .dark\:hidden {
    display: none !important;
}

.dark .dark\:block {
    display: block !important;
}

/* =========================
   Footer Design System
========================= */


.footer-title {
    font-size: 0.95rem;

    font-weight: 600;

    color: #111827;

    margin-bottom: 1rem;
}

.dark .footer-title {
    color: #f8fafc;
}

.footer-links {
    display: flex;

    flex-direction: column;

    gap: 0.65rem;
}

.footer-link {
    font-size: 0.92rem;

    color: #6b7280;

    transition: color .2s ease;
}

.dark .footer-link {
    color: #9ca3af;
}

.footer-link:hover {
    color: #2563eb;
}

.dark .footer-link:hover {
    color: #60a5fa;
}

/* =========================
   Footer Social
========================= */

.footer-social-link {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    color: #6b7280;

    transition: color .2s ease;
}

.dark .footer-social-link {
    color: #9ca3af;
}

.footer-social-link:hover {
    color: #2563eb;
}

.dark .footer-social-link:hover {
    color: #60a5fa;
}

.footer-social-link svg {
    width: 1.2rem;
    height: 1.2rem;
}

.market-page-header {
    padding: 3rem 0 1.75rem;

    border-bottom: 1px solid #eef2f7;
}

.dark .market-page-header {
    border-bottom-color: rgba(51,65,85,.5);
}

.market-page-header-inner {
    max-width: 760px;

    margin: 0 auto;

    text-align: center;
}

.market-page-title {
    font-size: 3rem;

    line-height: 1.05;

    font-weight: 800;

    letter-spacing: -0.03em;

    color: #0f172a;

    margin-bottom: 1rem;
}

.dark .market-page-title {
    color: #ffffff;
}

.market-page-description {
    font-size: 1.05rem;

    line-height: 1.75;

    color: #64748b;

    max-width: 680px;

    margin: 0 auto;
}

.dark .market-page-description {
    color: #94a3b8;
}

/* =================================
   Market Tabs
================================= */

.market-tabs-section {
    background: transparent;

    border-bottom: 1px solid #eef2f7;
}

.dark .market-tabs-section {
    border-bottom-color: rgba(51,65,85,.5);
}

.market-tabs {
    display: flex;

    flex-wrap: wrap;

    gap: 0.75rem;

    padding: 1rem 0;
}

.market-tab {
    display: inline-flex;

    align-items: center;

    gap: 0.55rem;

    height: 42px;

    padding: 0 1rem;

    border-radius: 999px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    color: #475569;

    font-size: 0.92rem;

    font-weight: 600;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease;
}

.market-tab:hover {
    background: #f8fafc;

    border-color: #cbd5e1;
}

.dark .market-tab {
    background: #0f172a;

    border-color: rgba(51,65,85,.8);

    color: #cbd5e1;
}

.dark .market-tab:hover {
    background: rgba(30,41,59,.9);
}

.market-tab i {
    font-size: 0.82rem;
}

/* =================================
   Active Tabs
================================= */

.market-tab.active-gainer {
    background: rgba(34,197,94,.08);

    border-color: rgba(34,197,94,.22);

    color: #16a34a;
}

.market-tab.active-loser {
    background: rgba(239,68,68,.08);

    border-color: rgba(239,68,68,.22);

    color: #dc2626;
}

.market-tab.active-neutral {
    background: rgba(37,99,235,.08);

    border-color: rgba(37,99,235,.2);

    color: #2563eb;
}

.dark .market-tab.active-gainer {
    color: #4ade80;
}

.dark .market-tab.active-loser {
    color: #f87171;
}

.dark .market-tab.active-neutral {
    color: #60a5fa;
}

/* =================================
   Responsive
================================= */

@media (max-width: 768px) {

    .market-page-header {
        padding: 2.2rem 0 1.25rem;
    }

    .market-page-title {
        font-size: 2rem;
    }

    .market-page-description {
        font-size: 0.96rem;

        line-height: 1.65;
    }

}

/* =========================================
   CoinKaya Market Pages
========================================= */

/* Base */
.ck-market-page,
.ck-market-page * {
    box-sizing: border-box;
}

.ck-market-page {
    --ck-accent: #2563eb;
    --ck-accent-soft: rgba(37, 99, 235, 0.08);
    --ck-accent-border: rgba(37, 99, 235, 0.18);

    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: #ffffff !important;
    color: #0f172a;
}

.ck-market--all,
.ck-market--hilo {
    --ck-accent: #2563eb;
    --ck-accent-soft: rgba(37, 99, 235, 0.08);
    --ck-accent-border: rgba(37, 99, 235, 0.18);
}

.ck-market--gainers {
    --ck-accent: #16a34a;
    --ck-accent-soft: rgba(22, 163, 74, 0.08);
    --ck-accent-border: rgba(22, 163, 74, 0.18);
}

.ck-market--losers {
    --ck-accent: #dc2626;
    --ck-accent-soft: rgba(220, 38, 38, 0.08);
    --ck-accent-border: rgba(220, 38, 38, 0.18);
}

.ck-market-page .container-modern {
    width: 100%;
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    background: transparent !important;
}

/* Hero */
.ck-market-hero {
    width: 100%;
    margin: 0;
    padding: 3.2rem 0 2.8rem;
    background: #ffffff !important;
    border-bottom: 1px solid #eef2f7;
}

.dark .ck-market-hero {
    background: #0f172a !important;
    border-bottom-color: rgba(51, 65, 85, 0.72);
}

.ck-market-hero-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.ck-market-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: fit-content;
    margin: 0 auto 1rem;
    padding: 0.36rem 0.68rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.14);
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 620;
    line-height: 1;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.dark .ck-market-eyebrow {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(96, 165, 250, 0.18);
    color: #93c5fd;
}

.ck-market-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.15rem, 4vw, 3.5rem);
    line-height: 1.08;
    font-weight: 680;
    letter-spacing: -0.045em;
}

.dark .ck-market-hero h1 {
    color: #ffffff;
}

.ck-market-hero p {
    max-width: 760px;
    margin: 0.95rem auto 0;
    color: #526174;
    font-size: 0.98rem;
    line-height: 1.68;
}

.dark .ck-market-hero p {
    color: #94a3b8;
}

/* Blockchain detail hero logo */
.ck-blockchain-detail-page .ck-market-hero .ck-chain-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.05rem;
    padding: 0.9rem;
    border-radius: 1.1rem;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.38),
        0 8px 18px rgba(15, 23, 42, 0.04);
}

.ck-blockchain-detail-page .ck-market-hero .ck-chain-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ck-blockchain-detail-page .ck-market-hero .ck-chain-logo i {
    font-size: 2rem;
}

/* Blockchain detail breadcrumb */
.ck-blockchain-detail-page .ck-market-hero nav {
    margin-bottom: 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.ck-blockchain-detail-page .ck-market-hero nav a {
    color: #475569;
    text-decoration: none;
}

.ck-blockchain-detail-page .ck-market-hero nav a:hover {
    color: #2563eb;
}

.dark .ck-blockchain-detail-page .ck-market-hero nav {
    color: #94a3b8;
}

.dark .ck-blockchain-detail-page .ck-market-hero nav a {
    color: #cbd5e1;
}

.dark .ck-blockchain-detail-page .ck-market-hero nav a:hover {
    color: #93c5fd;
}

@media (max-width: 768px) {
    .ck-market-hero {
        padding: 2.6rem 0 2.2rem;
    }

    .ck-market-eyebrow {
        margin-bottom: 0.85rem;
        padding: 0.34rem 0.62rem;
        font-size: 0.68rem;
    }

    .ck-market-hero h1 {
        font-size: 2.05rem;
        line-height: 1.1;
        font-weight: 680;
        letter-spacing: -0.04em;
    }

    .ck-market-hero p {
        margin-top: 0.85rem;
        font-size: 0.92rem;
        line-height: 1.62;
    }

    .ck-blockchain-detail-page .ck-market-hero .ck-chain-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.9rem;
        padding: 0.72rem;
        border-radius: 0.95rem;
    }

    .ck-blockchain-detail-page .ck-market-hero nav {
        margin-bottom: 0.7rem;
        font-size: 0.82rem;
    }
}

/* Main */
.ck-market-main {
    width: 100%;
    padding: 0 0 4.8rem;
    background: #ffffff !important;
}

/* Stats */
.ck-market-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: -1.65rem;
    position: relative;
    z-index: 2;
}

.ck-market-stat-card {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
    padding: 1.1rem 1.15rem;
    border-radius: 1.15rem;
    background: #ffffff;
    border: 1px solid #e5eaf3;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.025),
        0 12px 28px rgba(15, 23, 42, 0.04);
}

.ck-market-stat-icon {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 0.95rem;
    font-size: 0.95rem;
}

.ck-market-stat-icon.blue {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.09);
}

.ck-market-stat-icon.green {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.09);
}

.ck-market-stat-icon.red {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.09);
}

.ck-market-stat-icon.violet {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.09);
}

.ck-market-stat-icon.orange {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.11);
}

.ck-market-stat-content {
    min-width: 0;
}

.ck-market-stat-card span {
    display: block;
    margin-bottom: 0.2rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.ck-market-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.24rem;
    line-height: 1.22;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.ck-market-stat-card small {
    display: block;
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tools */
.ck-market-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin-top: 1.35rem;
    padding: 1rem;
    border-radius: 1.15rem;
    background: #ffffff;
    border: 1px solid #e5eaf3;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.025),
        0 10px 24px rgba(15, 23, 42, 0.035);
}

.ck-market-tabs {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    min-width: 0;
}

.ck-market-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    height: 2.45rem;
    padding: 0 0.92rem;
    border-radius: 999px;
    border: 1px solid #e5eaf3;
    background: #ffffff;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 0.18s ease,
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.ck-market-tab:hover {
    transform: translateY(-1px);
    color: var(--ck-accent);
    border-color: var(--ck-accent-border);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
}

.ck-market-tab.active-blue {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

.ck-market-tab.active-green {
    color: #ffffff;
    background: #16a34a;
    border-color: #16a34a;
}

.ck-market-tab.active-red {
    color: #ffffff;
    background: #dc2626;
    border-color: #dc2626;
}

.ck-market-search {
    width: min(430px, 100%);
    flex-shrink: 0;
}

.ck-market-search input,
.ck-market-search .coin-search-input,
.ck-market-search input[type="text"],
.ck-market-search input[type="search"] {
    width: 100%;
    min-height: 2.7rem;
    border-radius: 0.85rem !important;
    border: 1px solid #dbe3ef !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 0.92rem;
    font-weight: 400;
    box-shadow: none !important;
}

.ck-market-search input:focus,
.ck-market-search .coin-search-input:focus,
.ck-market-search input[type="text"]:focus,
.ck-market-search input[type="search"]:focus {
    background: #ffffff !important;
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.085) !important;
    outline: none !important;
}

/* Table panel */
.ck-market-table-panel {
    width: 100%;
    max-width: 100%;
    margin-top: 1.35rem;
    overflow: hidden;
    border-radius: 1.15rem;
    background: #ffffff;
    border: 1px solid #e5eaf3;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.025),
        0 12px 30px rgba(15, 23, 42, 0.04);
}

.ck-market-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.ck-market-table-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.012em;
}

.ck-market-table-head p {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.5;
}

.ck-market-table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ck-market-table-actions button,
.ck-market-table-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.1rem;
    padding: 0 0.75rem;
    border-radius: 0.7rem;
    border: 1px solid #e5eaf3;
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 550;
    text-decoration: none;
}

/* Desktop table */
.ck-market-desktop-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.ck-market-table {
    width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.ck-market-table--default {
    min-width: 1180px;
}

.ck-market-table--hilo {
    min-width: 1120px;
}

.ck-market-table thead th {
    height: 3.25rem;
    padding: 0 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    color: #64748b;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ck-market-table tbody td {
    height: 3.5rem;
    padding: 0 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 400;
    white-space: nowrap;
    vertical-align: middle;
}

.ck-market-table tbody tr:hover {
    background: #f8fbff;
}

.ck-market-table tbody tr:last-child td {
    border-bottom: 0;
}

.ck-market-table .right {
    text-align: right;
}

.ck-market-table .rank-col,
.ck-market-table .rank-cell {
    width: 56px;
    min-width: 56px;
    text-align: center;
}

.ck-market-table .name-col,
.ck-market-table .name-cell {
    width: 240px;
    min-width: 240px;
}

.ck-market-table .price-col,
.ck-market-table .price-cell {
    width: 130px;
    min-width: 130px;
}

.ck-market-table .change-col {
    width: 92px;
    min-width: 92px;
}

.ck-market-table .range-col {
    width: 145px;
    min-width: 145px;
}

.ck-market-table .market-col {
    width: 145px;
    min-width: 145px;
}

.ck-market-table .volume-col {
    width: 145px;
    min-width: 145px;
}

.ck-market-table .chart-col,
.ck-market-table .chart-cell {
    width: 120px;
    min-width: 120px;
}

.ck-market-table .action-col,
.ck-market-table .action-cell {
    width: 115px;
    min-width: 115px;
}

.ck-market-table .star-col,
.ck-market-table .star-cell {
    width: 60px;
    min-width: 60px;
    text-align: center;
}

.ck-live-updated {
    animation: ckLiveUpdated 0.9s ease;
}

@keyframes ckLiveUpdated {
    0% {
        background-color: rgba(37, 99, 235, 0.12);
    }

    100% {
        background-color: transparent;
    }
}

.dark .ck-live-updated {
    animation: ckLiveUpdatedDark 0.9s ease;
}

@keyframes ckLiveUpdatedDark {
    0% {
        background-color: rgba(96, 165, 250, 0.16);
    }

    100% {
        background-color: transparent;
    }
}

.ck-live-updated {
    animation: ckLiveUpdated 0.9s ease;
}

.ck-live-updated-up {
    animation: ckLiveUpdatedUp 0.9s ease;
}

.ck-live-updated-down {
    animation: ckLiveUpdatedDown 0.9s ease;
}

@keyframes ckLiveUpdated {
    0% {
        background-color: rgba(37, 99, 235, 0.12);
    }

    100% {
        background-color: transparent;
    }
}

@keyframes ckLiveUpdatedUp {
    0% {
        background-color: rgba(22, 163, 74, 0.16);
        color: #16a34a;
    }

    100% {
        background-color: transparent;
    }
}

@keyframes ckLiveUpdatedDown {
    0% {
        background-color: rgba(220, 38, 38, 0.16);
        color: #dc2626;
    }

    100% {
        background-color: transparent;
    }
}
/* Coin */
.rank-cell {
    color: #64748b !important;
    font-weight: 500 !important;
}

.ck-market-coin {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.ck-market-coin-logo {
    position: relative;
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.ck-market-coin-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ck-market-coin-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ck-accent), #14b8a6);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
}

.ck-market-coin-fallback.hidden {
    display: none;
}

.ck-market-coin-info {
    min-width: 0;
}

.ck-market-coin-info strong {
    display: block;
    max-width: 170px;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.25;
    font-weight: 580;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-market-coin-info span {
    display: block;
    margin-top: 0.14rem;
    color: #64748b;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 500;
    text-transform: uppercase;
}

/* =================================
   Market Table Sort Links
================================= */
.ck-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
}

.ck-sort-link:hover {
    color: #2563eb;
    text-decoration: none;
}

.dark .ck-sort-link:hover {
    color: #60a5fa;
}

.ck-sort-link i {
    font-size: 0.7rem;
    opacity: 0.72;
}

.ck-market--new .ck-market-eyebrow {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.14);
    color: #2563eb;
}

/* =================================
   Market Table Sort Links
   Global for All / Top / New pages
================================= */

.ck-market-table th .ck-sort-link,
.ck-market-mobile-table th .ck-sort-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
    color: inherit !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.ck-market-table th .ck-sort-link:hover,
.ck-market-mobile-table th .ck-sort-link:hover {
    color: #2563eb !important;
    text-decoration: none !important;
}

.dark .ck-market-table th .ck-sort-link:hover,
.dark .ck-market-mobile-table th .ck-sort-link:hover {
    color: #60a5fa !important;
}

.ck-market-table th .ck-sort-link span,
.ck-market-mobile-table th .ck-sort-link span {
    display: inline-flex !important;
    align-items: center !important;
}

/* Hide old text arrows: ↕ ↓ ↑ */
.ck-market-table th .ck-sort-link em,
.ck-market-mobile-table th .ck-sort-link em {
    position: relative !important;
    width: 10px !important;
    height: 14px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
    margin-left: 0.08rem !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    font-style: normal !important;
    overflow: hidden !important;
}

/* Default double arrow */
.ck-market-table th .ck-sort-link em::before,
.ck-market-table th .ck-sort-link em::after,
.ck-market-mobile-table th .ck-sort-link em::before,
.ck-market-mobile-table th .ck-sort-link em::after {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: #94a3b8 !important;
    font-size: 8px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
    opacity: 0.62 !important;
}

.ck-market-table th .ck-sort-link em::before,
.ck-market-mobile-table th .ck-sort-link em::before {
    content: "▲" !important;
    top: 0 !important;
}

.ck-market-table th .ck-sort-link em::after,
.ck-market-mobile-table th .ck-sort-link em::after {
    content: "▼" !important;
    bottom: 0 !important;
}

/* Active column */
.ck-market-table th .ck-sort-link.is-active,
.ck-market-mobile-table th .ck-sort-link.is-active {
    color: #2563eb !important;
}

.dark .ck-market-table th .ck-sort-link.is-active,
.dark .ck-market-mobile-table th .ck-sort-link.is-active {
    color: #60a5fa !important;
}

.ck-market-table th .ck-sort-link.is-active em::before,
.ck-market-table th .ck-sort-link.is-active em::after,
.ck-market-mobile-table th .ck-sort-link.is-active em::before,
.ck-market-mobile-table th .ck-sort-link.is-active em::after {
    color: #2563eb !important;
    opacity: 1 !important;
}

.dark .ck-market-table th .ck-sort-link.is-active em::before,
.dark .ck-market-table th .ck-sort-link.is-active em::after,
.dark .ck-market-mobile-table th .ck-sort-link.is-active em::before,
.dark .ck-market-mobile-table th .ck-sort-link.is-active em::after {
    color: #60a5fa !important;
}

/* Desc active */
.ck-market-table th .ck-sort-link.is-desc em::before,
.ck-market-mobile-table th .ck-sort-link.is-desc em::before {
    opacity: 0.25 !important;
}

.ck-market-table th .ck-sort-link.is-desc em::after,
.ck-market-mobile-table th .ck-sort-link.is-desc em::after {
    opacity: 1 !important;
}

/* Asc active */
.ck-market-table th .ck-sort-link.is-asc em::before,
.ck-market-mobile-table th .ck-sort-link.is-asc em::before {
    opacity: 1 !important;
}

.ck-market-table th .ck-sort-link.is-asc em::after,
.ck-market-mobile-table th .ck-sort-link.is-asc em::after {
    opacity: 0.25 !important;
}

/* Right column alignment */
.ck-market-table th.right .ck-sort-link,
.ck-market-mobile-table th.right .ck-sort-link {
    justify-content: flex-end !important;
    margin-left: auto !important;
}

/* Mobile */
@media (max-width: 768px) {
    .ck-market-mobile-table th .ck-sort-link {
        gap: 0.28rem !important;
    }

    .ck-market-mobile-table th .ck-sort-link em {
        width: 9px !important;
        height: 13px !important;
    }

    .ck-market-mobile-table th .ck-sort-link em::before,
    .ck-market-mobile-table th .ck-sort-link em::after {
        font-size: 7px !important;
    }
}

/* Value states */
.price-cell {
    font-weight: 580 !important;
    font-variant-numeric: tabular-nums;
}

.muted-cell {
    color: #334155 !important;
    font-weight: 450 !important;
}

.low-cell {
    color: #dc2626 !important;
    font-weight: 550 !important;
}

.high-cell {
    color: #16a34a !important;
    font-weight: 550 !important;
}

.change-text {
    font-size: 0.86rem;
    font-weight: 500;
}

.change-text.up {
    color: #16a34a;
}

.change-text.down {
    color: #dc2626;
}

.change-text.neutral {
    color: #64748b;
}

.change-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.8rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.change-pill.up {
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
}

.change-pill.down {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
}

.change-pill.neutral {
    color: #64748b;
    background: rgba(100, 116, 139, 0.1);
}

/* Sparkline */
.ck-market-sparkline {
    display: inline-flex;
    width: 92px;
    height: 34px;
    align-items: center;
    justify-content: flex-end;
}

.ck-market-sparkline svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Buy menu */
.ck-market-buy {
    position: relative;
    display: inline-block;
}

.ck-market-buy button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2rem;
    padding: 0 0.65rem;
    border: 0;
    border-radius: 0.65rem;
    background: var(--ck-accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 550;
}

.ck-market-buy-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 20;
    width: 12rem;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #e5eaf3;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.ck-market-buy-menu a {
    display: block;
    padding: 0.6rem 0.8rem;
    color: #334155;
    font-size: 0.82rem;
    text-decoration: none;
}

.ck-market-buy-menu a:hover {
    background: #f8fafc;
}

.ck-market-star {
    color: #94a3b8;
    transition: color 0.18s ease;
}

.ck-market-star:hover,
.ck-market-star.active {
    color: #f59e0b;
}

/* Mobile table */
.ck-market-mobile-table-wrap {
    display: none;
    width: 100%;
    overflow: hidden;
}

.ck-market-mobile-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.ck-market-mobile-table thead th {
    height: 2.85rem;
    padding: 0 0.55rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ck-market-mobile-table tbody td {
    height: 4.35rem;
    padding: 0 0.55rem;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 0.82rem;
    vertical-align: middle;
    background: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ck-market-mobile-table tbody tr:last-child td {
    border-bottom: 0;
}

.ck-market-mobile-table .right {
    text-align: right;
}

.ck-market-mobile-coin {
    display: flex;
    align-items: center;
    gap: 0.52rem;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.ck-market-mobile-coin .ck-market-coin-logo {
    width: 1.85rem;
    height: 1.85rem;
}

.ck-market-mobile-coin-info {
    min-width: 0;
}

.ck-market-mobile-coin-info strong {
    display: block;
    max-width: 96px;
    overflow: hidden;
    color: #0f172a;
    font-size: 0.82rem;
    line-height: 1.22;
    font-weight: 580;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ck-market-mobile-coin-info span {
    display: block;
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 500;
    text-transform: uppercase;
}

.mobile-rank-cell {
    color: #64748b !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    text-align: center;
}

.mobile-price-cell {
    color: #0f172a !important;
    font-size: 0.78rem !important;
    font-weight: 580 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mobile-low-cell {
    color: #dc2626 !important;
    font-size: 0.72rem !important;
    font-weight: 580 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mobile-high-cell {
    color: #16a34a !important;
    font-size: 0.72rem !important;
    font-weight: 580 !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Mobile variants */
.ck-market-mobile-table--default th:nth-child(1),
.ck-market-mobile-table--default td:nth-child(1) {
    width: 42px;
}

.ck-market-mobile-table--default th:nth-child(2),
.ck-market-mobile-table--default td:nth-child(2) {
    width: auto;
}

.ck-market-mobile-table--default th:nth-child(3),
.ck-market-mobile-table--default td:nth-child(3) {
    width: 106px;
}

.ck-market-mobile-table--default th:nth-child(4),
.ck-market-mobile-table--default td:nth-child(4) {
    width: 72px;
}

.ck-market-mobile-table--hilo th:nth-child(1),
.ck-market-mobile-table--hilo td:nth-child(1) {
    width: auto;
}

.ck-market-mobile-table--hilo th:nth-child(2),
.ck-market-mobile-table--hilo td:nth-child(2) {
    width: 92px;
}

.ck-market-mobile-table--hilo th:nth-child(3),
.ck-market-mobile-table--hilo td:nth-child(3) {
    width: 96px;
}

/* Empty */
.ck-market-empty {
    padding: 3.2rem 1rem;
    text-align: center;
}

.ck-market-empty i {
    display: block;
    margin-bottom: 0.8rem;
    color: #94a3b8;
    font-size: 2.4rem;
}

.ck-market-empty h3 {
    margin: 0;
    color: #334155;
    font-size: 1rem;
    font-weight: 600;
}

.ck-market-empty p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.86rem;
}

/* Pagination */
.ck-market-pagination {
    width: 100%;
    margin-top: 1.45rem;
}

.ck-market-pagination nav > div:first-child {
    display: none;
}

.ck-market-pagination nav > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ck-market-pagination a,
.ck-market-pagination span {
    border-radius: 0.75rem !important;
    border-color: #e5eaf3 !important;
    color: #475569 !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.ck-market-pagination a:hover {
    color: var(--ck-accent) !important;
    background: var(--ck-accent-soft) !important;
    border-color: var(--ck-accent-border) !important;
}

.ck-market-pagination span[aria-current="page"] span,
.ck-market-pagination .active span,
.ck-market-pagination [aria-current="page"] {
    color: #ffffff !important;
    background: var(--ck-accent) !important;
    border-color: var(--ck-accent) !important;
}

/* Dark mode */
html.dark .ck-market-page,
html.dark .ck-market-hero,
html.dark .ck-market-main {
    background: #0f172a !important;
}

html.dark .ck-market-hero {
    border-bottom-color: rgba(51, 65, 85, 0.72);
}

html.dark .ck-market-hero h1,
html.dark .ck-market-stat-card strong,
html.dark .ck-market-table-head h2,
html.dark .ck-market-coin-info strong,
html.dark .ck-market-table tbody td,
html.dark .ck-market-mobile-coin-info strong,
html.dark .mobile-price-cell {
    color: #f8fafc !important;
}

html.dark .ck-market-hero p,
html.dark .ck-market-stat-card span,
html.dark .ck-market-stat-card small,
html.dark .ck-market-table-head p,
html.dark .ck-market-coin-info span,
html.dark .rank-cell,
html.dark .muted-cell,
html.dark .ck-market-mobile-coin-info span,
html.dark .mobile-rank-cell {
    color: #94a3b8 !important;
}

html.dark .ck-market-stat-card,
html.dark .ck-market-tools,
html.dark .ck-market-table-panel {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(51, 65, 85, 0.75);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
}

html.dark .ck-market-tab {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.9);
    color: #cbd5e1;
}

html.dark .ck-market-search input,
html.dark .ck-market-search .coin-search-input,
html.dark .ck-market-search input[type="text"],
html.dark .ck-market-search input[type="search"] {
    background: #020617 !important;
    border-color: rgba(51, 65, 85, 0.95) !important;
    color: #f8fafc !important;
}

html.dark .ck-market-table-head {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    border-bottom-color: rgba(51, 65, 85, 0.72);
}

html.dark .ck-market-table thead th,
html.dark .ck-market-mobile-table thead th {
    background: #020617;
    border-bottom-color: rgba(51, 65, 85, 0.75);
    color: #94a3b8;
}

html.dark .ck-market-table tbody td,
html.dark .ck-market-mobile-table tbody td {
    background: #0f172a;
    border-bottom-color: rgba(51, 65, 85, 0.55);
}

html.dark .ck-market-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.52);
}

html.dark .ck-market-coin-logo {
    background: #1e293b;
}

html.dark .ck-market-buy-menu {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.9);
}

html.dark .ck-market-buy-menu a {
    color: #cbd5e1;
}

html.dark .ck-market-buy-menu a:hover {
    background: #111827;
}

html.dark .mobile-low-cell {
    color: #f87171 !important;
}

html.dark .mobile-high-cell {
    color: #4ade80 !important;
}

html.dark .ck-market-pagination a,
html.dark .ck-market-pagination span {
    background: #0f172a !important;
    border-color: rgba(51, 65, 85, 0.9) !important;
    color: #cbd5e1 !important;
}

/* Tablet */
@media (max-width: 1280px) {
    .ck-market-page .container-modern {
        max-width: 1180px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .ck-market-table .chart-col,
    .ck-market-table .chart-cell {
        display: none;
    }
}

@media (max-width: 1080px) {
    .ck-market-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ck-market-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .ck-market-search {
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .ck-market-page .container-modern {
        width: 100%;
        max-width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }

    .ck-market-hero {
        padding: 2.8rem 0 2.4rem;
    }

    .ck-market-hero-inner {
        max-width: 100%;
    }

    .ck-market-hero h1 {
        font-size: 2rem;
        line-height: 1.08;
        font-weight: 620;
        letter-spacing: -0.032em;
    }

    .ck-market-hero p {
        font-size: 0.92rem;
        line-height: 1.62;
    }

    .ck-market-main {
        padding-bottom: 4rem;
    }

    .ck-market-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: -1.1rem;
    }

    .ck-market-stat-card {
        padding: 0.95rem;
        border-radius: 1rem;
    }

    .ck-market-stat-card strong {
        font-size: 1.14rem;
    }

    .ck-market-tools {
        align-items: stretch;
        flex-direction: column;
        margin-top: 1rem;
        padding: 0.82rem;
        border-radius: 1rem;
    }

    .ck-market-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        width: 100%;
    }

    .ck-market-tab {
        width: 100%;
        height: 2.35rem;
        padding: 0 0.65rem;
        font-size: 0.78rem;
        font-weight: 500;
    }

    .ck-market-search {
        width: 100%;
    }

    .ck-market-search input,
    .ck-market-search .coin-search-input,
    .ck-market-search input[type="text"],
    .ck-market-search input[type="search"] {
        min-height: 2.75rem !important;
        height: 2.75rem !important;
        font-size: 0.9rem !important;
    }

    .ck-market-table-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem;
    }

    .ck-market-table-head h2 {
        font-size: 0.98rem;
    }

    .ck-market-table-head p {
        font-size: 0.82rem;
    }

    .ck-market-table-actions {
        display: none;
    }

    .ck-market-desktop-table {
        display: none !important;
    }

    .ck-market-mobile-table-wrap {
        display: block;
    }

    .ck-market-coin-logo {
        width: 2rem;
        height: 2rem;
    }

    .ck-market-pagination {
        margin-top: 1rem;
    }

    .ck-market-pagination nav > div:last-child {
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 390px) {
    .ck-market-page .container-modern {
        padding-left: 10px;
        padding-right: 10px;
    }

    .ck-market-mobile-table thead th,
    .ck-market-mobile-table tbody td {
        padding-left: 0.38rem;
        padding-right: 0.38rem;
    }

    .ck-market-mobile-table--default th:nth-child(1),
    .ck-market-mobile-table--default td:nth-child(1) {
        width: 36px;
    }

    .ck-market-mobile-table--default th:nth-child(3),
    .ck-market-mobile-table--default td:nth-child(3) {
        width: 100px;
    }

    .ck-market-mobile-table--default th:nth-child(4),
    .ck-market-mobile-table--default td:nth-child(4) {
        width: 66px;
    }

    .ck-market-mobile-table--hilo th:nth-child(2),
    .ck-market-mobile-table--hilo td:nth-child(2) {
        width: 84px;
    }

    .ck-market-mobile-table--hilo th:nth-child(3),
    .ck-market-mobile-table--hilo td:nth-child(3) {
        width: 88px;
    }

    .ck-market-mobile-coin-info strong {
        max-width: 78px;
        font-size: 0.78rem;
    }

    .mobile-price-cell {
        font-size: 0.76rem !important;
    }

    .mobile-low-cell,
    .mobile-high-cell {
        font-size: 0.66rem !important;
    }
}

/* High / Low mobile ATH / ATL */
.ck-market-mobile-athatl {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    margin-top: 0.32rem;
}

.ck-market-mobile-athatl span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    line-height: 1.1;
    white-space: nowrap;
}

.ck-market-mobile-athatl em {
    flex: 0 0 auto;
    font-style: normal;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.ck-market-mobile-athatl b {
    display: block;
    min-width: 0;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.64rem;
    font-weight: 800;
}

.ck-market-mobile-athatl .atl b {
    color: #dc2626;
}

.ck-market-mobile-athatl .ath b {
    color: #16a34a;
}

html.dark .ck-market-mobile-athatl em {
    color: #94a3b8;
}

html.dark .ck-market-mobile-athatl .atl b {
    color: #f87171;
}

html.dark .ck-market-mobile-athatl .ath b {
    color: #4ade80;
}
/* =================================
   Market Tabs Active + Hover Fix
   Light / Dark Unified
================================= */

/* Base transition */
.ck-market-tab {
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease !important;
}

/* ================================
   Light Mode - Normal Hover
================================ */

.ck-market-tab:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.28) !important;
    color: #2563eb !important;
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.05),
        0 8px 20px rgba(37, 99, 235, 0.10) !important;
    transform: translateY(-1px);
}

.ck-market-tab:hover i {
    color: #2563eb !important;
}

/* ================================
   Light Mode - Active
================================ */

.ck-market-tab.active-blue {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22) !important;
}

.ck-market-tab.active-green {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22) !important;
}

.ck-market-tab.active-red {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.22) !important;
}

.ck-market-tab.active-blue i,
.ck-market-tab.active-green i,
.ck-market-tab.active-red i {
    color: #ffffff !important;
}

/* ================================
   Light Mode - Active Hover
================================ */

.ck-market-tab.active-blue:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.30) !important;
    transform: translateY(-1px);
}

.ck-market-tab.active-green:hover {
    background: #15803d !important;
    border-color: #15803d !important;
    color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(22, 163, 74, 0.30) !important;
    transform: translateY(-1px);
}

.ck-market-tab.active-red:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.30) !important;
    transform: translateY(-1px);
}

.ck-market-tab.active-blue:hover i,
.ck-market-tab.active-green:hover i,
.ck-market-tab.active-red:hover i {
    color: #ffffff !important;
}

/* ================================
   Dark Mode - Normal
================================ */

html.dark .ck-market-tab {
    background: #0f172a !important;
    border-color: rgba(51, 65, 85, 0.9) !important;
    color: #cbd5e1 !important;
}

/* ================================
   Dark Mode - Normal Hover
================================ */

html.dark .ck-market-tab:hover {
    background: rgba(37, 99, 235, 0.14) !important;
    border-color: rgba(96, 165, 250, 0.42) !important;
    color: #dbeafe !important;
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.08),
        0 10px 24px rgba(37, 99, 235, 0.18) !important;
    transform: translateY(-1px);
}

html.dark .ck-market-tab:hover i {
    color: #93c5fd !important;
}

/* ================================
   Dark Mode - Active
================================ */

html.dark .ck-market-tab.active-blue {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.30) !important;
}

html.dark .ck-market-tab.active-green {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.30) !important;
}

html.dark .ck-market-tab.active-red {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.30) !important;
}

html.dark .ck-market-tab.active-blue i,
html.dark .ck-market-tab.active-green i,
html.dark .ck-market-tab.active-red i {
    color: #ffffff !important;
}

/* ================================
   Dark Mode - Active Hover
================================ */

html.dark .ck-market-tab.active-blue:hover {
    background: #1d4ed8 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.16),
        0 14px 30px rgba(37, 99, 235, 0.38) !important;
    transform: translateY(-1px);
}

html.dark .ck-market-tab.active-green:hover {
    background: #15803d !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 1px rgba(34, 197, 94, 0.16),
        0 14px 30px rgba(22, 163, 74, 0.38) !important;
    transform: translateY(-1px);
}

html.dark .ck-market-tab.active-red:hover {
    background: #b91c1c !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 1px rgba(239, 68, 68, 0.16),
        0 14px 30px rgba(220, 38, 38, 0.38) !important;
    transform: translateY(-1px);
}

html.dark .ck-market-tab.active-blue:hover i,
html.dark .ck-market-tab.active-green:hover i,
html.dark .ck-market-tab.active-red:hover i {
    color: #ffffff !important;
}

/* =================================
   Exchanges Page
================================= */

.ck-exchanges-page {
    width: 100%;
    background: #ffffff;
}

.dark .ck-exchanges-page {
    background: #0f172a;
}

/* Hero */
.ck-exchanges-hero {
    width: 100%;
    padding: 3.8rem 0 2.4rem;
    background: #ffffff;
    border-bottom: 1px solid #eef2f7;
}

.dark .ck-exchanges-hero {
    background: #0f172a;
    border-bottom-color: rgba(51, 65, 85, 0.55);
}

.ck-exchanges-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.ck-exchanges-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: #2563eb;
    font-size: 0.74rem;
    font-weight: 650;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.dark .ck-exchanges-eyebrow {
    background: rgba(37, 99, 235, 0.13);
    border-color: rgba(96, 165, 250, 0.24);
    color: #93c5fd;
}

.ck-exchanges-hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.25rem, 4vw, 3.4rem);
    line-height: 1.06;
    font-weight: 720;
    letter-spacing: -0.045em;
}

.dark .ck-exchanges-hero h1 {
    color: #f8fafc;
}

.ck-exchanges-hero p {
    max-width: 620px;
    margin: 1rem auto 0;
    color: #64748b;
    font-size: 1.02rem;
    line-height: 1.7;
}

.dark .ck-exchanges-hero p {
    color: #94a3b8;
}

/* Section */
.ck-exchanges-section {
    width: 100%;
    padding: 2rem 0 4rem;
    background: #ffffff;
}

.dark .ck-exchanges-section {
    background: #0f172a;
}

/* Search */
.ck-exchanges-search-wrap {
    width: 100%;
    margin-bottom: 1.8rem;
    display: flex;
    justify-content: center;
}

.ck-exchanges-search {
    position: relative;
    width: 100%;
    max-width: 460px;
}

.ck-exchanges-search input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.8rem;
    border-radius: 12px;
    border: 1px solid #dbe3ef;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.ck-exchanges-search input::placeholder {
    color: #94a3b8;
}

.ck-exchanges-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.dark .ck-exchanges-search input {
    background: #111827;
    border-color: rgba(51, 65, 85, 0.9);
    color: #f8fafc;
}

.dark .ck-exchanges-search input::placeholder {
    color: #64748b;
}

.dark .ck-exchanges-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.ck-exchanges-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.dark .ck-exchanges-search-icon {
    color: #64748b;
}

/* Grid */
.ck-exchanges-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

/* Card */
.ck-exchange-card {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #e5eaf3;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.025),
        0 8px 24px rgba(15, 23, 42, 0.035);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.ck-exchange-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow:
        0 12px 30px rgba(37, 99, 235, 0.08),
        0 3px 8px rgba(15, 23, 42, 0.045);
}

.dark .ck-exchange-card {
    background: #111827;
    border-color: rgba(51, 65, 85, 0.85);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.22);
}

.dark .ck-exchange-card:hover {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(37, 99, 235, 0.12);
}

.ck-exchange-logo-box {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #eef2f7;
}

.dark .ck-exchange-logo-box {
    background: #0f172a;
    border-bottom-color: rgba(51, 65, 85, 0.7);
}

.ck-exchange-logo-box img {
    max-width: 64px;
    max-height: 44px;
    object-fit: contain;
    transition: transform 0.18s ease;
}

.ck-exchange-card:hover .ck-exchange-logo-box img {
    transform: scale(1.06);
}

.ck-exchange-name-box {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.75rem;
}

.ck-exchange-name-box h3 {
    margin: 0;
    width: 100%;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 680;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .ck-exchange-name-box h3 {
    color: #f8fafc;
}

/* Empty */
.ck-exchanges-empty {
    padding: 4rem 0;
    text-align: center;
}

.ck-exchanges-empty-icon {
    margin-bottom: 1rem;
    color: #cbd5e1;
    font-size: 3rem;
}

.dark .ck-exchanges-empty-icon {
    color: #475569;
}

.ck-exchanges-empty p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.dark .ck-exchanges-empty p {
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 1280px) {
    .ck-exchanges-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .ck-exchanges-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .ck-exchanges-hero {
        padding: 2.8rem 0 1.8rem;
    }

    .ck-exchanges-hero h1 {
        font-size: 2rem;
        line-height: 1.12;
        letter-spacing: -0.035em;
    }

    .ck-exchanges-hero p {
        font-size: 0.94rem;
        line-height: 1.65;
    }

    .ck-exchanges-section {
        padding: 1.5rem 0 3rem;
    }

    .ck-exchanges-search-wrap {
        margin-bottom: 1.3rem;
    }

    .ck-exchanges-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .ck-exchange-logo-box {
        height: 86px;
        padding: 1rem;
    }

    .ck-exchange-logo-box img {
        max-width: 58px;
        max-height: 40px;
    }

    .ck-exchange-name-box {
        min-height: 48px;
        padding: 0.75rem 0.6rem;
    }

    .ck-exchange-name-box h3 {
        font-size: 0.86rem;
    }
}

@media (max-width: 420px) {
    .ck-exchanges-grid {
        gap: 0.7rem;
    }

    .ck-exchange-card {
        border-radius: 12px;
    }

    .ck-exchange-logo-box {
        height: 78px;
    }
}