/* Import pixel font */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
    line-height: 1.8;
    font-size: 12px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 100px);
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

h1 {
    font-size: 1.8rem;
    font-weight: normal;
    background: linear-gradient(45deg, #2196F3, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-online { background-color: #4CAF50; }
.status-offline { background-color: #f44336; }
.status-unknown { background-color: #ff9800; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Tabs */
.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: 'Press Start 2P', monospace;
    transition: all 0.3s ease;
    color: #666;
}

.tab-button:hover {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.tab-button.active {
    background: #2196F3;
    color: white;
    box-shadow: 0 3px 10px rgba(33, 150, 243, 0.3);
}

/* Tab content */
.tab-content {
    display: none;
}

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

/* Grid and cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Make grid more responsive for 3 cards */
@media (min-width: 1000px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
    }
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    color: #2196F3;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Server info */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-label {
    font-weight: 600;
    color: #555;
}

.info-value {
    color: #333;
    font-family: 'Courier New', monospace;
}

/* Player list */
.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #2196F3;
    transition: all 0.3s ease;
}

.player-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.player-name {
    font-weight: bold;
    color: #2196F3;
    font-size: 1.1rem;
}

.player-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 5px 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-weight: bold;
    color: #4CAF50;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
}

/* Leaderboards */
.leaderboard {
    margin-bottom: 30px;
}

.leaderboard h4 {
    color: #2196F3;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-list {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s ease;
}

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

.leaderboard-item:nth-child(1) { background: linear-gradient(90deg, #ffd700, #ffed4e); }
.leaderboard-item:nth-child(2) { background: linear-gradient(90deg, #c0c0c0, #e8e8e8); }
.leaderboard-item:nth-child(3) { background: linear-gradient(90deg, #cd7f32, #daa520); }

.rank {
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    margin-right: 15px;
    min-width: 30px;
}

.player-info {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.stat-display {
    font-weight: bold;
    color: #2196F3;
    font-size: 1.1rem;
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #f44336;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-radius: 15px;
    color: #666;
}

footer a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .tabs {
        flex-direction: column;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Stack player stats vertically on mobile */
    .player-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px 15px;
    }

    .player-stats {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        width: 100%;
        padding: 10px 15px;
    }

    .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Death card styling - match other cards */
.death-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Full width modifier */
.full-width {
    width: 100%;
    margin-bottom: 50px;
}

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

.death-card h3 {
    color: #2196F3;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.death-message {
    background: #ffffff;
    border-left: 4px solid #2196F3;
    padding: 15px;
    margin: 10px 0;
    border-radius: 0 8px 8px 0;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    color: #000000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.death-player {
    color: #2196F3;
    font-weight: bold;
    font-size: 1.1em;
}

.death-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.7rem;
    color: #666;
}

.death-count {
    background: #2196F3;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
}

.death-time {
    font-style: italic;
    opacity: 0.8;
    color: #555;
}

.no-death {
    text-align: center;
    color: #4CAF50;
    font-style: italic;
    padding: 20px;
}

.death-skull {
    font-size: 2rem;
    display: block;
    text-align: center;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


/* Utility classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }