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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Beta Version Ribbon */
.beta-ribbon {
    position: absolute;
    top: 20px;
    right: -40px;
    width: 160px;
    height: 40px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transform: rotate(45deg);
    transform-origin: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.beta-text {
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Removed background animation for cleaner Coin360 look */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5px;
    position: relative;
    z-index: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24);
    background-size: 300% 300%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 3D Spinning Coin */
.coin-3d {
    position: relative;
    width: 32px;
    height: 32px;
    animation: coinRotate 4s linear infinite;
}

.coin-face {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #f9ca24;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #f9ca24 100%);
    box-shadow: 
        inset 0 2px 6px rgba(255, 255, 255, 0.3),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2),
        0 0 15px rgba(249, 202, 36, 0.4);
}

.coin-face::before {
    content: '₿';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.coin-face::after {
    content: 'M';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 900;
    color: #000000;
    text-shadow: none;
    font-family: 'Arial Black', Arial, sans-serif;
    z-index: 10;
}

.coin-face.front {
    transform: translateZ(1px);
}

.coin-face.back {
    display: none; /* Hide back face for circular rotation */
}

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

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Main SEO H1 Heading - Now positioned under logo */
.main-heading {
    text-align: center;
    font-size: 16px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
    margin: 8px 0 0 0;
    padding: 0;
    background: none;
    border: none;
    backdrop-filter: none;
    text-shadow: none;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

/* Mobile responsive H1 */
@media (max-width: 768px) {
    .main-heading {
        font-size: 14px;
        margin: 6px 0 0 0;
        letter-spacing: 0.2px;
    }
}

.tagline {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.refresh-icon {
    animation: spin 2s linear infinite;
    animation-play-state: paused;
}

.refresh-btn:hover .refresh-icon {
    animation-play-state: running;
}

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

.stats-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-item {
    text-align: center;
    font-size: 0.7rem;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2px;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: bold;
    color: #4ecdc4;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.coin360-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-left {
    display: flex;
    gap: 12px;
    align-items: center;
}

.controls-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.market-cap-filter select,
.layout-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.market-cap-filter select:hover,
.layout-selector select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.market-cap-filter select:disabled {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    opacity: 0.6;
}

.market-cap-filter select:disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.market-cap-filter select option,
.layout-selector select option {
    background: #2a2a2a;
    color: white;
}

/* API Status Display */
.api-status {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-status.bitquery {
    background: rgba(34, 139, 34, 0.3);
    color: #90EE90;
    border: 1px solid rgba(34, 139, 34, 0.5);
}

.api-status.coingecko {
    background: rgba(255, 165, 0, 0.3);
    color: #FFD700;
    border: 1px solid rgba(255, 165, 0, 0.5);
}

.api-status.fallback {
    background: rgba(255, 69, 0, 0.3);
    color: #FF6347;
    border: 1px solid rgba(255, 69, 0, 0.5);
}
.api-status.trending {
    background: rgba(255, 20, 147, 0.3);
    color: #FF69B4;
    border: 1px solid rgba(255, 20, 147, 0.5);
}
.api-status.primary {
    background: rgba(34, 139, 34, 0.3);
    color: #90EE90;
    border: 1px solid rgba(34, 139, 34, 0.5);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legend-color.positive {
    background: hsla(120, 60%, 45%, 0.6);
}

.legend-color.negative {
    background: hsla(0, 65%, 50%, 0.5);
}

.legend-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-style: italic;
}

/* List Table Layout Styles */
.tokens-table {
    display: none;
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tokens-table th,
.tokens-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tokens-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: bold;
    color: #4ecdc4;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tokens-table td {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.tokens-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.table-rank {
    font-weight: bold;
    color: #f9ca24;
    font-size: 0.9rem;
}

.table-symbol {
    font-weight: bold;
    color: white;
    font-size: 1rem;
}

.table-price-change {
    font-weight: bold;
}

.table-price-change.positive {
    color: #4caf50;
}

.table-price-change.negative {
    color: #f44336;
}

/* Table token image styles */
.table-token-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.table-no-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-image {
    width: 40px;
    text-align: center;
}


.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ff6b6b;
    font-size: 1.1rem;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.tokens-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 60px;
    gap: 1px;
    padding: 8px;
    min-height: 400px;
    align-items: stretch;
}

.token-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.token-card::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.5s ease;
}

.token-card:hover::before {
    left: 100%;
}

.token-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(78, 205, 196, 0.5);
}

.token-rank {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.rank-1 {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    animation: goldGlow 2s ease-in-out infinite;
}

.rank-2 {
    background: linear-gradient(45deg, #c0c0c0, #e5e5e5);
    color: #333;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.6);
}

.rank-3 {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: white;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.6);
}

.rank-default {
    background: linear-gradient(45deg, #667eea, #764ba2);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.4);
}

@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.9); }
}

