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

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

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

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.community-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.community-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.community-item a {
    color: #4FC3F7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.community-item a:hover {
    color: #81D4FA;
}

.controls {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    backdrop-filter: blur(10px);
}

button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

button:hover {
    background: #45a049;
}

button:disabled {
    background: #666;
    cursor: not-allowed;
}

select {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

select:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255, 255, 255, 0.2);
}

select option {
    background: #2a5298;
    color: #fff;
    padding: 10px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-refresh label {
    font-size: 16px;
    font-weight: 500;
}

.ping-refresh {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ping-refresh label {
    font-size: 16px;
    font-weight: 500;
}

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

.server-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.server-card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.server-title {
    font-size: 1.3em;
    font-weight: bold;
}

.server-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-online {
    background: #4CAF50;
}

.status-offline {
    background: #f44336;
}

.status-loading {
    background: #ff9800;
}

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

.info-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 5px;
}

.info-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1em;
    font-weight: bold;
}

.players-section {
    margin-top: 15px;
}

.players-header {
    font-size: 1.1em;
    margin-bottom: 10px;
    font-weight: bold;
}

.players-table {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.players-table th,
.players-table td {
    padding: 8px;
    text-align: left;
}

.players-table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: bold;
}

.players-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

.connect-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.connect-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.connect-btn {
    flex: 1;
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.connect-btn:hover {
    background: #1976D2;
}

.console-command-section {
    margin-top: 10px;
}

.console-command-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.console-command-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    word-break: break-all;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.connect-btn.copy {
    background: #FF9800;
}

.connect-btn.copy:hover {
    background: #F57C00;
}

.connect-btn.copied {
    background: #4CAF50;
}

.last-update {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
}

.error-message {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #ffcdd2;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9em;
}

.ping-value {
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    display: inline-block;
}

.ping-good {
    background: rgba(76, 175, 80, 0.3);
    color: #a5d6a7;
}

.ping-medium {
    background: rgba(255, 152, 0, 0.3);
    color: #ffcc80;
}

.ping-bad {
    background: rgba(244, 67, 54, 0.3);
    color: #ef9a9a;
}

@media (max-width: 768px) {
    .server-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .auto-refresh,
    .ping-refresh {
        width: 100%;
        justify-content: space-between;
    }

    .connect-buttons {
        flex-direction: column;
    }
}
