/* Стили для модального окна входа администратора */

/* Модальное окно должно быть правильно позиционировано */
#admin-modal.modal {
    display: none;
    position: fixed;
    z-index: 10000 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

#admin-modal.modal[style*="display: block"] {
    display: flex !important;
}

/* Специальные стили для админ-модального окна */
.modal-content.admin-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    max-width: 450px;
    width: 90%;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 10001 !important;
}

.modal-content.admin-modal .modal-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-content.admin-modal .modal-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content.admin-modal .close-btn {
    color: white;
    font-size: 32px;
    font-weight: 300;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.modal-content.admin-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    color: #ff4757;
}

/* Форма входа */
.admin-form {
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
}

.admin-form .form-group {
    margin-bottom: 25px;
}

.admin-form label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-form input[type="text"],
.admin-form input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus {
    outline: none;
    border-color: #ffdd59;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 221, 89, 0.2);
    transform: translateY(-2px);
}

.admin-form input[type="text"]::placeholder,
.admin-form input[type="password"]::placeholder {
    color: #999;
}

/* Кнопка входа */
#admin-login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #ffdd59 0%, #ffa502 100%);
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 221, 89, 0.4);
    margin-top: 10px;
}

#admin-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 221, 89, 0.6);
    background: linear-gradient(135deg, #ffa502 0%, #ffdd59 100%);
}

#admin-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 221, 89, 0.4);
}

#admin-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Сообщение об ошибке */
.error-message {
    margin-top: 15px;
    padding: 12px 16px;
    background: rgba(255, 71, 87, 0.2);
    border: 2px solid rgba(255, 71, 87, 0.5);
    border-radius: 10px;
    color: #ff4757;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Адаптивность */
@media (max-width: 600px) {
    .modal-content.admin-modal {
        max-width: 95%;
        margin: 10% auto;
        border-radius: 15px;
    }
    
    .modal-content.admin-modal .modal-header {
        padding: 20px;
    }
    
    .modal-content.admin-modal .modal-header h2 {
        font-size: 20px;
    }
    
    .admin-form {
        padding: 20px;
    }
    
    .admin-form input[type="text"],
    .admin-form input[type="password"] {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    #admin-login-btn {
        padding: 14px;
        font-size: 14px;
    }
}

/* Анимация появления */
.modal-content.admin-modal {
    animation: modalSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

