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

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

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

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #495057;
    font-size: 24px;
}

.header .server-info {
    text-align: right;
    color: #6c757d;
    font-size: 14px;
}

.nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav a {
    color: #495057;
    text-decoration: none;
    padding: 8px 15px;
    margin-right: 10px;
    border-radius: 5px;
    display: inline-block;
    font-weight: 500;
}

.nav a:hover {
    background: #495057;
    color: white;
}

.nav a.active {
    background: #007bff;
    color: white;
}

.content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-form {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.login-form h2 {
    color: #495057;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    background: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn:hover {
    background: #0056b3;
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 8px 15px;
    font-size: 13px;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.card h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
}

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

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card.green {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-card.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card h4 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
}

.players-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.players-table thead {
    background: #007bff;
    color: white;
}

.players-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.players-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.players-table tbody tr:hover {
    background: #f8f9fa;
}

.players-table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-spawning {
    background: #fff3cd;
    color: #856404;
}

.ping-good {
    color: #28a745;
    font-weight: 600;
}

.ping-ok {
    color: #ffc107;
    font-weight: 600;
}

.ping-bad {
    color: #dc3545;
    font-weight: 600;
}

.map-display {
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    color: #333;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.map-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 1;
}

.map-display .content-wrapper {
    position: relative;
    z-index: 2;
}

.map-display h2 {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #495057;
}

.map-display .map-name {
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-transform: uppercase;
    color: #333;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.map-btn {
    padding: 15px;
    text-align: center;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.map-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.map-btn:hover::before {
    left: 100%;
}

.map-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.console-output {
    background: #1e1e1e;
    color: #00ff00;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
}

.quick-commands {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.refresh-btn {
    background: #17a2b8;
    margin-left: 10px;
}

.refresh-btn:hover {
    background: #138496;
}

.team-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.team-card {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.team-card h4 {
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
}

.team-card .count {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

/* ===== Public Dashboard Styles ===== */

.connect-link {
    display: inline-block;
    background: #343a40;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 4px;
    margin: 4px 0;
    user-select: all;
    cursor: text;
}

.login-link {
    display: inline-block;
    margin-top: 6px;
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.login-link:hover {
    color: #007bff;
}

.auto-update-badge {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    animation: pulse-live 2s infinite;
}
.auto-update-badge.updating {
    background: #fff3cd;
    color: #856404;
    animation: none;
}
.auto-update-badge.error {
    background: #f8d7da;
    color: #721c24;
    animation: none;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.public-footer {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    color: #495057;
}
.public-footer code {
    background: #343a40;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}