/* Auth Modal Styles - Using Global CSS Variables */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    opacity: 0;
    transition: var(--transition);
    justify-content: center;
    align-items: center;
}

.auth-modal.active {
    opacity: 1;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.auth-modal-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--primary-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(20px);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 20px;
    box-shadow: var(--shadow-card);
}

.auth-modal.active .auth-modal-content {
    transform: scale(1);
}

/* Modal Header */
.auth-modal-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.auth-modal-header h2 {
    margin: 0;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.auth-modal-close:hover {
    background: var(--glass-bg);
    color: var(--accent-red);
    transform: rotate(90deg);
}

/* Modal Body */
.auth-modal-body {
    padding: 1rem 2rem 2rem;
}

/* Form Styles */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--accent-red);
    background: var(--card-bg);
    box-shadow: 0 0 0 2px var(--accent-red-glow);
}

.auth-form .form-control::placeholder {
    color: var(--text-muted);
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--accent-red);
}

/* Auth Options Container */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Switch-style Remember Me */
.remember-me-container {
    display: flex;
    align-items: center;
}

.switch-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.switch-input {
    display: none;
}

.switch-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: var(--glass-bg);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.switch-slider:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glass);
}

.switch-input:checked ~ .switch-slider {
    background: var(--gradient-primary);
    border-color: var(--accent-red);
}

.switch-input:checked ~ .switch-slider:before {
    transform: translateX(26px);
    background: var(--text-primary);
}

.switch-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: var(--transition);
}

.switch-input:checked ~ .switch-text {
    color: var(--accent-red);
}

/* Enhanced Forgot Password Link */
.forgot-password-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.forgot-password-link:hover {
    color: var(--accent-red);
    background: var(--accent-red-glow);
    border-color: var(--glass-border);
    text-decoration: none;
    transform: translateY(-1px);
}

.forgot-password-link:active {
    transform: translateY(0);
}

/* Buttons */
.login-btn, .register-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius);
    color: var(--accent-white);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.login-btn:hover, .register-btn:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-red-glow);
}

.login-btn:disabled, .register-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Auth Divider */

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Social Auth */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--card-bg);
    border-color: var(--accent-red);
    transform: translateY(-1px);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.auth-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--accent-secondary);
}

/* GDPR Section */
.gdpr-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
}

.gdpr-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
}

.gdpr-checkbox:hover {
    background: var(--card-bg);
}

.gdpr-checkbox:last-child {
    margin-bottom: 0;
}

.gdpr-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--accent-red);
    cursor: pointer;
    flex-shrink: 0;
}

.gdpr-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
    cursor: pointer;
}

.gdpr-text a {
    color: var(--accent-red);
    text-decoration: underline;
    font-weight: 600;
    transition: var(--transition);
}

.gdpr-text a:hover {
    color: var(--accent-secondary);
}

.gdpr-checkbox input[type="checkbox"]:checked ~ .gdpr-text {
    color: var(--text-primary);
}

/* Responsive adjustments */
@media (max-width: 568px) {
    .auth-modal-content {
        width: 95%;
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .auth-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .auth-modal-body {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .switch-text {
        font-size: 0.85rem;
    }
    
    .forgot-password-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .gdpr-section {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .gdpr-checkbox {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .gdpr-checkbox label {
        font-size: 0.85rem;
    }
}

/* Light theme automatically inherits from global CSS variables */