/* ============================================
   MODALS - Auth Modal & PWA Prompt
   ============================================ */

/* Auth Modal */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal);
    opacity: 1;
    transition: opacity var(--transition-base);
}

.auth-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal-content h2 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.75rem;
}

.close-modal {
    position: absolute;
    right: var(--spacing-md);
    top: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: var(--accent-primary);
    color: #000000;
    transform: rotate(90deg);
}

#auth-toggle-text {
    margin-top: var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
}

#auth-toggle-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

#auth-toggle-link:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    z-index: var(--z-modal);
    max-width: 360px;
    opacity: 1;
    transform: translateY(0);
    transition: all var(--transition-bounce);
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-prompt.hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

.pwa-prompt-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    position: relative;
}

.pwa-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-bounce);
}

.pwa-close:hover {
    background: var(--accent-primary);
    color: #000000;
    transform: rotate(90deg);
}

.pwa-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.pwa-prompt-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pwa-prompt-content p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

.pwa-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

/* Responsive Modals */
@media (max-width: 640px) {
    .pwa-install-prompt {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        left: var(--spacing-md);
        max-width: none;
    }

    .pwa-buttons {
        flex-direction: column;
    }
}