* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    color: #666;
}

.tab-btn:hover {
    background: #f0f2f5;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.main-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.5rem;
    color: #333;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 150px;
    background: #f8f9fa;
    line-height: 1.6;
}

.quick-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.quick-buttons button {
    background: #f0f2f5;
    border: 1px solid #e1e5e9;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.quick-buttons button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.status-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 500;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.game-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.game-card h3 {
    color: #333;
    margin-bottom: 5px;
}

.game-card .game-id {
    color: #888;
    font-size: 0.85rem;
    font-family: monospace;
}

.game-card .game-stats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    font-size: 0.85rem;
    color: #888;
}

.game-card .game-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.game-card .game-actions button {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-sm {
    background: #667eea;
    color: white;
}

.btn-sm:hover {
    background: #5a67d8;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

/* Whitelist */
.whitelist-add {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.whitelist-add input {
    flex: 1;
    min-width: 150px;
    padding: 10px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
}

.whitelist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.whitelist-item {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whitelist-item .user-id {
    font-weight: 600;
    color: #333;
}

.whitelist-item .username {
    font-size: 0.85rem;
    color: #888;
}

.whitelist-item .remove-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.whitelist-item .remove-btn:hover {
    background: #c53030;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
}

.close:hover {
    color: #333;
}

.empty-message {
    color: #999;
    text-align: center;
    padding: 30px;
}

/* Responsive */
@media (max-width: 600px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .whitelist-add {
        flex-direction: column;
    }
    
    .whitelist-add input {
        width: 100%;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 20px;
    }
}