/* Leaderboard Styles */
#leaderboard {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 2rem 0 5rem;
    min-height: 100vh;
}

.leaderboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.solana-price {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.solana-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.solana-price .price {
    font-weight: 600;
    color: #00ff9c;
    background: linear-gradient(90deg, #00ff9c 0%, #00f7ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.solana-price .price-change {
    font-size: 0.9em;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    background: rgba(0, 255, 156, 0.1);
    color: #00ff9c;
}

.solana-price .price-change.negative {
    background: rgba(255, 0, 0, 0.1);
    color: #ff3a3a;
}

/* Connection status indicator */
#connection-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

#connection-status.online {
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

#connection-status.offline {
    background-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

#connection-status::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(0.8);
        opacity: 0;
    }
}

.leaderboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.leaderboard-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff 0%, #e94560 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.leaderboard-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tab-btn.active {
    background: rgba(233, 69, 96, 0.2);
    color: #e94560;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.2);
}

.social-links a:hover {
    background-color: rgba(233, 69, 96, 0.2);
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
    border: 1px solid rgba(233, 69, 96, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: rgba(233, 69, 96, 0.2);
    transform: translateY(-1px);
    color: #fff;
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn i {
    transition: transform 0.3s ease;
}

.refresh-btn:hover i {
    transform: rotate(180deg);
}

.table-container {
    background: rgba(15, 23, 42, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: #fff;
    font-size: 0.95rem;
}

.leaderboard-table th {
    background: rgba(15, 23, 42, 0.9);
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    white-space: nowrap;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

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

.leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table thead th {
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 1rem 1.5rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Partnership token styling */
tr.partnership-token {
    position: relative;
    background: rgba(139, 92, 246, 0.05) !important;
    border-left: 3px solid #8b5cf6;
}

tr.partnership-token::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

tr.partnership-token:hover::after {
    opacity: 1;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* Token Icon */
.token-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.token-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e94560 0%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.token-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.token-symbol {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Text Colors */
.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

/* Price change indicators */
.price-up {
    color: #10b981;
    font-weight: 500;
}

.price-up::before {
    content: '▲ ';
    font-size: 0.8em;
}

.price-down {
    color: #ef4444;
    font-weight: 500;
}

.price-down::before {
    content: '▼ ';
    font-size: 0.8em;
}

/* Loading Row */
.loading-row {
    text-align: center;
    padding: 3rem 0;
}

.loading-row td {
    padding: 2rem 0 !important;
    text-align: center;
}

.loading-row p {
    color: #94a3b8;
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #e94560;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Offline message */
.offline-message {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
}

.offline-message i {
    margin-right: 0.5rem;
    color: #e94560;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
    }
    
    .leaderboard-table {
        min-width: 900px;
    }
    
    .leaderboard-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .refresh-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .leaderboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .leaderboard-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .tabs {
        width: 100%;
        justify-content: space-between;
    }
    
    .tab-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Creator Avatar */
.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.creator-name {
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
}

.creator-handle {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
}

.market-cap {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.change-positive {
    color: #10b981;
}

.change-negative {
    color: #ef4444;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-in-house {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Social link styles */
.links a, .links .unavailable {
    margin: 0 8px;
    color: #4a5568;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: inline-block;
    width: 24px;
    text-align: center;
}

.links a {
    color: #60a5fa;
    opacity: 1;
}

.links a:hover {
    color: #3b82f6;
    transform: translateY(-2px);
}

.links .unavailable {
    cursor: not-allowed;
    color: #4a5568 !important;
    opacity: 0.3;
}

.status-eliminated {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .leaderboard-tabs {
        justify-content: center;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid #2d3748;
        border-radius: 8px;
        padding: 1rem;
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        position: relative;
        padding-left: 40%;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: 600;
        color: #94a3b8;
    }
    
    .creator-cell {
        justify-content: flex-start;
    }
    
    .status-badge {
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: flex-end;
    }
}

.link-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    display: inline-block;
}

/* Pump.fun logo in footer */
.social-links .pumpfun-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links .pumpfun-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links .pumpfun-logo:hover {
    background-color: rgba(233, 69, 96, 0.2);
}

.social-links .pumpfun-logo img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.livestream-indicator.online {
    background-color: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.livestream-indicator.offline {
    background-color: #F44336;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
