/* Dashboard Styles - DEGX Branded Professional Design */
:root {
    --primary: #006ba1;
    --primary-dark: #005a87;
    --primary-light: #007cbb;
    --secondary: #f0b90b;
    --secondary-dark: #d6a50a;
    --secondary-light: #f4c93c;
    --success: #00b894;
    --danger: #ff6b6b;
    --warning: #fdcb6e;
    --info: #74b9ff;
    --dark: #000000;
    --darker: #050505;
    --light: #ffffff;
    --gray: #636e72;
    --bg-dark: #000000;
    --bg-card: #111111;
    --bg-hover: #1a1a1a;
    --border: #222222;
    --text: #ffffff;
    --text-muted: #888888;
    --gradient-primary: linear-gradient(135deg, #006ba1 0%, #004d75 100%);
    --gradient-secondary: linear-gradient(135deg, #f0b90b 0%, #d6a50a 100%);
    --gradient-success: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    --gradient-warning: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    --gradient-info: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.dashboard-container {
    min-height: 100vh;
    background: var(--bg-dark);
    position: relative;
}

/* Enhanced Header */
.dashboard-header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(40px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 80px;
    max-width: 1920px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 48px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    display: flex;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    background: var(--bg-hover);
    color: var(--text);
    transform: translateY(-1px);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(0, 107, 161, 0.1);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    border: 1px solid transparent;
}

.user-info:hover {
    /* background: rgba(255, 255, 255, 0.08); */
    border-color: var(--border);
    transform: translateY(-1px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

/* Enhanced Main Content */
.dashboard-main {
    padding: 32px;
    max-width: 1920px;
    margin: 0 auto;
}

/* Enhanced Quick Stats Row */
.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: #000000;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.stat-card.success::before {
    background: var(--gradient-success);
}

.stat-card.info::before {
    background: var(--gradient-info);
}

.stat-card.warning::before {
    background: var(--gradient-warning);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 107, 161, 0.3);
    border-color: rgba(0, 107, 161, 0.5);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(0, 107, 161, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    backdrop-filter: blur(10px);
}

.stat-card.success .stat-icon {
    background: rgba(0, 184, 148, 0.15);
    color: #00b894;
}

.stat-card.info .stat-icon {
    background: rgba(116, 185, 255, 0.15);
    color: var(--info);
}

.stat-card.warning .stat-icon {
    background: rgba(240, 185, 11, 0.15);
    color: var(--secondary);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Enhanced Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 24px;
}

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

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

/* Enhanced Widgets */
.widget {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.widget:hover {
    box-shadow: 0 12px 40px rgba(0, 107, 161, 0.2);
    transform: translateY(-2px);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: #000000;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.widget-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--primary);
    color: var(--light);
    transform: rotate(180deg);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.view-all:hover {
    background: rgba(0, 107, 161, 0.1);
    transform: translateX(4px);
}

.widget-content {
    padding: 24px;
    background-color: black;
}

/* Enhanced Portfolio Widget */
.portfolio-chart {
    height: 240px;
    margin-bottom: 24px;
    position: relative;
}

.portfolio-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #000000;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.breakdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

.breakdown-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.color-dot::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
}

.color-dot.trading {
    background: var(--primary);
}

.color-dot.funding {
    background: var(--info);
}

.color-dot.portfolio {
    background: var(--secondary);
}

.breakdown-value {
    font-weight: 700;
    font-size: 16px;
}

/* Enhanced Market Tabs */
.market-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-dark);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.tab-btn.active {
    background: var(--primary);
    color: var(--light);
    box-shadow: 0 4px 12px rgba(0, 107, 161, 0.4);
}

/* Enhanced Market Table */
.market-table-container {
    overflow-x: auto;
    border-radius: 12px;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table th {
    background: var(--bg-dark);
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.market-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
}

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

.market-table tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.market-table tr:hover {
    background: rgba(0, 107, 161, 0.05);
    transform: translateX(4px);
}

/* Enhanced Coins List */
.coins-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #000000;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.coin-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coin-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.coin-symbol {
    font-weight: 700;
    font-size: 14px;
}

.coin-price {
    font-weight: 700;
    font-size: 14px;
}

.coin-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.coin-change.positive {
    color: var(--success);
    background: rgba(0, 184, 148, 0.1);
    width: 65px;
}

.coin-change.negative {
    color: var(--danger);
    background: rgba(255, 107, 107, 0.1);
    width: 65px;
}

/* Enhanced Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 12px;
    background: #000000;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    /* background: rgba(0, 107, 161, 0.1); */
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 107, 161, 0.3);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(0, 107, 161, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.action-btn:hover .action-icon {
    background: var(--primary);
    color: var(--light);
    transform: scale(1.1);
}

.action-btn span {
    font-size: 13px;
    font-weight: 600;
}

/* Enhanced Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #000000;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 107, 161, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
}

.activity-details {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.activity-amount {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 13px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Enhanced Loading Overlay - Optimized for Speed */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px); /* Reduced blur for better performance */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    will-change: transform; /* Performance optimization */
}

.loading-content {
    text-align: center;
    color: #ffffff;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Base spinner (outer ring) - FASTER */
.loading-spinner {
    width: 50px; /* Smaller for faster rendering */
    height: 50px;
    border: 2px solid transparent; /* Thinner borders */
    border-top: 2px solid #006ba1; /* DEGX Primary Blue */
    border-radius: 50%;
    animation: spin 0.6s linear infinite; /* Faster animation */
    margin: 0 auto 15px;
    position: relative;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Middle ring – secondary color - FASTER */
.loading-spinner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-top: 2px solid #f0b90b; /* DEGX Gold */
    border-radius: 50%;
    animation: spin 0.9s linear infinite reverse; /* Faster animation */
    transform: translateZ(0); /* Hardware acceleration */
}

/* Inner ring – WHITE - FASTER */
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 5px;   /* (50px - 30px) / 2 */
    left: 5px;
    width: 30px; /* Smaller inner ring */
    height: 30px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;   /* White */
    border-radius: 50%;
    animation: spin 0.4s linear infinite; /* Much faster */
    transform: translateZ(0); /* Hardware acceleration */
}

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

/* Optional: Add loading progress text */
.loading-text {
    background: linear-gradient(135deg, #006ba1 0%, #f0b90b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
}

/* Performance optimizations */
.loading-overlay {
    backface-visibility: hidden;
    perspective: 1000;
}

.loading-spinner, .loading-spinner::before, .loading-spinner::after {
    backface-visibility: hidden;
    perspective: 1000;
}

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

/* Enhanced News Widget Styles */
.news-widget .widget-content {
    padding: 0;
}

.news-list {
    max-height: 500px;
    overflow-y: auto;
}

.news-card {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
    background: #000000;
}

.news-card:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.news-card:last-child {
    border-bottom: none;
}

.news-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.news-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.news-author {
    flex: 1;
}

.news-author strong {
    display: block;
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
}

.news-date {
    font-size: 13px;
    color: var(--text-muted);
}

.news-sentiment {
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}

.news-sentiment.positive {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.news-sentiment.negative {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.news-sentiment.neutral {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.news-content {
    margin-bottom: 16px;
}

.news-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.4;
}

.news-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.news-image {
    border-radius: 14px;
    overflow: hidden;
    margin-top: 12px;
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.02);
}

.news-actions {
    display: flex;
    gap: 20px;
    padding-top: 12px;
}

.news-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.news-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.news-action-btn.like-btn:hover,
.news-action-btn.liked {
    color: #e0245e;
    background: rgba(224, 36, 94, 0.1);
}

.news-action-btn.comment-btn:hover {
    color: #1da1f2;
    background: rgba(29, 161, 242, 0.1);
}

.news-action-btn.repost-btn:hover {
    color: #17bf63;
    background: rgba(23, 191, 99, 0.1);
}

.news-action-btn i {
    font-size: 16px;
}

/* No News State */
.no-news {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-news i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-news p {
    margin: 0;
    font-size: 15px;
}

/* Enhanced Profile Dropdown */
.profile-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 0;
    min-width: 240px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    margin-top: 12px;
    backdrop-filter: blur(20px);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(0, 107, 161, 0.1);
    color: var(--primary);
    transform: translateX(4px);
}

.dropdown-item i {
    width: 18px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.dropdown-item:hover i {
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

/* Enhanced Mobile Navigation */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.mobile-nav-header h2 {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: var(--bg-hover);
    transform: rotate(90deg);
}

.mobile-nav {
    padding: 24px 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 600;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(0, 107, 161, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    transform: translateX(4px);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--primary);
    color: var(--light);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Utility Classes */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-muted); }

/* Favorite Star Styles */
.favorite {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.favorite:hover {
    color: var(--secondary);
    background: rgba(240, 185, 11, 0.1);
    transform: scale(1.2);
}

.favorite.active {
    color: var(--secondary);
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Market table adjustments */
.market-table th:first-child,
.market-table td:first-child {
    width: 50px;
    text-align: center;
}

/* Background Animation */
.dashboard-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 107, 161, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* DEGX Brand Elements */
.degx-badge {
    background: var(--gradient-primary);
    color: var(--light);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.stat-card .degx-highlight {
    color: var(--secondary);
    font-weight: 800;
}

/* Enhanced Mobile Navigation */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-content {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: #000000;
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 2001;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.mobile-nav-header h2 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
      -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: var(--bg-hover);
    transform: rotate(90deg);
}

.mobile-nav {
    padding: 24px 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 600;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(0, 107, 161, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    transform: translateX(4px);
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: var(--primary);
    color: var(--light);
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* Enhanced Mobile Responsiveness - International Exchange Standards */
@media (max-width: 768px) {
    /* Header Mobile Optimization */
    .header-main {
        padding: 0 16px;
        height: 60px;
    }
    .logo {
        font-size: 22px;
        margin-right: auto;
    }
    .main-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 12px;
    }
    .user-name {
        display: none;
    }
    .user-info {
        padding: 8px 12px;
    }
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    /* Main Content Mobile Layout */
    .dashboard-main {
        padding: 16px;
        padding-bottom: 80px;
    }
    /* Quick Stats - Horizontal Row like Desktop */
    .quick-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }
    .stat-card {
        padding: 16px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        border-radius: 16px;
        min-height: auto;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 0;
    }
    .stat-content {
        flex: none;
        width: 100%;
    }
    .stat-label {
        font-size: 12px;
        margin-bottom: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-value {
        font-size: 16px;
        margin-bottom: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stat-change {
        font-size: 11px;
        justify-content: center;
    }
    /* Dashboard Grid - Single Column Stack with Centered Portfolio */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    /* Reorder widgets to center portfolio */
    .dashboard-grid {
        display: flex;
        flex-direction: column;
    }
    /* Move portfolio widget to appear in the middle */
    .dashboard-grid .grid-column:nth-child(1) {
        order: 2; /* Portfolio becomes second in mobile */
    }
    .dashboard-grid .grid-column:nth-child(2) {
        order: 1; /* Market overview becomes first */
    }
    .dashboard-grid .grid-column:nth-child(3) {
        order: 3; /* Quick actions stays third */
    }
    /* Center portfolio chart */
    .portfolio-widget {
        text-align: center;
    }
    .portfolio-chart {
        height: 200px;
        margin: 0 auto 20px;
        max-width: 280px; /* Limit width for better centering */
    }
    .portfolio-breakdown {
        max-width: 300px;
        margin: 0 auto;
    }
    /* Widget Mobile Optimizations */
    .widget {
        border-radius: 16px;
        margin-bottom: 20px;
    }
    .widget-header {
        padding: 20px 16px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    .widget-title {
        font-size: 16px;
        gap: 10px;
    }
   .widget-content {
    padding: 16px;
    background-color: black;
}
    /* Market Widget Mobile Optimization */
    .market-tabs {
        width: auto;
        justify-content: flex-start;
    }
    .tab-btn {
        flex: none;
        text-align: center;
        padding: 8px 12px;
        font-size: 12px;
    }
    .market-table-container {
        border-radius: 12px;
        margin: 0 -8px;
        padding: 0 8px;
    }
    .market-table {
        min-width: 600px;
    }
    .market-table th,
    .market-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    .market-table th:first-child,
    .market-table td:first-child {
        width: 40px;
        padding-left: 4px;
    }
    .market-table th:last-child,
    .market-table td:last-child {
        width: 60px;
        padding-right: 4px;
    }
    /* Coins List Mobile Optimization */
    .coins-list {
        gap: 10px;
    }
    .coin-item {
        padding: 14px 12px;
        border-radius: 12px;
    }
    .coin-info {
        gap: 10px;
    }
    .coin-logo {
        width: 28px;
        height: 28px;
    }
    .coin-symbol {
        font-size: 13px;
    }
    .coin-price {
        font-size: 13px;
    }
    .coin-change {
        font-size: 12px;
        padding: 4px 8px;
    }
    /* Quick Actions Mobile Grid */
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .action-btn {
        padding: 16px 8px;
        border-radius: 12px;
        gap: 8px;
    }
    .action-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .action-btn span {
        font-size: 12px;
        font-weight: 600;
        text-align: center;
        line-height: 1.2;
    }
    /* Activity List Mobile Optimization */
    .activity-list {
        gap: 10px;
    }
    .activity-item {
    padding: 14px 12px;
    border-radius: 12px;
    gap: 12px;
    background-color: black;
}
    .activity-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
        flex-shrink: 0;
    }
    .activity-details {
        min-width: 0;
    }
    .activity-title {
        font-size: 13px;
        margin-bottom: 2px;
    }
    .activity-amount {
        font-size: 12px;
        margin-bottom: 2px;
    }
    .activity-time {
        font-size: 11px;
    }
    /* News Widget Mobile Optimization */
    .news-card {
        padding: 16px;
    }
    .news-header {
        margin-bottom: 12px;
        gap: 10px;
    }
    .news-avatar {
        width: 36px;
        height: 36px;
    }
    .news-author strong {
        font-size: 14px;
    }
    .news-date {
        font-size: 12px;
    }
    .news-sentiment {
        padding: 4px 8px;
        font-size: 11px;
    }
    .news-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    .news-excerpt {
        font-size: 13px;
        margin-bottom: 12px;
    }
    .news-image img {
        height: 160px;
        border-radius: 12px;
    }
    .news-actions {
        gap: 16px;
        padding-top: 12px;
    }
    .news-action-btn {
        padding: 6px 10px;
        font-size: 13px;
        gap: 6px;
    }
    /* Profile Dropdown Mobile Positioning */
    .profile-dropdown-menu {
        position: fixed;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 280px;
        margin-top: 8px;
    }
    /* Mobile Navigation Overlay */
    .mobile-nav-overlay.active {
        display: block;
    }
    .mobile-nav-content {
        width: 280px;
    }
    .mobile-nav-header {
        padding: 20px;
    }
    .mobile-nav {
        padding: 20px 0;
    }
    .mobile-nav-item {
        padding: 16px 20px;
        font-size: 15px;
    }
}
/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .dashboard-main {
        padding: 12px;
        padding-bottom: 70px;
    }
    /* Adjust quick stats for very small screens */
    .quick-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .stat-card {
        padding: 12px 8px;
    }
    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .stat-label {
        font-size: 11px;
    }
    .stat-value {
        font-size: 14px;
    }
    .stat-change {
        font-size: 10px;
    }
    .widget-header {
        padding: 16px 12px;
    }
    .widget-content {
        padding: 12px;
    }
    /* Portfolio chart adjustments for small screens */
    .portfolio-chart {
        height: 180px;
        max-width: 240px;
    }
    /* Actions Grid - 2 columns for very small screens */
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .action-btn {
        padding: 14px 6px;
    }
    .action-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .action-btn span {
        font-size: 11px;
    }
    /* Market Table - More compact */
    .market-table th,
    .market-table td {
        padding: 10px 6px;
        font-size: 12px;
    }
    /* News Cards - More compact */
    .news-card {
        padding: 14px;
    }
    .news-image img {
        height: 140px;
    }
    .news-actions {
        gap: 12px;
    }
    .news-action-btn {
        padding: 5px 8px;
        font-size: 12px;
    }
}
/* Mobile Landscape Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .dashboard-main {
        padding-bottom: 20px;
    }
    .quick-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 14px 10px;
    }
    .portfolio-chart {
        height: 160px;
        max-width: 220px;
    }
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Very Small Screens - Adjust stats layout */
@media (max-width: 360px) {
    .quick-stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .stat-card {
        padding: 10px 6px;
    }
    .stat-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .stat-label {
        font-size: 10px;
    }
    .stat-value {
        font-size: 12px;
    }
    .stat-change {
        font-size: 9px;
    }
    .portfolio-chart {
        max-width: 200px;
        height: 160px;
    }
}
/* Enhanced Touch Interactions for Mobile */
@media (max-width: 768px) {
    /* Better touch targets */
    .nav-item,
    .btn-icon,
    .tab-btn,
    .action-btn,
    .news-action-btn,
    .mobile-nav-item,
    .dropdown-item {
        min-height: 44px;
    }
    /* Stat cards as touch targets */
    .stat-card {
        min-height: 44px;
        cursor: pointer;
    }
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
    /* Smooth scrolling */
    .dashboard-main {
        -webkit-overflow-scrolling: touch;
    }
    /* Enhanced button feedback */
    .btn-icon:active,
    .action-btn:active,
    .tab-btn:active,
    .stat-card:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    /* Improved scrolling containers */
    .market-table-container,
    .news-list {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}
/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Reduce animations for better performance */
    .stat-card,
    .widget,
    .coin-item,
    .activity-item,
    .news-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    /* Simplify complex gradients on mobile */
    .stat-card::before {
        height: 2px;
    }
    /* Optimize background effects */
    .dashboard-container::before {
        opacity: 0.7;
    }
}
/* Safe Area Insets for Notch Devices */
@supports (padding: max(0px)) {
    .dashboard-main {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    .header-main {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    .quick-stats-row {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Enhanced market table styles */

/* Load more button styles */
.load-more-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.load-more-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
}

.load-more-btn-small {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    transition: all 0.3s ease;
}

.load-more-btn-small:hover {
    background: var(--card-bg);
    color: var(--text);
}

.load-more-small {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

/* Enhanced coin items */
.coin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.coin-item:last-child {
    border-bottom: none;
}

.coin-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coin-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.coin-symbol {
    font-weight: 600;
    font-size: 14px;
}

.coin-price {
    font-weight: 500;
    font-size: 14px;
}

.coin-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.coin-change.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    font-size: 11px;
}

.coin-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Market overview enhancements */
.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--card-bg);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.stat-value.positive {
    color: #22c55e;
}

.stat-value.negative {
    color: #ef4444;
}

/* Professional Market Dashboard - Compact Top Filters */
.market-dashboard-section {
    margin: 20px 0;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Events Banner */
.events-banner {
    background: linear-gradient(
69deg, #1374d7 0%, #f8d33a 100%);
    color: #1e2026;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.events-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.events-badge {
    background: rgba(30, 32, 38, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.events-text {
    font-weight: 500;
    white-space: nowrap;
}

.events-cta {
    color: #1e2026;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.events-cta:hover {
    opacity: 0.8;
}

.events-counter {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
}

/* Compact Top Filters Layout */
.market-filters-container {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.filters-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.filters-secondary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Compact Tabs - Horizontal Scroll */
/* Compact Tabs - Mobile Optimized */
.compact-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-secondary);
    flex: 1;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

.compact-filter {
    padding: 5px 8px;
    font-size: 10px;
    min-width: 45px;
    text-align: center;
    background-color: black;
    color: white;
    border: 1px solid #222222;
}

.compact-tabs::-webkit-scrollbar {
    height: 4px;
}

.compact-tabs::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 2px;
}

.compact-tabs::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.compact-tabs::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.compact-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    position: relative;
}

.compact-tab:hover {
    background: var(--hover);
    color: var(--text);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.compact-tab.active {
    background: linear-gradient(135deg, #1792d0 0%, #f8d33a 100%);
    color: var(--dark);
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(240, 185, 11, 0.2);
    transform: translateY(-1px);
}

/* DEGX Special Tab - Updated Colors */
.compact-tab.degx-tab {
    background: linear-gradient(135deg, #1792d0 0%, #f8d33a 100%);
    color: #1e2026;
    border-color: #1792d0;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.compact-tab.degx-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.compact-tab.degx-tab:hover::before {
    left: 100%;
}

.compact-tab.degx-tab.active {
    background: #1e2026;
    color: #f8d33a;
    border-color: #1e2026;
    box-shadow: 0 2px 8px rgba(23, 146, 208, 0.3);
}

/* Mobile-Optimized Tab Sizes */
@media (max-width: 768px) {
    .compact-tabs {
        gap: 3px;
        padding-bottom: 10px;
        margin-bottom: 8px;
    }
    
    .compact-tab {
        padding: 8px 10px;
        font-size: 11px;
        min-width: 60px;
        text-align: center;
    }
    
    /* Specific mobile sizes for each tab */
    .compact-tab[data-tab="favorites"] {
        min-width: 70px;
    }
    
    .compact-tab[data-tab="spot"] {
        min-width: 50px;
    }
    
    .compact-tab[data-tab="gainers"] {
        min-width: 65px;
    }
    
    .compact-tab[data-tab="losers"] {
        min-width: 60px;
    }
    
    .compact-tab[data-tab="volume"] {
        min-width: 60px;
    }
    
    .compact-tab[data-tab="new"] {
        min-width: 50px;
    }
    
    .compact-tab.degx-tab {
        min-width: 55px;
        font-size: 10px;
        padding: 8px 8px;
        background: linear-gradient(135deg, #1792d0 0%, #f8d33a 100%);
        font-weight: 700;
    }
    
    /* Hide text on smallest screens, show only icons */
    @media (max-width: 360px) {
        .compact-tab {
            min-width: 40px;
            padding: 8px 6px;
        }
        
        .compact-tab span:not(.tab-icon) {
            display: none;
        }
        
        .compact-tab .tab-icon {
            display: inline-block;
            font-size: 12px;
        }
        
        .compact-tab.degx-tab {
            min-width: 42px;
            font-size: 9px;
            padding: 8px 4px;
        }
        
        .compact-tab.degx-tab span {
            display: inline;
        }
    }
}

/* Extra Small Mobile Optimization */
@media (max-width: 480px) {
    .filters-main-row {
        gap: 12px;
    }
    
    .compact-tabs {
        order: 1;
        width: 100%;
        padding-bottom: 12px;
    }
    
    .market-controls-compact {
        order: 2;
        width: 100%;
        justify-content: space-between;
    }
    
    .compact-tab {
        padding: 7px 9px;
        font-size: 10px;
    }
    
    .compact-tab.degx-tab {
        font-size: 10px;
        padding: 7px 8px;
        min-width: 52px;
    }
}

/* Horizontal scroll indicators */
.compact-tabs-container {
    position: relative;
    width: 100%;
}

.compact-tabs-container::before,
.compact-tabs-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.compact-tabs-container::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, transparent 100%);
}

.compact-tabs-container::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-secondary) 0%, transparent 100%);
}

.compact-tabs-container.scroll-start::after,
.compact-tabs-container.scroll-middle::before,
.compact-tabs-container.scroll-middle::after,
.compact-tabs-container.scroll-end::before {
    opacity: 1;
}

/* Compact Filters Mobile Optimization */
@media (max-width: 768px) {
    .compact-filters {
        gap: 2px;
        padding: 3px;
        justify-content: center;
    }
    
.compact-filter {
    padding: 5px 8px;
    font-size: 10px;
    min-width: 45px;
    text-align: center;
    background-color: black;
    color: white;
    border: 1px solid #222222;
}
}

/* Ensure all content fits in mobile view */
@media (max-width: 768px) {
    .market-filters-container {
        padding: 12px 15px;
    }
    
    .filters-main-row {
        margin-bottom: 10px;
    }
    
    .filters-secondary-row {
        gap: 8px;
    }
    
    .market-stats-compact {
        font-size: 10px;
        gap: 12px;
    }
    
    .stat-item-compact {
        gap: 3px;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .compact-tab {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .compact-tab:active {
        transform: scale(0.98);
    }
}

/* Market Controls */
.market-controls-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-compact {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-compact {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px 5px 28px;
    font-size: 11px;
    color: var(--text);
    width: 140px;
    transition: all 0.2s ease;
}

.search-input-compact:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.1);
}

.search-icon-compact {
    position: absolute;
    left: 8px;
    color: var(--text-muted);
    font-size: 11px;
}

/* Market Stats Compact */
.market-stats-compact {
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.stat-item-compact {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-value-compact {
    color: var(--text);
    font-weight: 600;
}

/* Expanded Market Table */
.market-table-container {
    overflow-x: auto;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
}

.market-table-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.market-table-header th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.market-table-header th:hover {
    color: var(--text);
}

.market-table-header th i {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.6;
}

.market-table-body {
    background: var(--card-bg);
}

.market-row {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.market-row:hover {
    background: var(--hover);
}

.market-row:last-child {
    border-bottom: none;
}

.market-cell {
    padding: 16px;
    font-size: 13px;
    font-weight: 500;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

/* Coin Pair Column */
.coin-pair {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.coin-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.coin-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.coin-symbol {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coin-name {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leverage-badge {
    background: linear-gradient(135deg, #1792d0 0%, #f8d33a 100%);
    color: var(--dark);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Last Price Column */
.last-price {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

/* 24h Change Column */
.change-24h {
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    display: inline-block;
    min-width: 70px;
}

.change-24h.positive {
    background: rgba(0, 180, 42, 0.1);
    color: #00b42a;
}

.change-24h.negative {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
}

/* Volume Column */
.volume-24h {
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}

/* Action Buttons */
.trade-actions {
    display: flex;
    gap: 8px;
}

.trade-btn {
    background: linear-gradient(135deg, #1792d0 0%, #f8d33a 100%);
    color: var(--dark);
    border: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 55px;
    white-space: nowrap;
}

.trade-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.trade-btn.sell-btn {
    background: #ff4d4f;
    color: white;
}

/* Market Footer */
.market-footer {
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.more-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.more-btn:hover {
    color: var(--primary-light);
    gap: 8px;
}

/* Loading and Error States */
.market-loading {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.market-error {
    text-align: center;
    padding: 50px 20px;
    color: #ff4d4f;
    font-size: 14px;
}

/* Column Alignment */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    .market-dashboard-section {
        margin: 12px 0;
        border-radius: 8px;
    }
    
    .events-banner {
        padding: 10px 16px;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .events-content {
        justify-content: space-between;
    }
    
    .market-filters-container {
        padding: 12px 16px;
    }
    
    .filters-main-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 10px;
    }
    
    .filters-secondary-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .compact-tabs {
        order: 1;
        padding-bottom: 8px;
    }
    
    .market-controls-compact {
        order: 2;
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input-compact {
        width: 100%;
        max-width: 200px;
    }
    
    .market-stats-compact {
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .compact-filters {
        order: 4;
        justify-content: center;
    }
    
    /* Expanded Mobile Table */
    .market-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .market-table {
        min-width: 100%;
    }
    
    .market-table-header th,
    .market-cell {
        padding: 14px 12px;
    }
    
    .market-table-header th:nth-child(4),
    .market-table-header th:nth-child(5),
    .market-cell:nth-child(4),
    .market-cell:nth-child(5) {
        display: table-cell;
    }
    
    .coin-logo {
        width: 32px;
        height: 32px;
    }
    
    .coin-symbol {
        font-size: 15px;
    }
    
    .coin-name {
        font-size: 13px;
    }
    
    .last-price {
        font-size: 15px;
    }
    
    .change-24h {
        font-size: 14px;
        min-width: 80px;
        padding: 8px 12px;
    }
    
    .volume-24h {
        font-size: 14px;
    }
    
    .trade-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 60px;
    }
    
    .market-loading,
    .market-error {
        padding: 60px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .events-text {
        font-size: 13px;
    }
    
    .compact-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .compact-filter {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-input-compact {
        font-size: 13px;
        padding: 8px 12px 8px 32px;
    }
    
    .market-stats-compact {
        font-size: 12px;
    }
    
    .market-table-header th,
    .market-cell {
        padding: 16px 12px;
    }
    
    .market-table-header th:nth-child(4),
    .market-table-header th:nth-child(5) {
        display: none;
    }
    
    .market-cell:nth-child(4),
    .market-cell:nth-child(5) {
        display: none;
    }
}

/* Desktop Optimizations */
@media (min-width: 769px) {
    .market-filters-container {
        padding: 20px 24px;
    }
    
    .filters-main-row {
        margin-bottom: 16px;
    }
    
    .compact-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .compact-filter {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .search-input-compact {
        width: 160px;
        font-size: 12px;
    }
    
    .market-table-header th,
    .market-cell {
        padding: 18px 20px;
    }
}

@media (min-width: 1200px) {
    .market-table {
        min-width: 100%;
    }
    
    .search-input-compact {
        width: 200px;
    }
}