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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: rgb(27, 34, 27);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Custom scrollbar for entire page */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    
    
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.3);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.8), #4CAF50);
    z-index: 9999;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

@keyframes progress {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 5px;
}

header {
    padding: 11px 15px 8px 15px;
    margin-bottom: 5px;
}

h1 {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.stats-overview {
    display: inline-flex;
    gap: 30px;
    float: right;
    align-items: center;
}

.stat-card {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    
    text-align: center;
    transition: none;
    
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-value {
    display: inline;
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.stat-label {
    font-size: 0.8em;
    opacity: 0.6;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.7);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    background: #1e1e1e;
    padding: 8px;
    
    
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: 0;
    background: transparent;
    color: #4CAF50;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;

    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(0, 170, 255, 0.1);
}

.tab-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
}

.tab-content {
    display: none;
    background: #1e1e1e;
    
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    
}

.tab-content.active {
    display: block;
}

.leaderboard-header, .players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}


.refresh-btn, .primary-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: 0;

    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s;
}


.leaderboard-list {
    width: 100%;
    overflow-x: auto;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 60px 1fr 150px 150px 100px;
    align-items: center;
    padding: 20px;
    background: white;
    
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
}


.rank {
    font-size: 1.5em;
    font-weight: bold;
    color: #764ba2;
}

.rank.gold { color: #FFD700; }
.rank.silver { color: #C0C0C0; }
.rank.bronze { color: #CD7F32; }

.player-name {
    font-weight: 600;
    font-size: 1.1em;
}

.player-wallet {
    font-size: 0.9em;
    color: #666;
    font-family: monospace;
}

.consecutives {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
}

.status-badge {
    padding: 5px 15px;
    
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
}

.status-badge.confirmed {
    background: #4CAF50;
    color: white;
}

.status-badge.unconfirmed {
    background: #FFC107;
    color: white;
}

.status-badge.hot-seat {
    background: #f44336;
    color: white;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#playerFilter {
    padding: 10px;
    
    
    font-size: 1em;
    background: #2a2a2a;
    color: #e0e0e0;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.player-card {
    background: #2a2a2a;
    
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
    cursor: pointer;
    
    color: #e0e0e0;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.player-card-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #4CAF50;
}

.player-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    
}

.player-stat {
    display: flex;
    flex-direction: column;
}

.player-stat-label {
    font-size: 0.8em;
    color: #999;
    text-transform: uppercase;
}

.player-stat-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.lookup-container {
    max-width: 600px;
    margin: 0 auto;
}

.lookup-form {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

#lookupInput {
    flex: 1;
    padding: 15px;
    
    
    font-size: 1em;
    background: #2a2a2a;
    color: #e0e0e0;
}

.lookup-result {
    margin-top: 20px;
}

.player-detail {
    background: rgba(0, 0, 0, 0.3);
    
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
}

.player-detail-header {
    
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.player-detail-name {
    font-size: 2em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.player-detail-id {
    font-family: monospace;
    color: #666;
    font-size: 0.9em;
}

.player-detail-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.detail-stat {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    
    
}

.detail-stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 5px;
}

.detail-stat-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.ip-history {
    margin-top: 30px;
}

.ip-history h3 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.ip-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ip-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: #1e1e1e;
    
    font-family: monospace;
    
    color: #e0e0e0;
}

.loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2em;
}

.error {
    background: rgba(51, 17, 17, 0.3);
    color: rgba(255, 85, 85, 0.8);
    padding: 20px;
    
    text-align: center;
    
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: rgba(0, 0, 0, 0.95);
    margin: 2% auto;
    padding: 20px;
    
    width: auto;
    max-width: 95%;
    max-height: 96vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
    
    color: rgba(255, 255, 255, 0.7);
}

.close {
    color: rgba(255, 255, 255, 0.7);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: rgba(255, 255, 255, 0.9);
}

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

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

.suspect-indicator {
    display: inline-block;
    padding: 3px 8px;
    background: #ff5722;
    color: white;
    
    font-size: 0.8em;
    margin-left: 10px;
}

.server-metrics {
    margin-top: 30px;
}

.server-metrics h3 {
    color: #4CAF50;
    margin-bottom: 15px;
}

.server-table {
    width: 100%;
    
    background-color: #1e1e1e;
    color: #e0e0e0;
    font-size: 14px;
}

.server-table th {
    background-color: #333;
    color: #fff;
    padding: 10px;
    text-align: left;
    
}

.server-table td {
    padding: 10px;
    
    background-color: #2a2a2a;
}

.server-table .response-time {
    color: #4CAF50;
}

.server-table .ip-address {
    font-family: monospace;
    color: #888;
}

.server-table .rdns-text {
    font-size: 12px;
    color: #666;
}

/* Logs View Styles */
.logs-button {
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.logs-button:hover {
    transform: scale(1.05);
    background: rgba(76, 175, 80, 0.1);
    
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px rgba(76, 255, 80, 0.8),
                    0 0 10px rgba(76, 255, 80, 0.6),
                    0 0 15px rgba(76, 255, 80, 0.4);
    }
    50% {
        box-shadow: 0 0 10px rgba(76, 255, 80, 1),
                    0 0 20px rgba(76, 255, 80, 0.8),
                    0 0 30px rgba(76, 255, 80, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(76, 255, 80, 0.8),
                    0 0 10px rgba(76, 255, 80, 0.6),
                    0 0 15px rgba(76, 255, 80, 0.4);
    }
}

.logs-button.has-new-logs {
    animation: glowPulse 2s infinite;
    
    background: rgba(76, 255, 80, 0.1);
    padding: 8px 12px;
    margin: -8px -12px;
}

.logs-view {
    padding: 20px;
    width: 100%;
}

.logs-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;

}

.logs-header h2 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em;
    margin: 0;
}