.token-header {
    margin-bottom: 20px;
    text-align: center;
}

.token-symbol {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4ecdc4;
    text-shadow: 0 0 15px rgba(78, 205, 196, 0.5);
    margin-bottom: 5px;
}

.token-name {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.token-stats {
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.stat-row .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.glow {
    color: #4ecdc4 !important;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.7) !important;
}

.token-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-address {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dex-link {
    padding: 12px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: white;
}

.dex-link:hover {
    background: linear-gradient(45deg, #44a08d, #4ecdc4);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
    transform: translateY(-2px);
}

.address-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.address-value {
    font-family: monospace;
    font-size: 0.9rem;
    color: #f9ca24;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-value:hover {
    color: #f0932b;
    text-shadow: 0 0 5px rgba(249, 202, 36, 0.5);
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
    z-index: 1000;
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Coin360 Styles */
.coin360-tile {
    position: relative;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: tileSlideIn 0.4s ease forwards;
    margin: 0;
}

.tile-rank {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 0.55rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 6px;
    z-index: 10;
    text-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    line-height: 1;
}

.tile-image {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    z-index: 5;
    opacity: 1;
    transition: transform 0.2s ease;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

.coin360-tile:hover .tile-image {
    transform: scale(1.05);
}

.tile-image-small {
    width: 16px !important;
    height: 16px !important;
    top: 4px;
    right: 4px;
}

.tile-image-18px {
    width: 18px !important;
    height: 18px !important;
    top: 4px;
    right: 4px;
}

@keyframes tileSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.coin360-tile:hover {
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tile-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
    padding: 8px;
}

.tile-symbol {
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin-bottom: 4px;
    line-height: 1;
    font-size: 1rem !important;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-marketcap {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    margin-bottom: 2px;
    line-height: 1;
}

.tile-percentage {
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.tile-percentage.positive {
    color: rgba(255, 255, 255, 0.95);
}

.tile-percentage.negative {
    color: rgba(255, 255, 255, 0.95);
}


/* Coin360 Tooltip Styles */
.coin360-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-size: 0.85rem;
    z-index: 1000;
    max-width: 280px;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.coin360-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1rem;
}

.tooltip-rank {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.tooltip-name {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.tooltip-stats div {
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.tooltip-stats strong {
    color: white;
}

.tooltip-stats .positive {
    color: #4caf50;
}

.tooltip-stats .negative {
    color: #f44336;
}

.tooltip-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Mobile-first responsive design improvements */
@media (max-width: 1200px) {
    .tokens-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (max-width: 1024px) {
    .tokens-grid {
        grid-template-columns: repeat(8, 1fr);
        gap: 2px;
    }
    
    .coin360-legend {
        flex-direction: column;
        gap: 8px;
    }
    
    .legend-left {
        justify-content: center;
    }
    
    .legend-note {
        text-align: center;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 10px;
    }
    
    .logo-text {
        font-size: 1.6rem;
    }
    
    .tagline {
        font-size: 0.8rem;
    }
    
    .stats-center {
        flex-direction: row;
        gap: 20px;
        justify-content: center;
    }
    
    .refresh-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .tokens-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1px;
        padding: 4px;
        grid-auto-rows: 80px;
    }
    
    .coin360-legend {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .legend-left {
        gap: 8px;
    }
    
    .legend-item {
        font-size: 0.75rem;
    }
    
    .legend-note {
        font-size: 0.65rem;
    }
    
    .layout-selector select {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    /* Table responsiveness */
    .tokens-table {
        font-size: 0.8rem;
    }
    
    .tokens-table th,
    .tokens-table td {
        padding: 8px 4px;
    }
    
    .tokens-table th {
        font-size: 0.75rem;
    }
    
    /* Coin360 tooltip adjustments for mobile */
    .coin360-tooltip {
        max-width: calc(100vw - 20px);
        padding: 10px;
        font-size: 0.8rem;
    }
    
    .tile-content {
        padding: 4px;
    }
    
    .tile-image {
        top: 4px;
        right: 4px;
        width: 28px;
        height: 28px;
    }
    
    .tile-image-small {
        width: 14px !important;
        height: 14px !important;
        top: 3px;
        right: 3px;
    }
    
    .tile-image-18px {
        width: 16px !important;
        height: 16px !important;
        top: 3px;
        right: 3px;
    }
    
    .tile-symbol {
        font-size: 0.9rem !important;
        min-height: 16px;
    }
    
    .tile-marketcap {
        font-size: 0.7rem !important;
    }
    
    .tile-percentage {
        font-size: 0.65rem !important;
    }
    
    .tile-rank {
        font-size: 0.5rem;
        padding: 1px 3px;
        top: 2px;
        left: 2px;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    /* Smaller ribbon for mobile */
    .beta-ribbon {
        top: 15px;
        right: -35px;
        width: 140px;
        height: 35px;
    }
    
    .beta-text {
        font-size: 0.65rem;
        letter-spacing: 0.3px;
    }
    
    .header {
        gap: 10px;
        padding: 8px;
    }
    
    .logo-text {
        font-size: 1.4rem;
    }
    
    .tagline {
        font-size: 0.75rem;
    }
    
    .stats-center {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-item {
        font-size: 0.65rem;
    }
    
    .stat-value {
        font-size: 0.8rem;
    }
    
    .refresh-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        gap: 3px;
    }
    
    .refresh-icon {
        font-size: 0.9rem;
    }
    
    .tokens-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1px;
        padding: 2px;
        grid-auto-rows: 100px; /* Increased height for mobile to maintain hierarchy */
    }
    
    /* Mobile-specific tile span adjustments */
    .coin360-tile.mobile-large {
        grid-column: span 2 !important; /* Force 2 columns max on mobile */
        grid-row: span 2 !important; /* Increased height for hierarchy */
    }
    
    .coin360-tile.mobile-medium {
        grid-column: span 2 !important; /* Force 2 columns max on mobile */
        grid-row: span 1 !important;
    }
    
    .coin360-tile.mobile-small {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    
    .coin360-legend {
        flex-direction: column;
        gap: 6px;
        padding: 6px;
        margin-bottom: 6px;
    }
    
    .legend-left {
        justify-content: center;
        gap: 6px;
    }
    
    .legend-item {
        font-size: 0.7rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
    
    .legend-note {
        font-size: 0.6rem;
        text-align: center;
    }
    
    .layout-selector select {
        padding: 2px 4px;
        font-size: 0.65rem;
    }
    
    /* Enhanced table responsiveness for small screens */
    .tokens-table {
        font-size: 0.7rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tokens-table thead,
    .tokens-table tbody,
    .tokens-table th,
    .tokens-table td,
    .tokens-table tr {
        display: block;
    }
    
    .tokens-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .tokens-table tr {
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 10px;
        padding: 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.03);
    }
    
    .tokens-table td {
        border: none;
        padding: 4px 0;
        position: relative;
        padding-left: 35%;
    }
    
    .tokens-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 30%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #4ecdc4;
        font-size: 0.65rem;
    }

    /* Mobile responsive styles for table images */
    .table-image .table-token-image,
    .table-image .table-no-image {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    /* Coin360 tile adjustments for very small screens */
    .tile-content {
        padding: 2px;
    }
    
    .tile-image {
        top: 3px;
        right: 3px;
        width: 24px;
        height: 24px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .tile-image-small {
        width: 12px !important;
        height: 12px !important;
        top: 2px;
        right: 2px;
    }
    
    .tile-image-18px {
        width: 14px !important;
        height: 14px !important;
        top: 2px;
        right: 2px;
    }
    
    .tile-symbol {
        font-size: 0.8rem !important;
        min-height: 14px;
        margin-bottom: 2px;
    }
    
    .tile-marketcap {
        font-size: 0.65rem !important;
        margin-bottom: 1px;
    }
    
    .tile-percentage {
        font-size: 0.6rem !important;
    }
    
    .tile-rank {
        font-size: 0.45rem;
        padding: 0px 2px;
        top: 1px;
        left: 1px;
        border-radius: 3px;
    }

    
    .coin360-tooltip {
        max-width: calc(100vw - 16px);
        padding: 8px;
        font-size: 0.75rem;
    }
    
    .tooltip-header {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .tooltip-name {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    
    .tooltip-stats div {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }
    
    .tooltip-note {
        font-size: 0.65rem;
        margin-top: 6px;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* Banner Ad Styles */
.banner-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.banner-ad-1 {
    width: 350px;
    height: 80px;
}

.banner-ad-2 {
    width: 350px;
    height: 80px;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive banner adjustments */
@media (max-width: 768px) {
    .banner-ad-1, .banner-ad-2 {
        width: 280px;
        height: 64px;
    }
    
    .header {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .banner-ad-1, .banner-ad-2 {
        width: 210px;
        height: 48px;
    }
}

/* Sponsored Section Styles - Ultra Compact */
.sponsored-section {
    margin-bottom: 0px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 6px;
    border: 1px solid rgba(249, 202, 36, 0.3);
}

.sponsored-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 300px;
    margin: 0 auto;
}

.sponsored-tile {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(249, 202, 36, 0.4);
    border-radius: 6px;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sponsored-tile:hover {
    transform: scale(1.02);
    border-color: #f9ca24;
    box-shadow: 0 2px 8px rgba(249, 202, 36, 0.2);
}

.sponsored-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #f9ca24;
    color: #000;
    padding: 0px 2px;
    border-radius: 4px;
    font-size: 0.45rem;
    font-weight: bold;
    text-transform: uppercase;
}

.sponsored-image {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin: 0 auto 3px;
    border: 1px solid rgba(249, 202, 36, 0.5);
    object-fit: cover;
}

.sponsored-symbol {
    font-size: 0.78rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 2px;
    line-height: 1;
}

.sponsored-name {
    font-size: 0.5rem;
    color: #cccccc;
    margin-bottom: 2px;
    line-height: 1;
}

.sponsored-address {
    font-size: 0.45rem;
    color: #888888;
    font-family: monospace;
    word-break: break-all;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 2px;
    border-radius: 2px;
    line-height: 1.1;
}

/* Responsive Design for Sponsored Section */
@media (max-width: 768px) {
    .sponsored-section {
        padding: 4px;
        margin-bottom: 6px;
    }

    .sponsored-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        max-width: 250px;
    }

    .sponsored-tile {
        padding: 4px;
        min-height: 40px;
    }

    .sponsored-image {
        width: 16px;
        height: 16px;
    }

    .sponsored-symbol {
        font-size: 0.6rem;
    }

    .sponsored-badge {
        font-size: 0.4rem;
        padding: 0px 1px;
    }
}

@media (max-width: 480px) {
    .sponsored-section {
        padding: 3px;
        margin-bottom: 5px;
    }

    .sponsored-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3px;
        max-width: 200px;
    }

    .sponsored-tile {
        padding: 3px;
        min-height: 35px;
    }

    .sponsored-image {
        width: 14px;
        height: 14px;
    }

    .sponsored-symbol {
        font-size: 0.55rem;
    }

    .sponsored-name {
        font-size: 0.45rem;
    }

    .sponsored-address {
        font-size: 0.4rem;
    }
}

/* SEO Footer Styles */
.seo-footer {
    margin-top: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05), rgba(78, 205, 196, 0.05));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.seo-content h3 {
    color: #4ecdc4;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(78, 205, 196, 0.3);
}

.seo-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: center;
}

.seo-content strong {
    color: #f9ca24;
    font-weight: bold;
}

.seo-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.keyword-tag {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .seo-footer {
        margin-top: 30px;
        padding: 20px 15px;
    }
    
    .seo-content h3 {
        font-size: 1.1rem;
    }
    
    .seo-content p {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .keyword-tag {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Advertise CTA Button */
.advertise-cta {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.advertise-button {
    display: inline-block;
    background: linear-gradient(45deg, #f9ca24, #ff6b6b);
    color: #000;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(249, 202, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.advertise-button:hover {
    background: linear-gradient(45deg, #ff6b6b, #f9ca24);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(249, 202, 36, 0.5);
    color: #000;
}

.advertise-subtitle {
    margin-top: 8px;
    color: #aaaaaa;
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
}

/* Mobile responsiveness for Advertise button */
@media (max-width: 768px) {
    .advertise-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .advertise-subtitle {
        font-size: 0.75rem;
    }
}

/* Contact Us Section */
.contact-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-section h3 {
    color: #4ecdc4;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(78, 205, 196, 0.3);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, rgba(78, 205, 196, 0.2), rgba(255, 107, 107, 0.2));
    color: #ffffff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(78, 205, 196, 0.2);
}

.contact-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.contact-link:hover {
    background: linear-gradient(45deg, rgba(78, 205, 196, 0.4), rgba(255, 107, 107, 0.4));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
    color: #ffffff;
}

/* Mobile responsiveness for Contact section */
@media (max-width: 768px) {
    .contact-section h3 {
        font-size: 1rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .contact-link {
        font-size: 0.8rem;
        padding: 8px 16px;
        width: fit-content;
    }

    .contact-icon {
        width: 18px;
        height: 18px;
    }
}

/* 🫧 BUBBLE VIEW STYLES - CryptoBubbles Exact Style */
.bubble-container {
    display: none;
    position: relative;
    width: 100%;
    height: 650px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d30 50%, #1a1a1a 100%);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible; /* Allow ranking badges to be fully visible */
    padding: 20px; /* Add padding to account for ranking badges extending outside bubbles */
    box-sizing: border-box;
}

.bubble-item {
    position: absolute;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(30, 30, 30, 0.8); /* Semi-transparent background like CryptoBubbles */
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    text-align: center;
    overflow: visible; /* Allow content to be visible outside bubble */
    font-family: 'Arial', sans-serif;
    animation: floatBubble 6s ease-in-out infinite;
    padding: 8px; /* Add internal padding to prevent content cutoff */
    box-sizing: border-box;
}

.bubble-item:hover {
    transform: scale(1.08);
    z-index: 100;
    animation-play-state: paused;
}

.bubble-rank {
    position: absolute;
    top: -12px;
    right: -12px;
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.4);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.bubble-image {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-bottom: 3px;
    margin-top: 5px; /* Add top padding to prevent image cutoff */
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bubble-symbol {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.bubble-change {
    font-size: 0.7rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px; /* Add bottom padding to prevent text cutoff */
    padding-bottom: 2px; /* Extra bottom padding */
}

.bubble-market-cap {
    display: none; /* Hide market cap for cleaner look like CryptoBubbles */
}

/* Floating animations for bubbles - Multiple variations */
@keyframes floatBubble {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    25% {
        transform: translateY(-8px) translateX(4px);
    }
    50% {
        transform: translateY(-4px) translateX(-6px);
    }
    75% {
        transform: translateY(-12px) translateX(2px);
    }
}

@keyframes floatBubble2 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(-6px) translateX(-3px);
    }
    66% {
        transform: translateY(-10px) translateX(5px);
    }
}

@keyframes floatBubble3 {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    20% {
        transform: translateY(-5px) translateX(2px);
    }
    40% {
        transform: translateY(-8px) translateX(-4px);
    }
    60% {
        transform: translateY(-3px) translateX(3px);
    }
    80% {
        transform: translateY(-11px) translateX(-2px);
    }
}

/* Bubble size classes based on market cap - More distinct size differences */
.bubble-xl {
    width: 170px;
    height: 170px;
    padding: 15px; /* More padding for larger bubbles */
}

.bubble-large {
    width: 140px;
    height: 140px;
    padding: 12px;
}

.bubble-medium {
    width: 110px;
    height: 110px;
    padding: 10px;
}

.bubble-small {
    width: 85px;
    height: 85px;
    padding: 8px;
}

.bubble-xs {
    width: 65px;
    height: 65px;
    padding: 6px; /* More distinct from small bubbles */
}

/* Adjust font sizes for different bubble sizes */
.bubble-xl .bubble-symbol {
    font-size: 1.1rem;
}

.bubble-xl .bubble-change {
    font-size: 0.9rem;
}

.bubble-large .bubble-symbol {
    font-size: 1rem;
}

.bubble-large .bubble-change {
    font-size: 0.8rem;
}

.bubble-medium .bubble-symbol {
    font-size: 0.9rem;
}

.bubble-medium .bubble-change {
    font-size: 0.75rem;
}

.bubble-small .bubble-symbol {
    font-size: 0.8rem;
}

.bubble-small .bubble-change {
    font-size: 0.7rem;
}

.bubble-xs .bubble-symbol {
    font-size: 0.7rem;
}

.bubble-xs .bubble-change {
    font-size: 0.6rem;
}

/* CryptoBubbles-style glowing border effects */
.bubble-positive {
    border: 2px solid #00ff88;
    box-shadow:
        0 0 10px rgba(0, 255, 136, 0.3),
        0 0 20px rgba(0, 255, 136, 0.1),
        inset 0 0 10px rgba(0, 255, 136, 0.1);
}

.bubble-negative {
    border: 2px solid #ff4757;
    box-shadow:
        0 0 10px rgba(255, 71, 87, 0.3),
        0 0 20px rgba(255, 71, 87, 0.1),
        inset 0 0 10px rgba(255, 71, 87, 0.1);
}

.bubble-neutral {
    border: 2px solid #747d8c;
    box-shadow:
        0 0 10px rgba(116, 125, 140, 0.2),
        0 0 20px rgba(116, 125, 140, 0.1),
        inset 0 0 10px rgba(116, 125, 140, 0.1);
}

/* Intensity variations with stronger glow effects */
.bubble-positive.intense {
    border: 3px solid #00ff88;
    box-shadow:
        0 0 15px rgba(0, 255, 136, 0.5),
        0 0 30px rgba(0, 255, 136, 0.2),
        0 0 45px rgba(0, 255, 136, 0.1),
        inset 0 0 15px rgba(0, 255, 136, 0.15);
}

.bubble-negative.intense {
    border: 3px solid #ff4757;
    box-shadow:
        0 0 15px rgba(255, 71, 87, 0.5),
        0 0 30px rgba(255, 71, 87, 0.2),
        0 0 45px rgba(255, 71, 87, 0.1),
        inset 0 0 15px rgba(255, 71, 87, 0.15);
}

.bubble-positive.mild {
    border: 1px solid #00ff88;
    box-shadow:
        0 0 8px rgba(0, 255, 136, 0.2),
        0 0 15px rgba(0, 255, 136, 0.1),
        inset 0 0 8px rgba(0, 255, 136, 0.08);
}

.bubble-negative.mild {
    border: 1px solid #ff4757;
    box-shadow:
        0 0 8px rgba(255, 71, 87, 0.2),
        0 0 15px rgba(255, 71, 87, 0.1),
        inset 0 0 8px rgba(255, 71, 87, 0.08);
}

/* Mobile responsiveness for bubble view */
@media (max-width: 768px) {
    .bubble-container {
        height: 550px;
        padding: 15px; /* Reduced padding for mobile but still account for ranking badges */
    }

    .bubble-rank {
        width: 22px;
        height: 22px;
        font-size: 0.55rem;
        top: -10px;
        right: -10px;
        border: 1px solid rgba(255, 255, 255, 0.4);
    }

    .bubble-xl {
        width: 130px;
        height: 130px;
        padding: 10px;
    }

    .bubble-large {
        width: 110px;
        height: 110px;
        padding: 8px;
    }

    .bubble-medium {
        width: 90px;
        height: 90px;
        padding: 6px;
    }

    .bubble-small {
        width: 70px;
        height: 70px;
        padding: 5px;
    }

    .bubble-xs {
        width: 50px;
        height: 50px;
        padding: 4px; /* More distinct size difference */
    }

    /* Adjust bubble images for mobile */
    .bubble-image {
        width: 18px;
        height: 18px;
        margin-bottom: 2px;
        margin-top: 4px; /* Ensure top padding on mobile */
    }

    .bubble-xs .bubble-image,
    .bubble-small .bubble-image {
        width: 14px;
        height: 14px;
        margin-top: 3px;
    }

    /* Ensure bottom padding for mobile text */
    .bubble-change {
        margin-bottom: 4px;
        padding-bottom: 2px;
    }

    /* Adjust font sizes for mobile */
    .bubble-xl .bubble-symbol {
        font-size: 0.9rem;
    }

    .bubble-xl .bubble-change {
        font-size: 0.7rem;
    }

    .bubble-large .bubble-symbol {
        font-size: 0.8rem;
    }

    .bubble-large .bubble-change {
        font-size: 0.65rem;
    }

    .bubble-medium .bubble-symbol,
    .bubble-small .bubble-symbol {
        font-size: 0.7rem;
    }

    .bubble-medium .bubble-change,
    .bubble-small .bubble-change {
        font-size: 0.6rem;
    }

    .bubble-xs .bubble-symbol {
        font-size: 0.6rem;
    }

    .bubble-xs .bubble-change {
        font-size: 0.5rem;
    }
}


