/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
    line-height: 1.4;
    overflow-x: auto;
}

/* Container */
.container {
    width: 100%;
    min-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* NEW HEADER LAYOUT */
.header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 70px;
}

/* Header Left - Logo */
.header-left {
    flex: 0 0 auto;
}

.title {
    font-size: 24px;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0;
    white-space: nowrap;
}

/* Header Center - Status */
.header-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0 20px;
}

.status-text {
    font-size: 13px;
    color: #8b949e;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.progress-container {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: #21262d;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1f6feb, #388bfd);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Header Right - Controls */
.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Time Switcher */
.time-switcher {
    display: flex;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 2px;
}

.time-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
    white-space: nowrap;
}

.time-btn:hover {
    background: #30363d;
    color: #c9d1d9;
}

.time-btn.active {
    background: #238636;
    color: #ffffff;
    font-weight: 700;
}

/* Settings Button */
.settings-btn {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.settings-btn:hover {
    background: #30363d;
    border-color: #484f58;
}

.settings-btn svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.main-content {
    padding: 0;
    margin-top: 0;
}

/* Table Wrapper */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid #30363d;
    border-top: none;
    border-radius: 0;
    background: #0d1117;
    position: relative;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

/* Table Styles */
.token-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: #0d1117;
    min-width: 1800px;
}

/* STICKY TABLE HEADER - Sticks to top of viewport */
.table-header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 50;
}

.table-header th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    color: #8b949e;
    border-right: 1px solid #30363d;
    white-space: nowrap;
    user-select: none;
    vertical-align: top;
    background: #161b22;
}

.table-header th:last-child {
    border-right: none;
}

/* CLEANED UP STICKY COLUMNS */
.sticky-col {
    position: sticky;
    z-index: 60;
    background: #161b22;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.col-rank.sticky-col {
    left: 0;
    width: 50px;
}

.col-token.sticky-col {
    left: 50px;
    width: 180px;
    min-width: 180px;
}

/* Sticky column body cells */
tbody tr td.sticky-col {
    position: sticky;
    background: #0d1117;
    z-index: 55;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

tbody tr:hover td.sticky-col {
    background: #161b22;
}

tbody tr td.col-rank.sticky-col {
    left: 0;
}

tbody tr td.col-token.sticky-col {
    left: 50px;
}

/* Column Specific Widths */
.col-rank {
    width: 50px;
    text-align: center;
}

.col-token {
    width: 180px;
    min-width: 180px;
}

.col-price {
    width: 100px;
    text-align: right;
}

.col-mcap {
    width: 120px;
    text-align: right;
}

.col-volume,
.col-netflow,
.col-trades,
.col-nettrades,
.col-avgtrade,
.col-organic,
.col-makers {
    width: 120px;
    text-align: right;
}

.col-holders {
    width: 100px;
    text-align: right;
}

/* Column Header */
.col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 4px 0;
    border-radius: 3px;
    transition: background 0.15s ease;
}

.col-header:hover {
    background: rgba(56, 139, 253, 0.1);
}

.col-title {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sort-arrow {
    font-size: 10px;
    color: #6e7681;
    margin-left: 4px;
    opacity: 0.5;
    transition: all 0.15s ease;
}

.sort-arrow.active {
    color: #1f6feb;
    opacity: 1;
}

/* Hidden Columns */
.column-hidden {
    display: none !important;
}

/* Table Body */
.token-table tbody tr {
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    transition: background-color 0.15s ease;
}

.token-table tbody tr:hover {
    background: #161b22;
}

.token-table tbody tr:last-child {
    border-bottom: 1px solid #30363d;
}

.token-table tbody td {
    padding: 12px;
    border-right: 1px solid #21262d;
    vertical-align: middle;
    font-size: 13px;
}

.token-table tbody td:last-child {
    border-right: none;
}

/* CLEANED UP CELL CONTENT STYLES */
.rank-cell {
    text-align: center;
    font-weight: 600;
    color: #6e7681;
    font-size: 12px;
}

.token-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #30363d;
}

.token-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.token-icon-fallback {
    font-size: 10px;
    font-weight: 600;
    color: #8b949e;
}

.token-info {
    min-width: 0;
    flex: 1;
}

