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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

header h1 {
    font-size: 2em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.header-stats .stat {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-stats .label {
    color: #999;
    font-size: 0.9em;
}

.header-stats .value {
    color: #fff;
    font-weight: 600;
    font-size: 1.1em;
}

.header-stats .value.online {
    color: #4ade80;
}

#servers-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.server-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.server-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.server-card.offline {
    opacity: 0.5;
    border-color: rgba(239, 68, 68, 0.5);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.server-name {
    font-size: 1.3em;
    font-weight: 600;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.online {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #fff;
}

.challenges-section {
    margin-top: 20px;
}

.challenges-section h4 {
    font-size: 0.95em;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.challenge-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-id {
    font-family: 'Courier New', monospace;
    color: #a78bfa;
    font-weight: 600;
}

.challenge-workers {
    color: #999;
    font-size: 0.9em;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.totals-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.totals-section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #fff;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.total-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.total-label {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 10px;
}

.total-value {
    font-size: 2em;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-message {
    color: #ef4444;
    font-size: 0.9em;
    margin-top: 10px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
}

.uptime {
    font-size: 0.85em;
    color: #999;
    margin-top: 5px;
}

@media (max-width: 768px) {
    #servers-container {
        grid-template-columns: 1fr;
    }

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

    .totals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
