/* === RESET AND BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #181A20;
    color: #fff;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
    min-height: 100vh;
}

/* === HEADER === */
.header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    border: 2px solid #3DE1C6;
    border-radius: 15px;
    background: rgba(61, 225, 198, 0.05);
    box-shadow: 
        0 0 20px rgba(61, 225, 198, 0.3),
        inset 0 0 20px rgba(61, 225, 198, 0.1);
}

.title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
    margin-bottom: 10px;
    animation: glow-pulse 3s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.2rem;
    color: #A1A1AA;
    margin-top: 8px;
    text-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes glow-pulse {
    from { text-shadow: 0 0 10px #3DE1C6, 0 0 20px #3DE1C6, 0 0 30px #3DE1C6; }
    to { text-shadow: 0 0 15px #3DE1C6, 0 0 25px #3DE1C6, 0 0 40px #3DE1C6; }
}

/* === CONTROLS === */
.controls {
    display: none;
}

/* === SEARCH SUPPORT ROW === */
.search-support-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

#searchInput {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #181a20;
    color: #fff;
    width: 260px;
}

.support-message {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #b5b5b5;
}

.support-message a {
    color: #6c63ff;
    text-decoration: underline;
}

/* === STATS === */
.metadata-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, #23262F 60%, #2C2F36 100%);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 24px 32px;
    min-width: 180px;
    text-align: center;
    transition: box-shadow 0.2s;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
}

.stat-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
}

.stat-label {
    font-size: 1rem;
    color: #A1A1AA;
    margin-bottom: 8px;
    font-weight: 500;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
}

/* === LOADING === */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 32px 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 6px solid #23262F;
    border-top: 6px solid #FFB300;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text {
    color: #A1A1AA;
    font-size: 1.1rem;
}