.token-name {
    font-weight: 600;
    color: #f0f6fc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    line-height: 1.3;
    cursor: pointer;
    transition: color 0.15s ease;
    font-size: 13px;
}

.token-name:hover {
    color: #1f6feb;
    text-decoration: underline;
}

.token-symbol {
    color: #8b949e;
    font-size: 11px;
    margin-top: 1px;
}

.verified-badge {
    color: #238636;
    margin-left: 4px;
    font-size: 10px;
}

/* Numeric Cells */
.number-cell {
    text-align: right;
    font-family: 'SF Mono', Consolas, monospace;
    font-weight: 500;
}

.price-cell {
    color: #f0f6fc;
    font-weight: 600;
}

.positive {
    color: #238636;
}

.negative {
    color: #da3633;
}

.neutral {
    color: #8b949e;
}

/* Metric Cells with Bars */
.metric-cell {
    text-align: right;
    position: relative;
}

.metric-value {
    font-weight: 600;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
}

.metric-bar {
    height: 3px;
    background: #21262d;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
    position: relative;
}

.metric-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
    position: absolute;
    left: 0;
    top: 0;
}

.volume-fill {
    background: linear-gradient(90deg, #fd7e14, #dc2626);
}

.netflow-fill-positive {
    background: linear-gradient(90deg, #238636, #2ea043);
}

.netflow-fill-negative {
    background: linear-gradient(90deg, #da3633, #f85149);
}

.trades-fill {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.organic-fill {
    background: linear-gradient(90deg, #1f6feb, #388bfd);
}

.avg-trade-fill {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.makers-fill {
    background: linear-gradient(90deg, #06b6d4, #0891b2);
}

/* Percentage Display */
.percentage-display {
    font-size: 10px;
    color: #8b949e;
    margin-top: 2px;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #0d1117;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #21262d;
    border-top: 2px solid #1f6feb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text {
    color: #8b949e;
    font-size: 14px;
}

/* Error State */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #0d1117;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.error-text {
    color: #da3633;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    max-width: 400px;
}

.retry-btn {
    background: #238636;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.retry-btn:hover {
    background: #2ea043;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-container {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0;
}

.modal-token-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-token-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #21262d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #30363d;
}

.modal-token-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.modal-token-icon .token-icon-fallback {
    font-size: 18px;
    font-weight: 600;
    color: #8b949e;
}

.modal-token-details h2 {
    font-size: 24px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0;
    line-height: 1.2;
}

.modal-token-details span {
    font-size: 14px;
    color: #8b949e;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #8b949e;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #30363d;
    color: #f0f6fc;
}

.modal-content {
    padding: 24px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Settings Modal Specific Styles */
.settings-modal {
    max-width: 600px;
}

.settings-modal .modal-content {
    max-height: calc(90vh - 80px);
}

.settings-section {
    margin-bottom: 32px;
}

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

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #f0f6fc;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #30363d;
}

/* Column Controls */
.column-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.column-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #30363d;
    border-radius: 6px;
    transition: all 0.15s ease;
    background: #161b22;
}

.column-toggle:hover {
    background: #21262d;
    border-color: #484f58;
}

.column-toggle input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #30363d;
    border-radius: 3px;
    background: #0d1117;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.column-toggle input[type="checkbox"]:checked {
    background: #238636;
    border-color: #238636;
}

.column-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -1px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.column-toggle span {
    font-size: 13px;
    color: #c9d1d9;
    font-weight: 500;
}

/* Filter Rows */
.filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
}

.filter-label {
    font-size: 13px;
    color: #c9d1d9;
    font-weight: 500;
    min-width: 120px;
    flex-shrink: 0;
}

.filter-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.filter-input {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 4px;
    width: 70px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #1f6feb;
    background: #0d1117;
}

.filter-input::placeholder {
    color: #6e7681;
}

.filter-separator {
    color: #6e7681;
    font-size: 12px;
    margin: 0 4px;
}

.filter-unit {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    min-width: 50px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.filter-unit:hover {
    border-color: #1f6feb;
}

.filter-unit:focus {
    outline: none;
    border-color: #1f6feb;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-secondary {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background: #30363d;
    border-color: #484f58;
}

/* Chart Controls */
.chart-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.chart-period-selector {
    display: flex;
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 2px;
}

.chart-period-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 50px;
}

.chart-period-btn:hover {
    background: #30363d;
    color: #c9d1d9;
}

.chart-period-btn.active {
    background: #1f6feb;
    color: #ffffff;
    font-weight: 600;
}

.chart-metric-selector select {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.chart-metric-selector select:hover {
    border-color: #1f6feb;
}

.chart-metric-selector select:focus {
    outline: none;
    border-color: #1f6feb;
}

/* Chart Container */
.chart-container {
    position: relative;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Chart Loading and Error States */
.chart-loading,
.chart-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.chart-loading .loading-spinner {
    margin-bottom: 16px;
}

.chart-error .error-text {
    color: #da3633;
    margin-bottom: 16px;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* MOBILE RESPONSIVE DESIGN */

/* Large Tablets and Small Desktops */
@media (max-width: 1600px) {
    .container {
        min-width: 100%;
    }
    
    .token-table tbody td {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    /* Mobile portrait - same as landscape, just smaller */
    .col-rank {
        width: 35px;
    }
    
    .col-token {
        width: calc(100vw - 320px);
        min-width: 110px;
        max-width: 130px;
    }
    
    .col-price {
        width: 75px;
    }
    
    .col-mcap {
        width: 80px;
    }
    
    .col-volume,
    .col-netflow,
    .col-trades,
    .col-nettrades,
    .col-avgtrade,
    .col-organic,
    .col-makers,
    .col-holders {
        width: 85px;
    }
    
    .col-token.sticky-col {
        left: 35px;
    }
    
    tbody tr td.col-token.sticky-col {
        left: 35px;
    }
    
    .token-name {
        max-width: 80px;
        font-size: 10px;
    }
    
    .token-icon {
        width: 16px;
        height: 16px;
    }
    
    .token-icon-fallback {
        font-size: 7px;
    }
    
    .token-symbol {
        font-size: 8px;
    }
    
    .rank-cell {
        font-size: 9px;
    }
    
    /* All columns are available via horizontal scroll */
    .col-rank,
    .col-token,
    .col-price,
    .col-mcap,
    .col-volume,
    .col-netflow,
    .col-trades,
    .col-nettrades,
    .col-avgtrade,
    .col-organic,
    .col-makers,
    .col-holders {
        display: table-cell !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .header {
        padding: 8px 12px;
    }
    
    .title {
        font-size: 16px;
    }
    
    .time-btn {
        padding: 6px 10px;
        font-size: 10px;
        min-width: 32px;
    }
    
    .settings-btn {
        width: 32px;
        height: 32px;
    }
    
    .settings-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .status-text {
        font-size: 12px;
    }
    
    .progress-container {
        max-width: 200px;
        height: 3px;
    }
    
    .table-wrapper {
        max-height: calc(100vh - 90px);
    }
    
    .token-table {
        min-width: 500px;
        font-size: 10px;
    }
    
    .table-header th {
        padding: 6px;
        font-size: 8px;
    }
    
    .token-table tbody td {
        padding: 6px;
        font-size: 10px;
    }
    
    .col-rank {
        width: 35px;
    }
    
    .col-token {
        width: 120px;
        min-width: 120px;
    }
    
    .col-token.sticky-col {
        left: 35px;
    }
    
    tbody tr td.col-token.sticky-col {
        left: 35px;
    }
    
    .col-price,
    .col-mcap,
    .col-volume {
        width: 80px;
    }
    
    .token-name {
        max-width: 75px;
        font-size: 10px;
    }
    
    .token-icon {
        width: 18px;
        height: 18px;
    }
    
    .token-icon-fallback {
        font-size: 8px;
    }
    
    .token-symbol {
        font-size: 9px;
    }
    
    .metric-bar {
        height: 2px;
    }
    
    .percentage-display {
        font-size: 9px;
    }
}

/* Responsive Modal Updates */
@media (max-width: 1200px) {
    .modal-container {
        width: 95%;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .chart-container {
        height: 350px;
    }
    
    .modal-token-details h2 {
        font-size: 20px;
    }
    
    .chart-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chart-period-selector {
        justify-content: center;
    }
    
    .column-controls {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .filter-label {
        min-width: auto;
    }
    
    .filter-inputs {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .modal-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .chart-container {
        height: 300px;
        padding: 16px;
    }
    
    .modal-token-info {
        gap: 12px;
    }
    
    .modal-token-icon {
        width: 40px;
        height: 40px;
    }
    
    .modal-token-details h2 {
        font-size: 18px;
    }
    
    .column-controls {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
}

/* Scrollbar Styling */
.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #161b22;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #161b22;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}

/* Selection Styles */
::selection {
    background: rgba(31, 111, 235, 0.3);
}

/* Skeleton Loading Styles */
.skeleton-row {
    opacity: 0.6;
}

.skeleton-cell {
    height: 16px;
    background: #21262d;
    border-radius: 3px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Error Row Styles */
.error-row {
    background: #2a1a1a !important;
}

.error-cell {
    color: #da3633 !important;
    font-style: italic;
    text-align: center !important;
}

/* Utility Classes for Mobile Column Management */
@media (max-width: 1024px) {
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-show {
        display: table-cell !important;
    }
}

/* Fix for sticky positioning on iOS */
@supports (-webkit-touch-callout: none) {
    .sticky-col {
        position: -webkit-sticky;
    }
    
    .table-header {
        position: -webkit-sticky;
    }
}-table {
        min-width: 1600px;
    }
    
    .col-volume,
    .col-netflow,
    .col-trades,
    .col-nettrades,
    .col-avgtrade,
    .col-organic,
    .col-makers {
        width: 110px;
    }
}

/* Standard Tablets */
@media (max-width: 1400px) {
    .header {
        padding: 12px 20px;
        min-height: 60px;
    }
    
    .title {
        font-size: 20px;
    }
    
    .table-wrapper {
        max-height: calc(100vh - 60px);
    }
    
    .token-table {
        min-width: 1400px;
        font-size: 12px;
    }
    
    .table-header th {
        padding: 10px;
        font-size: 10px;
    }
    
    .token-table tbody td {
        padding: 10px;
        font-size: 12px;
    }
    
    .col-volume,
    .col-netflow,
    .col-trades,
    .col-nettrades,
    .col-avgtrade,
    .col-organic,
    .col-makers {
        width: 100px;
    }
    
    .col-token {
        width: 160px;
        min-width: 160px;
    }
    
    .col-token.sticky-col {
        left: 45px;
    }
    
    tbody tr td.col-token.sticky-col {
        left: 45px;
    }
    
    .col-rank {
        width: 45px;
    }
    
    .token-name {
        max-width: 110px;
        font-size: 12px;
    }
    
    .token-icon {
        width: 22px;
        height: 22px;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 1024px) {
    .header {
        padding: 10px 16px;
        min-height: 55px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .header-center {
        order: 3;
        flex-basis: 100%;
        padding: 8px 0 0;
    }
    
    .progress-container {
        max-width: 250px;
    }
    
    .time-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .settings-btn {
        width: 36px;
        height: 36px;
    }
    
    .settings-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .table-wrapper {
        max-height: calc(100vh - 75px);
    }
    
    /* Show minimum 5 columns on mobile landscape */
    .token-table {
        min-width: 750px;
    }
    
    /* Hide some columns by default on mobile landscape */
    .col-nettrades,
    .col-avgtrade,
    .col-organic,
    .col-makers,
    .col-holders {
        display: none;
    }
    
    /* Keep these 5 columns visible: rank, token, price, mcap, volume */
    .col-rank,
    .col-token,
    .col-price,
    .col-mcap,
    .col-volume {
        display: table-cell !important;
    }
}

/* Mobile Portrait */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        min-height: auto;
    }
    
    .header-left,
    .header-right {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .header-center {
        order: 2;
        margin: 8px 0;
        padding: 0;
    }
    
    .header-right {
        order: 3;
        justify-content: center;
        gap: 16px;
    }
    
    .title {
        font-size: 18px;
    }
    
    .table-wrapper {
        max-height: calc(100vh - 100px);
        border-left: none;
        border-right: none;
    }
    
    .token-table {
        min-width: 600px;
        font-size: 11px;
    }
    
    .table-header th {
        padding: 8px;
        font-size: 9px;
    }
    
    .token