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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 2px solid #0f4c75;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    color: #3282b8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.server-address {
    font-family: monospace;
    color: #888;
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Connect Box */
.connect-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    border: 1px solid #3282b8;
}

.connect-label {
    color: #888;
    font-size: 0.9rem;
}

.connect-cmd {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #2ecc71;
    background: rgba(0,0,0,0.3);
    padding: 8px 15px;
    border-radius: 4px;
    user-select: all;
}

.copy-btn {
    background: transparent;
    border: 1px solid #3282b8;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(50,130,184,0.3);
}

/* Connection Status Indicator */
.status-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(0,0,0,0.3);
    font-size: 0.9rem;
}

.status-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #888;
    animation: pulse 2s infinite;
}

.status-indicator.connected .dot {
    background: #2ecc71;
}

.status-indicator.disconnected .dot {
    background: #e74c3c;
    animation: none;
}

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

/* Sections */
section {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.1);
}

h2 {
    color: #3282b8;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(50,130,184,0.3);
    padding-bottom: 10px;
}

h3 {
    color: #bbe1fa;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.info-card {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-card .label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.info-card .value {
    display: block;
    font-size: 1.4rem;
    font-weight: bold;
    color: #bbe1fa;
}

.info-card .value.map {
    color: #f39c12;
}

.info-card .value.players {
    color: #2ecc71;
}

.info-card .value.online {
    color: #2ecc71;
}

.info-card .value.offline {
    color: #e74c3c;
}

/* Players Table */
.player-table {
    width: 100%;
    border-collapse: collapse;
}

.player-table th,
.player-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.player-table th {
    background: rgba(0,0,0,0.3);
    color: #3282b8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.player-table tbody tr:hover {
    background: rgba(50,130,184,0.1);
}

.player-table .rank {
    color: #f39c12;
    font-weight: bold;
    width: 60px;
}

.player-table .name {
    font-weight: 500;
}

.player-table .frags {
    color: #2ecc71;
    font-weight: bold;
    font-size: 1.1rem;
    width: 80px;
}

.player-table .ping {
    font-family: monospace;
    width: 80px;
}

.player-table .ping.good { color: #2ecc71; }
.player-table .ping.ok { color: #f1c40f; }
.player-table .ping.bad { color: #e74c3c; }

.no-players {
    text-align: center;
    color: #888;
    padding: 40px;
    font-style: italic;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.chart-container {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 20px;
    height: 280px;
}

.chart-container canvas {
    max-height: 220px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

footer a {
    color: #3282b8;
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .status-indicator {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
    
    .connect-box {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }
    
    .connect-cmd {
        font-size: 1rem;
        padding: 6px 10px;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .player-table th,
    .player-table td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

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

section {
    animation: fadeIn 0.3s ease-out;
}