/* ========================================
   AUTH MODAL STYLES
   ======================================== */

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal.hidden {
    display: none;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    padding: 40px;
    text-align: center;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.auth-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.auth-modal-header {
    margin-bottom: 32px;
}

.auth-modal-header .auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.auth-modal-header .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-main);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-modal-body {
    margin-bottom: 24px;
}

.btn-google-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: white;
    color: #1f1f1f;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google-signin:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.auth-guest-note {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-guest-note a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

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

.auth-modal-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.auth-modal-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-modal-footer a {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* ========================================
   PROFILE DROPDOWN STYLES
   ======================================== */

.profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
}

.profile-trigger:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tier-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.tier-free {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.tier-badge.tier-starter {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

.tier-badge.tier-creator {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.tier-badge.tier-pro {
    background: rgba(255, 77, 0, 0.1);
    color: var(--accent-primary);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    z-index: 100;
    overflow: hidden;
}

.profile-menu.hidden {
    display: none;
}

.profile-menu-header {
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.profile-menu-header strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.profile-menu-header span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-menu-credits {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 77, 0, 0.05);
}

.profile-menu-credits span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-menu-credits strong {
    color: var(--accent-primary);
}

.profile-menu-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

.profile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.profile-menu a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.profile-menu a.text-danger {
    color: #ef4444;
}

.profile-menu a.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Profile Dropdown Menu Open State */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #1a1a1d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

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

.dropdown-header {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.87);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dropdown-item.text-danger {
    color: #f87171;
}

.dropdown-item.text-danger:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* Header Sign-In Button Enhancement */
.btn-signin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(180deg, #ff6b26 0%, #ff4d00 100%);
    border: none;
    border-radius: 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(255, 77, 0, 0.3);
}

.btn-signin:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(255, 77, 0, 0.4);
}

/* ========================================
   PAYWALL BANNER STYLES
   ======================================== */

.paywall-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: linear-gradient(135deg, var(--accent-primary), #e64500);
    padding: 16px 24px;
    animation: bannerSlideUp 0.3s ease-out;
}

.paywall-banner.hidden {
    display: none;
}

@keyframes bannerSlideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.paywall-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.paywall-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.paywall-text strong {
    font-size: 1rem;
    color: white;
}

.paywall-text span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.paywall-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.paywall-actions .btn-primary {
    background: white;
    color: var(--accent-primary);
    box-shadow: none;
}

.paywall-actions .btn-primary:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.paywall-actions .btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.paywall-actions .btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .auth-modal-content {
        padding: 32px 24px;
    }

    .profile-name {
        display: none;
    }

    .paywall-content {
        flex-direction: column;
        text-align: center;
    }

    .paywall-text {
        align-items: center;
    }
}