.monitor-btn {
    padding: 10px 20px;
    background: rgba(76, 175, 80, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border: 0;

    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.monitor-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: translateX(-5px);
}

.logs-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    background: transparent;
    padding: 0;
}

.filter-btn {
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.6);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    min-width: 45px;
}

.filter-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: rgba(76, 175, 80, 0.2);
    color: rgba(76, 255, 80, 0.9);
    box-shadow: 0 0 10px rgba(76, 255, 80, 0.3);
}

.logs-filters select {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.7);
    
    
    cursor: pointer;
    font-size: 13px;
    outline: none;
    transition: all 0.3s;
}

.logs-filters select:hover {
    background: rgba(0, 0, 0, 0.7);
    
}

.logs-filters select:focus {
    background: rgba(0, 0, 0, 0.7);
    
}

.logs-filters select option {
    background: rgb(27, 34, 27);
    color: rgba(255, 255, 255, 0.7);
    padding: 5px;
}

.clear-logs-btn {
    padding: 8px 15px;
    background: rgba(255, 50, 50, 0.2);
    color: rgba(255, 100, 100, 0.9);
    
    
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-left: 10px;
}

.clear-logs-btn:hover {
    background: rgba(255, 50, 50, 0.3);
    transform: scale(1.05);
}

.logs-list {
    width: 100%;
}

.logs-table {
    width: 100%;
    
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    table-layout: auto;
}

.logs-table th {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 8px;
    text-align: left;
    
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logs-table td {
    padding: 8px;
    
    background: rgba(0, 0, 0, 0.05);
    
    vertical-align: top;
}

/* Keep timestamp, type, name, discord columns as nowrap */
.logs-table td:nth-child(1),
.logs-table td:nth-child(2),
.logs-table td:nth-child(3),
.logs-table td:nth-child(4) {
    white-space: nowrap;
}

/* Pre-formatted content in logs */
.logs-table pre {
    font-family: monospace;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    
    overflow-wrap: break-word;
}

.logs-table tr:hover td {
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.log-type-badge {
    padding: 3px 8px;
    
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.log-type-badge-small {
    padding: 2px 6px;
    
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
}

.log-rugged {
    color: rgba(255, 255, 255, 0.7);
}

.log-rugged .log-type-badge,
.log-rugged .log-type-badge-small {
    background: rgba(255, 100, 100, 0.2);
    
    color: rgba(255, 100, 100, 0.9);
}

.log-issue {
    color: rgba(255, 255, 255, 0.7);
}

.log-issue .log-type-badge,
.log-issue .log-type-badge-small {
    background: rgba(255, 200, 100, 0.2);
    
    color: rgba(255, 200, 100, 0.9);
}

/* User Logs in Modal */
.user-logs-section {
    margin-top: 20px;
}

.user-logs-table {
    width: 100%;
    
    background: rgba(0, 0, 0, 0.1);
    font-size: 12px;
    margin-top: 10px;
}

.user-logs-table th {
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.6);
    padding: 6px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
}

.user-logs-table td {
    padding: 5px 6px;
    
    color: rgba(255, 255, 255, 0.6);
}

.no-logs {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

@media (max-width: 768px) {
    .dashboard-table {
        font-size: 12px;
    }

    .dashboard-table th,
    .dashboard-table td {
        padding: 5px;
    }

    .players-grid {
        overflow-x: auto;
    }

    .stats-overview {
        grid-template-columns: 1fr;
    }

    .logs-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .logs-filters {
        width: 100%;
        justify-content: flex-end;
    }
}