/* === TABLE === */
.table-container {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(61, 225, 198, 0.3);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(61, 225, 198, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 25px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #23262F;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.14);
}

.leaderboard-table th {
    background: #23262F;
    color: #A1A1AA;
    padding: 16px 12px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #3DE1C6;
    position: relative;
    font-size: 1rem;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
}

.leaderboard-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.leaderboard-table th.sortable:hover {
    background: linear-gradient(135deg, #2a2a3e, #26314e);
    text-shadow: 0 0 10px #3DE1C6;
}

.leaderboard-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    color: #666;
    font-size: 0.8rem;
}

.leaderboard-table th.sort-asc::after {
    content: '↑';
    color: #3DE1C6;
}

.leaderboard-table th.sort-desc::after {
    content: '↓';
    color: #3DE1C6;
}

.leaderboard-table td {
    padding: 16px 12px;
    text-align: center;
    font-size: 1rem;
    border-bottom: 1px solid #2C2F36;
    transition: all 0.3s ease;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
}

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

.leaderboard-table tr:hover td {
    background: rgba(61, 225, 198, 0.05);
    color: #fff;
}

/* === RANK STYLING === */
.rank-badge {
    background: #23262F;
    color: #fff;
    font-weight: 900;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 1rem;
}

/* === AUTHORITY ADDRESS === */
.authority-address {
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}
.authority-address:hover {
    color: #FFB300;
}

/* === DONATION BANNER === */
.donation-banner {
    background: #23262F;
    color: #E0E0E0;
    border-radius: 12px;
    padding: 18px 28px;
    margin: 24px auto 32px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
    font-size: 1.05rem;
}
.donation-title {
    font-weight: 700;
    color: #FFB300;
    font-size: 1.15rem;
    margin-right: 8px;
}
.donation-text {
    display: block;
    margin: 8px 0 4px 0;
    color: #A1A1AA;
}
.donation-address {
    font-family: 'Roboto Mono', monospace;
    background: #181A20;
    color: #3DE1C6;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-block;
    margin-top: 6px;
    transition: background 0.2s, color 0.2s;
}
.donation-address:hover {
    background: #3DE1C6;
    color: #181A20;
}

/* === INLINE DONATION BANNER === */
.donation-inline-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 24px;
    background: linear-gradient(135deg, #23262F 60%, #2C2F36 100%);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    padding: 12px 20px;
    min-width: 320px;
    max-width: 400px;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
    font-size: 1rem;
    align-items: flex-start;
}
.donation-inline-banner .donation-title {
    font-weight: 700;
    color: #FFB300;
    font-size: 1.08rem;
    margin-bottom: 2px;
}
.donation-inline-banner .donation-text {
    color: #A1A1AA;
    margin-bottom: 6px;
    font-size: 0.98rem;
}
.donation-inline-banner .donation-address {
    font-family: 'Roboto Mono', monospace;
    background: #181A20;
    color: #3DE1C6;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.98rem;
    cursor: pointer;
    margin-top: 2px;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
}
.donation-inline-banner .donation-address:hover {
    background: #3DE1C6;
    color: #181A20;
}

/* === TOP DONATION BANNER === */
.donation-top-banner {
    width: 100%;
    background: linear-gradient(90deg, #23262F 80%, #2C2F36 100%);
    color: #E0E0E0;
    border-radius: 8px;
    padding: 8px 0;
    margin: 0 0 18px 0;
    text-align: center;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.donation-top-banner .donation-address {
    font-family: 'Roboto Mono', monospace;
    background: #181A20;
    color: #3DE1C6;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.98rem;
    cursor: pointer;
    margin-left: 4px;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
}
.donation-top-banner .donation-address:hover {
    background: #3DE1C6;
    color: #181A20;
}

/* === NUMBER FORMATTING === */
.number-large {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.number-zero {
    font-size: 1.1rem;
    font-weight: 700;
    color: #A1A1AA;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    margin: 48px 0;
    padding: 80px 20px;
    color: #A1A1AA;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #888;
    margin-bottom: 6px;
}

.empty-subtitle {
    font-size: 1rem;
    color: #666;
}

/* === FOOTER === */
.footer {
    margin-top: 48px;
    background: #23262F;
    border-radius: 12px;
    padding: 16px 0;
    color: #A1A1AA;
    font-size: 1rem;
    border-top: 2px solid rgba(61, 225, 198, 0.3);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-left, .footer-right {
    color: #888;
    font-size: 0.9rem;
}

.status-indicator {
    font-weight: 700;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.status-indicator[style*="#ff6b35"] {
    color: #FF6B35 !important;
}

/* === COPY NOTIFICATION === */
.copy-notification {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: #23262F;
    color: #FFB300;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
    transform: translateX(400px);
}

.copy-notification.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* === DEPLOYED TOOLTIP === */
.deployed-tooltip {
    background: #23262F;
    color: #E0E0E0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', 'Roboto Mono', Arial, sans-serif;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    z-index: 9999;
    pointer-events: none;
    max-width: 320px;
    line-height: 1.4;
    display: none;
    border: 1px solid #3DE1C6;
    text-align: left;
    letter-spacing: 0.2px;
    opacity: 0.97;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: space-between;
        width: 100%;
    }
    
    .search-input {
        min-width: auto;
        flex: 1;
        margin-left: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .leaderboard-table {
        min-width: 800px;
    }
    
    .authority-address {
        max-width: 100px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .header {
        padding: 15px;
    }
    
    .controls {
        padding: 15px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    
    .authority-address {
        max-width: 80px;
    }
}

/* === COLUMN SPECIFIC STYLING === */
.rank-col {
    width: 80px;
    text-align: center;
}

.authority-col {
    width: 180px;
}

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

/* === HOVER EFFECTS === */
@media (hover: hover) {
    .stat-card:hover .stat-value {
        transform: scale(1.1);
        transition: transform 0.3s ease;
    }
    
    .leaderboard-table tr:hover {
        transform: scale(1.01);
        z-index: 1;
        position: relative;
    }
}

/* === ANIMATIONS === */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
