/* Reset et variables CSS */
:root {
    --primary-color: #2d3748;
    --secondary-color: #4a5568;
    --accent-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, #1a202c 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

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

/* Header */
header {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid var(--border-color);
}

.header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--accent-color), #38a169);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.refresh-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
}

#last-update {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.refresh-btn {
    background: var(--secondary-color);
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: var(--accent-color);
    transform: rotate(180deg);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.95);
}

/* Server Card */
.server-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.server-card.online {
    border-left: 5px solid var(--accent-color);
}

.server-card.offline {
    border-left: 5px solid var(--danger-color);
}

.server-card.loading {
    border-left: 5px solid var(--warning-color);
}

.server-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.server-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
}

.status-online {
    background: rgba(72, 187, 120, 0.2);
    color: var(--accent-color);
}

.status-offline {
    background: rgba(245, 101, 101, 0.2);
    color: var(--danger-color);
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

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

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(72, 187, 120, 0.1);
    border-radius: 12px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Progress Bar */
.progress-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #38a169);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--warning-color), #dd6b20);
}

.progress-fill.danger {
    background: linear-gradient(90deg, var(--danger-color), #e53e3e);
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 20px;
}

.footer-note {
    margin-top: 5px;
    font-size: 0.85rem;
    opacity: 0.7;
}

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

    .header-content h1 {
        font-size: 1.5rem;
    }

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

    .server-card {
        padding: 25px;
    }
}

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

.server-card,
.stat-card,
.progress-section {
    animation: fadeIn 0.5s ease;
}
