/**
 * GunnyLau Auth Modal Styles
 * Phong cách đăng nhập/đăng ký hiện đại
 */

/* Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.auth-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-overlay.show .auth-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.auth-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.auth-close:hover {
    background: rgba(255, 107, 53, 0.3);
    color: #ff6b35;
    transform: rotate(90deg);
}

/* Form Container */
.auth-form-container {
    padding: 40px;
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

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

.auth-header h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Input with Icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 50px 14px 45px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.input-with-icon input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-with-icon input:focus {
    outline: none;
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.1);
}

.input-with-icon input:focus + svg,
.input-with-icon input:focus ~ svg {
    color: #ff6b35;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #ff6b35;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkbox-label .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #ff6b35;
    border-color: #ff6b35;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: #ff6b35;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Forgot Link */
.forgot-link {
    color: #ff6b35;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #ff8c5a;
    text-decoration: underline;
}

/* Submit Button */
.btn-auth-submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-auth-submit svg {
    transition: transform 0.3s ease;
}

.btn-auth-submit:hover svg {
    transform: translateX(5px);
}

/* Auth Message */
.auth-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.auth-message:not(:empty) {
    display: block;
}

.auth-message.error {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.auth-message.success {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 15px;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 15px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.social-btn.google:hover {
    border-color: #4285F4;
    background: rgba(66, 133, 244, 0.1);
}

.social-btn.facebook:hover {
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.1);
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.auth-switch a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 280px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
}

.user-email {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.user-menu-items {
    padding: 10px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ff6b35;
}

.user-menu-item svg {
    opacity: 0.6;
}

.user-menu-item:hover svg {
    opacity: 1;
}

.user-menu-item.logout {
    color: #e74c3c;
}

.user-menu-item.logout:hover {
    background: rgba(231, 76, 60, 0.1);
}

.user-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* User Profile Button (in header) */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 107, 53, 0.15);
    border: 2px solid #ff6b35;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    background: rgba(255, 107, 53, 0.25);
}

.user-avatar-small {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.user-name-small {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
}

.user-profile-btn svg {
    color: rgba(255, 255, 255, 0.6);
}

/* Notification Toast */
.auth-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    transform: translateX(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10001;
}

.auth-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 500px) {
    .auth-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    .auth-form-container {
        padding: 30px 20px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .user-menu-dropdown {
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .auth-notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Scrollbar for modal */
.auth-modal::-webkit-scrollbar {
    width: 6px;
}

.auth-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.auth-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.5);
    border-radius: 3px;
}

.auth-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.7);
}
