   :root {
       --bg-primary: #f8fafc;
       --bg-secondary: #ffffff;
       --bg-tertiary: #f1f5f9;
       --text-primary: #0f172a;
       --text-secondary: #475569;
       --text-tertiary: #94a3b8;
       --border-color: #e2e8f0;
       --glass-bg: rgba(255, 255, 255, 0.85);
       --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
       --sidebar-width: 260px;
       --sidebar-collapsed: 80px;
       --header-height: 72px;
   }

   html.dark {
       --bg-primary: #0a0e1a;
       --bg-secondary: #111827;
       --bg-tertiary: #1a2035;
       --text-primary: #f1f5f9;
       --text-secondary: #94a3b8;
       --text-tertiary: #64748b;
       --border-color: rgba(255, 255, 255, 0.08);
       --glass-bg: rgba(17, 24, 39, 0.85);
   }

   * {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
   }

   html {
       scroll-behavior: smooth;
       -webkit-text-size-adjust: 100%;
   }

   body {
       font-family: 'Inter', sans-serif;
       background-color: var(--bg-primary);
       color: var(--text-primary);
       overflow-x: hidden;
       line-height: 1.5;
       -webkit-font-smoothing: antialiased;
   }

   ::-webkit-scrollbar {
       width: 6px;
       height: 6px;
   }

   ::-webkit-scrollbar-track {
       background: transparent;
   }

   ::-webkit-scrollbar-thumb {
       background: var(--text-tertiary);
       border-radius: 10px;
   }

   .crypto-card {
       background: var(--bg-secondary);
       border: 1px solid var(--border-color);
       border-radius: 16px;
       transition: all 0.3s ease;
       position: relative;
       overflow: hidden;
   }

   .crypto-card:hover {
       transform: translateY(-2px);
       box-shadow: var(--shadow-xl);
       border-color: rgba(59, 130, 246, 0.2);
   }

   .sidebar {
       width: var(--sidebar-width);
       transition: width 0.3s ease, transform 0.3s ease;
       z-index: 60;
       position: fixed;
       left: 0;
       top: 0;
       height: 100vh;
   }

   .sidebar.collapsed {
       width: var(--sidebar-collapsed);
   }

   .sidebar.collapsed .sidebar-label,
   .sidebar.collapsed .sidebar-logo-text,
   .sidebar.collapsed .sidebar-badge,
   .sidebar.collapsed .sidebar-section-title,
   .sidebar.collapsed .sidebar-pro-card {
       display: none;
   }

   .sidebar.collapsed .sidebar-item {
       justify-content: center;
       padding-left: 0;
       padding-right: 0;
   }

   .sidebar-item {
       display: flex;
       align-items: center;
       padding: 10px 16px;
       border-radius: 12px;
       cursor: pointer;
       transition: all 0.2s ease;
       color: var(--text-secondary);
       position: relative;
       margin: 2px 0;
       gap: 12px;
       text-decoration: none;
       font-size: 14px;
       font-weight: 500;
   }

   .sidebar-item:hover {
       background: rgba(59, 130, 246, 0.08);
       color: var(--text-primary);
   }

   .sidebar-item.active {
       background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
       color: #3b82f6;
       font-weight: 600;
   }

   .sidebar-item.active::before {
       content: '';
       position: absolute;
       left: 0;
       top: 50%;
       transform: translateY(-50%);
       width: 3px;
       height: 24px;
       background: linear-gradient(180deg, #3b82f6, #8b5cf6);
       border-radius: 0 4px 4px 0;
   }

   @media (max-width: 1023px) {
       .sidebar {
           width: 280px !important;
           transform: translateX(-100%);
           box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
       }

       .sidebar.mobile-open {
           transform: translateX(0);
       }

       .sidebar.collapsed {
           width: 280px !important;
       }

       .sidebar.collapsed .sidebar-label,
       .sidebar.collapsed .sidebar-logo-text,
       .sidebar.collapsed .sidebar-badge,
       .sidebar.collapsed .sidebar-section-title,
       .sidebar.collapsed .sidebar-pro-card {
           display: block;
       }

       .sidebar.collapsed .sidebar-item {
           justify-content: flex-start;
           padding-left: 16px;
           padding-right: 16px;
       }

       .main-content {
           margin-left: 0 !important;
       }
   }

   .sidebar-overlay {
       position: fixed;
       inset: 0;
       background: rgba(0, 0, 0, 0.6);
       backdrop-filter: blur(4px);
       z-index: 55;
       opacity: 0;
       visibility: hidden;
       transition: all 0.3s ease;
   }

   .sidebar-overlay.show {
       opacity: 1;
       visibility: visible;
   }

   .main-header {
       height: var(--header-height);
       background: var(--glass-bg);
       backdrop-filter: blur(20px);
       -webkit-backdrop-filter: blur(20px);
       border-bottom: 1px solid var(--border-color);
       z-index: 40;
       position: sticky;
       top: 0;
   }

   .btn {
       display: inline-flex;
       align-items: center;
       justify-content: center;
       gap: 8px;
       padding: 10px 20px;
       border-radius: 12px;
       font-weight: 600;
       font-size: 14px;
       cursor: pointer;
       transition: all 0.3s ease;
       border: none;
       outline: none;
       position: relative;
       overflow: hidden;
       white-space: nowrap;
   }

   .btn-primary {
       background: linear-gradient(135deg, #3b82f6, #2563eb);
       color: white;
       box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
   }

   .btn-primary:hover {
       transform: translateY(-1px);
       box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
   }

   .btn-ghost {
       background: transparent;
       color: var(--text-secondary);
       border: 1px solid var(--border-color);
   }

   .btn-ghost:hover {
       background: var(--bg-tertiary);
       color: var(--text-primary);
   }

   .btn-green {
       background: linear-gradient(135deg, #10b981, #059669);
       color: white;
       box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
   }

   .btn-red {
       background: linear-gradient(135deg, #ef4444, #dc2626);
       color: white;
       box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
   }

   .ripple {
       position: absolute;
       border-radius: 50%;
       background: rgba(255, 255, 255, 0.35);
       transform: scale(0);
       animation: ripple-animation 0.6s linear;
       pointer-events: none;
   }

   @keyframes ripple-animation {
       to {
           transform: scale(4);
           opacity: 0;
       }
   }

   .badge {
       display: inline-flex;
       align-items: center;
       gap: 4px;
       padding: 4px 10px;
       border-radius: 8px;
       font-size: 12px;
       font-weight: 600;
       line-height: 1;
   }

   .badge-green {
       background: rgba(16, 185, 129, 0.12);
       color: #10b981;
   }

   .badge-red {
       background: rgba(239, 68, 68, 0.12);
       color: #ef4444;
   }

   .badge-blue {
       background: rgba(59, 130, 246, 0.12);
       color: #3b82f6;
   }

   .badge-yellow {
       background: rgba(245, 158, 11, 0.12);
       color: #f59e0b;
   }

   .badge-purple {
       background: rgba(139, 92, 246, 0.12);
       color: #8b5cf6;
   }

   .dropdown-menu {
       position: absolute;
       top: calc(100% + 8px);
       right: 0;
       min-width: 220px;
       background: var(--bg-secondary);
       border: 1px solid var(--border-color);
       border-radius: 16px;
       box-shadow: var(--shadow-xl);
       opacity: 0;
       visibility: hidden;
       transform: translateY(-10px) scale(0.95);
       transition: all 0.2s ease;
       z-index: 100;
       padding: 8px;
   }

   .dropdown-menu.show {
       opacity: 1;
       visibility: visible;
       transform: translateY(0) scale(1);
   }

   .dropdown-item {
       display: flex;
       align-items: center;
       gap: 10px;
       padding: 10px 12px;
       border-radius: 10px;
       cursor: pointer;
       transition: all 0.2s ease;
       color: var(--text-secondary);
       font-size: 14px;
       font-weight: 500;
   }

   .dropdown-item:hover {
       background: var(--bg-tertiary);
       color: var(--text-primary);
   }

   .notification-panel {
       position: fixed;
       top: 0;
       right: -400px;
       width: 380px;
       max-width: 100vw;
       height: 100vh;
       background: var(--bg-secondary);
       border-left: 1px solid var(--border-color);
       z-index: 200;
       transition: right 0.3s ease;
       overflow-y: auto;
   }

   .notification-panel.open {
       right: 0;
   }

   .notification-overlay {
       position: fixed;
       inset: 0;
       background: rgba(0, 0, 0, 0.5);
       z-index: 199;
       opacity: 0;
       visibility: hidden;
       transition: all 0.3s ease;
   }

   .notification-overlay.show {
       opacity: 1;
       visibility: visible;
   }

   .search-modal,
   .modal-backdrop {
       position: fixed;
       inset: 0;
       z-index: 300;
       display: flex;
       align-items: flex-start;
       justify-content: center;
       padding-top: 12vh;
       opacity: 0;
       visibility: hidden;
       transition: all 0.3s ease;
   }

   .modal-backdrop {
       align-items: center;
       padding: 16px;
       z-index: 250;
   }

   .search-modal.show,
   .modal-backdrop.show {
       opacity: 1;
       visibility: visible;
   }

   .search-modal-overlay,
   .modal-overlay {
       position: absolute;
       inset: 0;
       background: rgba(0, 0, 0, 0.6);
       backdrop-filter: blur(8px);
   }

   .search-modal-content,
   .modal-content {
       position: relative;
       width: 90%;
       max-width: 640px;
       background: var(--bg-secondary);
       border: 1px solid var(--border-color);
       border-radius: 20px;
       box-shadow: var(--shadow-xl);
       transform: translateY(-20px) scale(0.95);
       transition: all 0.3s ease;
       overflow: hidden;
   }

   .modal-content {
       max-width: 500px;
       max-height: 90vh;
       overflow-y: auto;
   }

   .search-modal.show .search-modal-content,
   .modal-backdrop.show .modal-content {
       transform: translateY(0) scale(1);
   }

   .tab-btn {
       padding: 8px 16px;
       border-radius: 10px;
       font-size: 13px;
       font-weight: 500;
       cursor: pointer;
       transition: all 0.3s ease;
       color: var(--text-secondary);
       background: transparent;
       border: none;
       white-space: nowrap;
   }

   .tab-btn.active {
       background: linear-gradient(135deg, #3b82f6, #2563eb);
       color: white;
       box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
   }

   .tab-btn:not(.active):hover {
       background: var(--bg-tertiary);
       color: var(--text-primary);
   }

   .tab-content {
       display: none;
       animation: fadeIn 0.3s ease;
   }

   .tab-content.active {
       display: block;
   }

   @keyframes fadeIn {
       from {
           opacity: 0;
           transform: translateY(4px);
       }

       to {
           opacity: 1;
           transform: translateY(0);
       }
   }

   .data-table {
       width: 100%;
       border-collapse: separate;
       border-spacing: 0;
   }

   .data-table thead th {
       background: var(--bg-tertiary);
       padding: 12px 16px;
       font-size: 11px;
       font-weight: 600;
       text-transform: uppercase;
       letter-spacing: 0.05em;
       color: var(--text-tertiary);
       text-align: left;
       white-space: nowrap;
   }

   .data-table thead th:first-child {
       border-radius: 10px 0 0 10px;
   }

   .data-table thead th:last-child {
       border-radius: 0 10px 10px 0;
   }

   .data-table tbody tr {
       transition: all 0.2s ease;
       cursor: pointer;
   }

   .data-table tbody tr:hover {
       background: var(--bg-tertiary);
   }

   .data-table tbody td {
       padding: 14px 16px;
       font-size: 13px;
       border-bottom: 1px solid var(--border-color);
       white-space: nowrap;
   }

   .theme-switch {
       width: 46px;
       height: 26px;
       border-radius: 13px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-color);
       cursor: pointer;
       position: relative;
       transition: all 0.3s ease;
       flex-shrink: 0;
   }

   .theme-switch-thumb {
       width: 20px;
       height: 20px;
       border-radius: 50%;
       background: linear-gradient(135deg, #3b82f6, #8b5cf6);
       position: absolute;
       top: 2px;
       left: 2px;
       transition: all 0.3s ease;
       display: flex;
       align-items: center;
       justify-content: center;
   }

   html.dark .theme-switch-thumb {
       left: 22px;
   }

   .ticker-bar {
       overflow: hidden;
       white-space: nowrap;
   }

   .ticker-content {
       display: inline-flex;
       animation: ticker 40s linear infinite;
   }

   @keyframes ticker {
       from {
           transform: translateX(0);
       }

       to {
           transform: translateX(-50%);
       }
   }

   @media (max-width: 768px) {
       .notification-panel {
           width: 100vw;
           right: -100vw;
       }

       :root {
           --header-height: 64px;
       }
   }

   body.no-scroll {
       overflow: hidden;
   }

   html.dark .apexcharts-tooltip {
       background: #1e293b !important;
       border-color: rgba(255, 255, 255, 0.1) !important;
       color: #f1f5f9 !important;
   }

   html.dark .apexcharts-tooltip .apexcharts-tooltip-title {
       background: #0f172a !important;
       border-color: rgba(255, 255, 255, 0.1) !important;
   }

   .crypto-logo {
       width: 32px;
       height: 32px;
       border-radius: 50%;
       object-fit: contain;
       background: white;
       padding: 2px;
       flex-shrink: 0;
   }

   html.dark .crypto-logo {
       background: rgba(255, 255, 255, 0.9);
   }

   .crypto-logo-sm {
       width: 16px;
       height: 16px;
       border-radius: 50%;
       object-fit: contain;
       flex-shrink: 0;
   }

   .crypto-logo-md {
       width: 24px;
       height: 24px;
       border-radius: 50%;
       object-fit: contain;
       background: white;
       padding: 1.5px;
       flex-shrink: 0;
   }

   html.dark .crypto-logo-md {
       background: rgba(255, 255, 255, 0.9);
   }

   .crypto-logo-lg {
       width: 44px;
       height: 44px;
       border-radius: 50%;
       object-fit: contain;
       background: white;
       padding: 3px;
       flex-shrink: 0;
   }

   html.dark .crypto-logo-lg {
       background: rgba(255, 255, 255, 0.9);
   }

   .stat-icon {
       width: 44px;
       height: 44px;
       border-radius: 12px;
       display: flex;
       align-items: center;
       justify-content: center;
       flex-shrink: 0;
   }

   .search-input-wrapper {
       position: relative;
   }

   .search-input-wrapper input {
       width: 100%;
       padding: 10px 14px 10px 40px;
       background: var(--bg-tertiary);
       border: 1px solid var(--border-color);
       border-radius: 12px;
       font-size: 14px;
       color: var(--text-primary);
       outline: none;
       transition: all 0.2s ease;
   }

   .search-input-wrapper input:focus {
       border-color: #3b82f6;
   }

   .search-input-wrapper svg {
       position: absolute;
       left: 14px;
       top: 50%;
       transform: translateY(-50%);
       color: var(--text-tertiary);
   }

   .price-tag {
       font-family: 'JetBrains Mono', monospace, 'Inter';
   }

   .filter-chip {
       padding: 6px 14px;
       border-radius: 20px;
       font-size: 12px;
       font-weight: 500;
       cursor: pointer;
       transition: all 0.2s ease;
       background: var(--bg-tertiary);
       color: var(--text-secondary);
       border: 1px solid transparent;
       white-space: nowrap;
   }

   .filter-chip.active {
       background: linear-gradient(135deg, #3b82f6, #2563eb);
       color: white;
       border-color: transparent;
   }

   .filter-chip:not(.active):hover {
       border-color: var(--border-color);
       color: var(--text-primary);
   }

   /* Market Hero Section */
   .market-hero {
       background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 50%, rgba(236, 72, 153, 0.04) 100%);
       border: 1px solid rgba(59, 130, 246, 0.12);
       position: relative;
       overflow: hidden;
   }

   .market-hero::before {
       content: '';
       position: absolute;
       top: -30%;
       right: -10%;
       width: 400px;
       height: 400px;
       background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
       border-radius: 50%;
       pointer-events: none;
   }

   /* Trending Cards */
   .trending-card {
       background: var(--bg-secondary);
       border: 1px solid var(--border-color);
       border-radius: 14px;
       padding: 14px;
       transition: all 0.3s ease;
       cursor: pointer;
       min-width: 220px;
       flex-shrink: 0;
   }

   .trending-card:hover {
       transform: translateY(-2px);
       box-shadow: var(--shadow-xl);
       border-color: rgba(59, 130, 246, 0.3);
   }

   /* Sparkline canvas */
   .sparkline-canvas {
       display: block;
   }

   /* Sortable header */
   .sortable {
       cursor: pointer;
       user-select: none;
   }

   .sortable:hover {
       color: var(--text-primary);
   }

   .sort-indicator {
       display: inline-flex;
       flex-direction: column;
       margin-left: 4px;
       font-size: 8px;
       line-height: 0.7;
       opacity: 0.4;
   }

   .sortable.sort-asc .sort-indicator::before {
       content: '▲';
       color: #3b82f6;
       opacity: 1;
   }

   .sortable.sort-desc .sort-indicator::after {
       content: '▼';
       color: #3b82f6;
       opacity: 1;
   }

   .sortable:not(.sort-asc):not(.sort-desc) .sort-indicator::before {
       content: '▲';
   }

   .sortable:not(.sort-asc):not(.sort-desc) .sort-indicator::after {
       content: '▼';
   }

   /* Star favorite */
   .fav-btn {
       background: transparent;
       border: none;
       cursor: pointer;
       padding: 4px;
       border-radius: 6px;
       transition: all 0.2s ease;
       color: var(--text-tertiary);
   }

   .fav-btn:hover {
       background: var(--bg-tertiary);
       color: #f59e0b;
   }

   .fav-btn.active {
       color: #f59e0b;
   }

   /* Pagination */
   .page-btn {
       width: 32px;
       height: 32px;
       border-radius: 8px;
       font-size: 12px;
       font-weight: 600;
       cursor: pointer;
       transition: all 0.2s ease;
       background: transparent;
       color: var(--text-secondary);
       border: 1px solid var(--border-color);
   }

   .page-btn:hover:not(:disabled) {
       background: var(--bg-tertiary);
       color: var(--text-primary);
   }

   .page-btn.active {
       background: linear-gradient(135deg, #3b82f6, #2563eb);
       color: white;
       border-color: transparent;
   }

   .page-btn:disabled {
       opacity: 0.4;
       cursor: not-allowed;
   }

   /* Heatmap tile */
   .heatmap-tile {
       padding: 10px;
       border-radius: 10px;
       cursor: pointer;
       transition: all 0.2s ease;
       position: relative;
       overflow: hidden;
       min-height: 80px;
       display: flex;
       flex-direction: column;
       justify-content: space-between;
   }

   .heatmap-tile:hover {
       transform: scale(1.02);
       z-index: 2;
   }

   /* Category card */
   .category-card {
       padding: 14px;
       border-radius: 14px;
       border: 1px solid var(--border-color);
       background: var(--bg-secondary);
       cursor: pointer;
       transition: all 0.3s ease;
   }

   .category-card:hover {
       transform: translateY(-2px);
       border-color: rgba(59, 130, 246, 0.3);
       box-shadow: var(--shadow-xl);
   }

   /* News item */
   .news-item {
       display: flex;
       gap: 12px;
       padding: 12px;
       border-radius: 12px;
       cursor: pointer;
       transition: all 0.2s ease;
   }

   .news-item:hover {
       background: var(--bg-tertiary);
   }

   @media (max-width: 480px) {
       .crypto-card {
           border-radius: 12px;
       }

       .btn {
           padding: 8px 16px;
           font-size: 13px;
       }
   }

   .main-content{
    flex: 1;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.main-wrapper{
    display: flex;
    width: 100%;
    min-width: 0;
}

@media (min-width:1024px){
    .main-content{
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
}