/* Admin UI Styles */

/* Floating Admin Button */
.admin-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: adminButtonFloat 3s ease-in-out infinite;
}

.admin-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-button.authenticated {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    animation: adminButtonSuccess 2s ease-in-out;
}

@keyframes adminButtonFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes adminButtonSuccess {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Admin Modal */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.admin-modal.show {
    display: flex;
}

.admin-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: white;
}

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

.admin-modal-header h2 {
    margin: 0;
    color: white;
}

.admin-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.admin-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Admin Login Form */
.admin-login-form {
    text-align: center;
    padding: 2rem 0;
}

.admin-login-form h3 {
    margin-bottom: 1.5rem;
    color: white;
}

.admin-input {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.admin-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.admin-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.admin-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.admin-btn.primary {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Admin Dashboard */
.admin-dashboard {
    display: none;
}

.admin-dashboard.show {
    display: block;
}

.admin-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

/* Player List Styles */
.players-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

.player-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.player-item:last-child {
    border-bottom: none;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.player-stats {
    font-size: 0.9rem;
    opacity: 0.8;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-btn.small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

/* Edit Player Form */
.edit-player-form {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.edit-player-form.show {
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Loading and Status */
.admin-loading {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
}

.admin-error {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.5);
    color: #ffcdd2;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.admin-success {
    background: rgba(67, 233, 123, 0.2);
    border: 1px solid rgba(67, 233, 123, 0.5);
    color: #c8e6c9;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-modal-content {
        padding: 1rem;
        max-width: 95vw;
    }
    
    .player-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .player-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .admin-btn {
        width: 100%;
    }
}

/* Animation for status messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-error, .admin-success {
    animation: slideIn 0.3s ease-out;
}
