/**
 * Blade Boss Tools Hub
 * iOS-Inspired Premium Mobile-First Design
 * 
 * @version 1.1.0 - Light/Dark Mode Support
 */

/* ============================================
   CSS Variables - Light Mode (Default)
   ============================================ */
:root {
    /* App Height (set by JS for iOS PWA compatibility) */
    --app-height: 100vh;
    
    /* Brand Colors (constant) */
    --bb-green: #1E5E34;
    --bb-green-light: #2A7A48;
    --bb-green-glow: rgba(30, 94, 52, 0.3);
    --bb-orange: #F57842;
    
    /* Base Palette (for reference) */
    --bb-navy: #0a0f15;
    --bb-navy-light: #111827;
    --bb-white: #ffffff;
    --bb-gray-100: #f3f4f6;
    --bb-gray-200: #e5e7eb;
    --bb-gray-300: #d1d5db;
    --bb-gray-400: #9ca3af;
    --bb-gray-500: #6b7280;
    --bb-gray-600: #4b5563;
    --bb-gray-700: #374151;
    --bb-gray-800: #1f2937;
    --bb-gray-900: #111827;
    
    /* === SEMANTIC THEME VARIABLES (Light Mode Default) === */
    
    /* Backgrounds */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #f1f5f9;
    
    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;
    
    /* Cards & Surfaces */
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-bg-solid: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --card-hover-bg: rgba(30, 94, 52, 0.08);
    --card-hover-border: var(--bb-green);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    /* Header */
    --header-bg: rgba(255, 255, 255, 0.85);
    --header-border: rgba(0, 0, 0, 0.08);
    
    /* Buttons */
    --btn-secondary-bg: rgba(0, 0, 0, 0.06);
    --btn-secondary-hover: rgba(0, 0, 0, 0.1);
    --btn-secondary-text: #1e293b;
    
    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(20px);
    
    /* Modals */
    --modal-backdrop: rgba(0, 0, 0, 0.4);
    --modal-bg: #ffffff;
    
    /* Tool Sheet */
    --sheet-bg: #f8fafc;
    --sheet-header-bg: rgba(255, 255, 255, 0.95);
    
    /* Misc */
    --divider: rgba(0, 0, 0, 0.08);
    --icon-bg: rgba(0, 0, 0, 0.06);
    --ripple-color: rgba(0, 0, 0, 0.1);
    
    /* Safe areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    
    /* Layout */
    --header-height: 60px;
    --bottom-nav-height: 56px;
    
    /* Theme transition */
    --theme-transition: 0.3s ease;
}

/* ============================================
   Dark Mode Theme Override
   ============================================ */
.dark-mode {
    /* Backgrounds */
    --bg-primary: #0a0f15;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-gradient-start: #0a0f15;
    --bg-gradient-end: #111827;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Cards & Surfaces */
    --card-bg: rgba(17, 24, 39, 0.8);
    --card-bg-solid: #1f2937;
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover-bg: rgba(30, 94, 52, 0.15);
    --card-hover-border: var(--bb-green);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4);
    
    /* Header */
    --header-bg: rgba(10, 15, 21, 0.9);
    --header-border: rgba(255, 255, 255, 0.1);
    
    /* Buttons */
    --btn-secondary-bg: rgba(255, 255, 255, 0.1);
    --btn-secondary-hover: rgba(255, 255, 255, 0.15);
    --btn-secondary-text: #ffffff;
    
    /* Glass effects */
    --glass-bg: rgba(17, 24, 39, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Modals */
    --modal-backdrop: rgba(0, 0, 0, 0.7);
    --modal-bg: #1f2937;
    
    /* Tool Sheet */
    --sheet-bg: #0a0f15;
    --sheet-header-bg: rgba(10, 15, 21, 0.95);
    
    /* Misc */
    --divider: rgba(255, 255, 255, 0.1);
    --icon-bg: rgba(255, 255, 255, 0.1);
    --ripple-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   Base Styles
   ============================================ */
html.tools-hub-page,
html.tools-hub-page body {
    overflow: hidden !important;
    width: 100% !important;
    height: var(--app-height) !important;
    overscroll-behavior: none !important;
    touch-action: pan-x pan-y;
}

.tools-hub-container {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    padding-top: var(--safe-top);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 20px);
    overflow-x: hidden;
    overflow-y: hidden;
    transition: background var(--theme-transition);
}

/* ============================================
   Header
   ============================================ */
.tools-hub-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--header-border);
    padding-top: var(--safe-top);
    transition: background var(--theme-transition), border-color var(--theme-transition);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 16px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.header-left {
    width: 44px;
}

.header-right {
    justify-content: flex-end;
    gap: 8px;
}

.back-btn,
.settings-btn,
.header-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-secondary-bg);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease, background var(--theme-transition), color var(--theme-transition);
    text-decoration: none;
}

.back-btn:hover,
.settings-btn:hover,
.header-nav-btn:hover {
    background: var(--btn-secondary-hover);
    transform: scale(1.05);
}

.back-btn svg,
.settings-btn svg,
.header-nav-btn svg {
    width: 20px;
    height: 20px;
}

.header-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    transition: color var(--theme-transition);
}

/* ============================================
   Main Content
   ============================================ */
.tools-hub-main {
    position: fixed;
    top: calc(var(--header-height) + var(--safe-top));
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--app-height) - var(--header-height) - var(--safe-top));
    overflow: hidden;
    overscroll-behavior: none;
}

/* View Panels - NOT scrollable by default */
.view-panel {
    display: none;
    animation: fadeIn 0.3s ease;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

.view-panel.active {
    display: block;
}

/* Categories view - internal scroll */
#view-categories {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 20px);
}

/* Tools view - tools-list scrolls, not the view */
#view-tools {
    overflow: hidden !important;
    display: none;
    padding: 0;
}

#view-tools.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#view-tools .tools-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 20px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================
   Welcome Section
   ============================================ */
.welcome-section {
    margin-bottom: 24px;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    transition: background var(--theme-transition), border-color var(--theme-transition), box-shadow var(--theme-transition);
}

.welcome-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--bb-green);
}

.welcome-text {
    flex: 1;
}

.welcome-greeting {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    transition: color var(--theme-transition);
}

.welcome-greeting strong {
    color: var(--text-primary);
}

.welcome-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-tertiary);
    transition: color var(--theme-transition);
}

.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.tier-free { background: var(--bb-gray-700); color: var(--bb-gray-300); }
.tier-badge.tier-rookie { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.tier-badge.tier-master { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.tier-badge.tier-legend { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

/* ============================================
   Anonymous Hero Banner (cold traffic landing CTA)
   April 2026 — funnel ungate
   ============================================ */
.welcome-section.anonymous-hero {
    margin-bottom: 28px;
}

.anon-hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: background var(--theme-transition), border-color var(--theme-transition), box-shadow var(--theme-transition);
}

/* Subtle green accent glow in the top-right corner — premium polish */
.anon-hero-content::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--bb-green-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.6;
}

.anon-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 5px 12px 5px 10px;
    background: rgba(30, 94, 52, 0.12);
    border: 1px solid rgba(30, 94, 52, 0.25);
    border-radius: 999px;
    position: relative;
    z-index: 1;
}

.anon-hero-pulse {
    width: 8px;
    height: 8px;
    background: var(--bb-green-light);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(42, 122, 72, 0.6);
    animation: anon-hero-pulse-anim 2s ease-out infinite;
}

@keyframes anon-hero-pulse-anim {
    0% { box-shadow: 0 0 0 0 rgba(42, 122, 72, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(42, 122, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(42, 122, 72, 0); }
}

.anon-hero-badge-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    color: var(--bb-green-light);
    text-transform: uppercase;
}

.anon-hero-headline {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0;
    position: relative;
    z-index: 1;
    transition: color var(--theme-transition);
}

.anon-hero-subhead {
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    z-index: 1;
    transition: color var(--theme-transition);
}

.anon-hero-cta-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.anon-hero-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--bb-green) 0%, var(--bb-green-light) 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--bb-green-glow);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.anon-hero-cta-primary:hover,
.anon-hero-cta-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px var(--bb-green-glow);
    filter: brightness(1.05);
    outline: none;
}

.anon-hero-cta-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px var(--bb-green-glow);
}

.anon-hero-cta-primary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.anon-hero-cta-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    transition: color var(--theme-transition);
}

/* Larger screens — give the headline more breathing room and inline the meta */
@media (min-width: 480px) {
    .anon-hero-content {
        padding: 26px 24px 24px;
    }
    
    .anon-hero-headline {
        font-size: 26px;
    }
    
    .anon-hero-subhead {
        font-size: 16px;
    }
}

@media (min-width: 768px) {
    .anon-hero-headline {
        font-size: 30px;
    }
    
    .anon-hero-cta-row {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
    
    .anon-hero-cta-primary {
        width: auto;
        min-width: 280px;
    }
    
    .anon-hero-cta-meta {
        text-align: left;
    }
}

/* Reduced motion — kill the pulse for users who request it */
@media (prefers-reduced-motion: reduce) {
    .anon-hero-pulse {
        animation: none;
    }
    
    .anon-hero-cta-primary:hover {
        transform: none;
    }
}

/* ============================================
   Section Titles
   ============================================ */
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 4px;
    transition: color var(--theme-transition);
}

/* ============================================
   Recent Tools Section
   ============================================ */
.recent-tools-section {
    margin-bottom: 28px;
}

.recent-tools-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding: 0 4px;
}

.recent-tools-grid::-webkit-scrollbar {
    display: none;
}

.recent-tool-card {
    flex: 0 0 auto;
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease, background var(--theme-transition), border-color var(--theme-transition);
    scroll-snap-align: start;
    position: relative;
    box-shadow: var(--card-shadow);
}

.recent-tool-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.recent-tool-card:active {
    transform: scale(0.95);
}

.recent-tool-card .tool-icon {
    font-size: 28px;
}

.recent-tool-card .tool-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
    transition: color var(--theme-transition);
}

.recent-tool-card.locked {
    opacity: 0.6;
}

.recent-tool-card .lock-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
}

/* ============================================
   Categories Grid
   ============================================ */
.categories-section {
    margin-bottom: 24px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1), background var(--theme-transition), border-color var(--theme-transition);
    position: relative;
    overflow: hidden;
    text-align: left;
    min-height: 130px;
    box-shadow: var(--card-shadow);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 94, 52, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:active {
    transform: scale(0.97);
}

.category-card.highlighted {
    background: linear-gradient(135deg, rgba(30, 94, 52, 0.2) 0%, rgba(245, 120, 66, 0.05) 100%);
    border-color: rgba(30, 94, 52, 0.4);
}

.category-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.category-info {
    flex: 1;
}

.category-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color var(--theme-transition);
}

.category-description {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
    transition: color var(--theme-transition);
}

.category-arrow {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg);
    border-radius: 50%;
    color: var(--text-tertiary);
    transition: all 0.2s ease, background var(--theme-transition), color var(--theme-transition);
}

.category-card:hover .category-arrow {
    background: var(--bb-green);
    color: #ffffff;
    transform: translateX(3px);
}

.category-arrow svg {
    width: 14px;
    height: 14px;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease, background var(--theme-transition), border-color var(--theme-transition);
    text-align: left;
    box-shadow: var(--card-shadow);
    flex-shrink: 0;
}

.tool-card:hover {
    border-color: var(--card-hover-border);
    background: var(--card-hover-bg);
    transform: translateX(4px);
    box-shadow: var(--card-shadow-hover);
}

.tool-card:active {
    transform: scale(0.98);
}

.tool-card.locked {
    opacity: 0.7;
}

.tool-card.coming-soon {
    opacity: 0.6;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg);
    border-radius: 14px;
    font-size: 24px;
    flex-shrink: 0;
    transition: background var(--theme-transition);
}

.tool-card-info {
    flex: 1;
    min-width: 0;
}

.tool-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color var(--theme-transition);
}

.tool-card-subtitle {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--theme-transition);
}

.tool-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-badge.new {
    background: var(--bb-green);
    color: var(--bb-white);
}

.tool-badge.coming-soon {
    background: var(--bb-orange);
    color: var(--bb-white);
}

.tool-badge.locked {
    background: var(--bb-gray-600);
    color: var(--bb-gray-300);
}

.tool-card-arrow {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--theme-transition);
}

.tool-card:hover .tool-card-arrow {
    color: var(--bb-green);
}

.tool-card-arrow svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Tool Sheet (Full Screen Modal)
   ============================================ */
.tool-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: var(--sheet-bg);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background var(--theme-transition);
    display: flex;
    flex-direction: column;
}

.tool-sheet.active {
    transform: translateY(0);
}

.tool-sheet-header {
    flex-shrink: 0;
    background: var(--sheet-header-bg);
    border-bottom: 1px solid var(--card-border);
    padding-top: var(--safe-top);
    transition: background var(--theme-transition), border-color var(--theme-transition);
}

.sheet-drag-handle {
    width: 36px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 3px;
    margin: 10px auto 8px;
    transition: background var(--theme-transition);
}

.sheet-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px 14px;
}

.sheet-tool-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color var(--theme-transition);
}

.sheet-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-secondary-bg);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease, background var(--theme-transition), color var(--theme-transition);
}

.sheet-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sheet-close-btn svg {
    width: 20px;
    height: 20px;
}

.tool-sheet-body {
    flex: 1;
    overflow: hidden;
}

.tool-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bb-white);
}

/* ============================================
   Upgrade Modal
   ============================================ */
.upgrade-modal,
.coming-soon-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.upgrade-modal.active,
.coming-soon-modal.active {
    opacity: 1;
    visibility: visible;
}

.upgrade-modal-backdrop,
.coming-soon-backdrop {
    position: absolute;
    inset: 0;
    background: var(--modal-backdrop);
    backdrop-filter: blur(5px);
    transition: background var(--theme-transition);
}

.upgrade-modal-content,
.coming-soon-content {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: var(--modal-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease, background var(--theme-transition), border-color var(--theme-transition);
    box-shadow: var(--card-shadow-hover);
}

.upgrade-modal.active .upgrade-modal-content,
.coming-soon-modal.active .coming-soon-content {
    transform: scale(1);
}

.upgrade-modal-close,
.coming-soon-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-secondary-bg);
    border: none;
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease, background var(--theme-transition), color var(--theme-transition);
}

.upgrade-modal-close:hover,
.coming-soon-close:hover {
    background: var(--btn-secondary-hover);
    color: var(--text-primary);
}

.upgrade-modal-close svg,
.coming-soon-close svg {
    width: 18px;
    height: 18px;
}

.upgrade-icon,
.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upgrade-title,
.coming-soon-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: color var(--theme-transition);
}

.upgrade-message,
.coming-soon-message {
    font-size: 14px;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-bottom: 24px;
    transition: color var(--theme-transition);
}

.upgrade-message strong {
    color: var(--bb-orange);
}

.upgrade-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--bb-green) 0%, var(--bb-green-light) 100%);
    border: none;
    border-radius: 12px;
    color: var(--bb-white);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--bb-green-glow);
}

.upgrade-btn svg {
    width: 18px;
    height: 18px;
}

.upgrade-cancel,
.coming-soon-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease, border-color var(--theme-transition), color var(--theme-transition);
}

.upgrade-cancel:hover,
.coming-soon-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ============================================
   Desktop Styles (768px+)
   ============================================ */
@media (min-width: 768px) {
    .tools-hub-container {
        padding-bottom: 40px;
    }
    
    .tools-hub-main {
        max-width: 900px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .category-card {
        min-height: 150px;
        padding: 24px 20px;
    }
    
    .recent-tools-grid {
        gap: 16px;
    }
    
    .recent-tool-card {
        width: 120px;
        padding: 20px 16px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    /* Desktop: Modal instead of full-screen sheet */
    .tool-sheet {
        background: var(--modal-backdrop);
        backdrop-filter: blur(5px);
        transform: none;
        opacity: 0;
        visibility: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px;
    }
    
    .tool-sheet.active {
        opacity: 1;
        visibility: visible;
    }
    
    .tool-sheet-header {
        background: var(--card-bg-solid);
        border-radius: 20px 20px 0 0;
        padding-top: 0;
    }
    
    .sheet-drag-handle {
        display: none;
    }
    
    .sheet-header-content {
        padding: 16px 20px;
    }
    
    .tool-sheet-body {
        background: var(--bb-white);
        border-radius: 0 0 20px 20px;
        max-width: 900px;
        max-height: 80vh;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .tool-sheet .tool-sheet-header,
    .tool-sheet .tool-sheet-body {
        max-width: 900px;
        width: 100%;
        margin: 0 auto;
    }
    
    .tool-sheet > * {
        flex-shrink: 0;
    }
    
    .tool-sheet-body {
        flex: 1;
        min-height: 500px;
    }
}

/* ============================================
   Large Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .tools-hub-main {
        max-width: 1100px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading state for tool cards */
.tool-card.loading {
    pointer-events: none;
}

.tool-card.loading .tool-card-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--bb-green);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Hide bottom nav when tool sheet is open
   ============================================ */
body.tool-sheet-open .bb-mobile-tabbar {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

body.tool-sheet-open .tools-hub-header {
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   Enhanced Touch Feedback (iOS-style)
   ============================================ */

/* Active press state - scale down */
.category-card:active,
.tool-card:active,
.recent-tool-card:active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
}

/* Ripple effect container */
.category-card,
.tool-card,
.recent-tool-card,
.header-nav-btn,
.sheet-close-btn,
.upgrade-btn,
.upgrade-cancel,
.coming-soon-btn {
    position: relative;
    overflow: hidden;
}

/* Ripple animation */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: var(--ripple-color);
    transform: scale(0);
    animation: ripple-effect 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-effect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Success pulse animation */
@keyframes success-pulse {
    0% { box-shadow: 0 0 0 0 rgba(30, 94, 52, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(30, 94, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(30, 94, 52, 0); }
}

.success-pulse {
    animation: success-pulse 0.5s ease-out;
}

/* Button press feedback */
.back-btn:active,
.settings-btn:active,
.header-nav-btn:active,
.sheet-close-btn:active {
    transform: scale(0.9) !important;
    transition: transform 0.1s ease !important;
}

/* Modal button press */
.upgrade-btn:active,
.upgrade-cancel:active,
.coming-soon-btn:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease !important;
}

/* Tool card slide feedback */
.tool-card {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tool-card:active {
    transform: scale(0.98) translateX(4px) !important;
    background: var(--card-hover-bg) !important;
}

/* Category card bounce on tap */
.category-card {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-card.tapped {
    animation: card-bounce 0.3s ease;
}

@keyframes card-bounce {
    0% { transform: scale(1); }
    30% { transform: scale(0.95); }
    60% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Sheet opening animation enhancement */
.tool-sheet.active {
    animation: sheet-slide-up 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes sheet-slide-up {
    0% {
        transform: translateY(100%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Loading shimmer for tool iframe */
.tool-iframe-loading {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ============================================
   Theme Toggle Button
   ============================================ */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-secondary-bg);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease, background var(--theme-transition), color var(--theme-transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--btn-secondary-hover);
    transform: scale(1.05);
}

.theme-toggle:active {
    transform: scale(0.9) !important;
}

/* Icon positioning - stack them on top of each other */
.theme-toggle svg {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* Light mode (default): Show moon icon (to switch to dark) */
.theme-toggle svg.icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle svg.icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Dark mode: Show sun icon (to switch to light) */
.dark-mode .theme-toggle svg.icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.dark-mode .theme-toggle svg.icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

/* ============================================
   Anonymous Bottom CTA + Tier Ladder
   April 2026 — funnel close after tool browsing
   ============================================ */
.anon-bottom-cta-section {
    margin: 40px 0 32px;
}

.anon-bottom-cta-card {
    position: relative;
    padding: 32px 22px 28px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    text-align: center;
    transition: background var(--theme-transition), border-color var(--theme-transition), box-shadow var(--theme-transition);
}

/* Subtle green ambient glow — anchors the moment without screaming */
.anon-bottom-cta-card::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, var(--bb-green-glow) 0%, transparent 65%);
    pointer-events: none;
    opacity: 0.5;
    z-index: 0;
}

.anon-bottom-cta-card > * {
    position: relative;
    z-index: 1;
}

/* === Eyebrow === */
.anon-bottom-cta-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}

.anon-bottom-cta-eyebrow-line {
    flex: 0 0 28px;
    height: 1px;
    background: var(--card-border);
}

.anon-bottom-cta-eyebrow-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    transition: color var(--theme-transition);
}

/* === Headline === */
.anon-bottom-cta-headline {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin: 0 0 12px;
    transition: color var(--theme-transition);
}

/* === Subhead === */
.anon-bottom-cta-subhead {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 auto 22px;
    max-width: 480px;
    transition: color var(--theme-transition);
}

/* === Feature list === */
.anon-bottom-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 auto 26px;
    max-width: 520px;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.anon-bottom-cta-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: color var(--theme-transition);
}

.anon-bottom-cta-feature-icon {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 94, 52, 0.15);
    border-radius: 50%;
    color: var(--bb-green-light);
}

.anon-bottom-cta-feature-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

/* === Tier ladder === */
.anon-bottom-cta-tier-ladder {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0 auto 24px;
    max-width: 480px;
}

.anon-tier-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background var(--theme-transition);
}

.anon-tier-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

.anon-tier-pill-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.2px;
    transition: color var(--theme-transition);
}

.anon-tier-pill-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    transition: color var(--theme-transition);
}

.anon-tier-pill-mo {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-left: 2px;
    transition: color var(--theme-transition);
}

/* Tier-specific accent colors */
.anon-tier-pill-rookie {
    border-color: rgba(59, 130, 246, 0.25);
}
.anon-tier-pill-rookie .anon-tier-pill-name {
    color: #60a5fa;
}

.anon-tier-pill-legend {
    border-color: rgba(245, 158, 11, 0.25);
}
.anon-tier-pill-legend .anon-tier-pill-name {
    color: #fbbf24;
}

/* Master tier — the decoy winner. Elevated, glowing, badge-flagged. */
.anon-tier-pill-master {
    background: linear-gradient(135deg, rgba(30, 94, 52, 0.12) 0%, rgba(42, 122, 72, 0.18) 100%);
    border: 1px solid var(--bb-green-light);
    box-shadow: 0 4px 18px var(--bb-green-glow);
    padding-top: 22px;
}

.anon-tier-pill-master .anon-tier-pill-name {
    color: var(--bb-green-light);
}

.anon-tier-pill-master .anon-tier-pill-price {
    color: var(--text-primary);
}

.anon-tier-pill-popular {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--bb-green) 0%, var(--bb-green-light) 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 8px var(--bb-green-glow);
}

/* === CTA button === */
.anon-bottom-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 380px;
    min-height: 54px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--bb-green) 0%, var(--bb-green-light) 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px var(--bb-green-glow);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    margin: 0 auto 14px;
}

.anon-bottom-cta-btn:hover,
.anon-bottom-cta-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px var(--bb-green-glow);
    filter: brightness(1.05);
    outline: none;
}

.anon-bottom-cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 12px var(--bb-green-glow);
}

.anon-bottom-cta-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.anon-bottom-cta-meta {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
    max-width: 420px;
    margin: 0 auto;
    transition: color var(--theme-transition);
}

/* === Larger screens — tighter, more confident layout === */
@media (min-width: 480px) {
    .anon-bottom-cta-card {
        padding: 36px 28px 32px;
    }
    
    .anon-bottom-cta-headline {
        font-size: 28px;
    }
    
    .anon-bottom-cta-subhead {
        font-size: 16px;
    }
    
    .anon-bottom-cta-features {
        grid-template-columns: 1fr 1fr;
        gap: 12px 24px;
    }
}

@media (min-width: 768px) {
    .anon-bottom-cta-section {
        margin: 56px 0 40px;
    }
    
    .anon-bottom-cta-card {
        padding: 44px 36px 36px;
    }
    
    .anon-bottom-cta-headline {
        font-size: 32px;
    }
    
    .anon-bottom-cta-tier-ladder {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
        max-width: 620px;
        align-items: stretch;
    }
    
    .anon-tier-pill {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 18px 14px;
        text-align: center;
    }
    
    .anon-tier-pill-master {
        transform: translateY(-6px);
        padding-top: 26px;
    }
    
    .anon-tier-pill-master:hover {
        transform: translateY(-7px);
    }
}

/* Reduced motion — kill all transforms */
@media (prefers-reduced-motion: reduce) {
    .anon-tier-pill,
    .anon-tier-pill-master,
    .anon-bottom-cta-btn {
        transition: none;
    }
    
    .anon-tier-pill:hover,
    .anon-tier-pill-master:hover,
    .anon-bottom-cta-btn:hover {
        transform: none;
    }
}

/* ============================================
   Anonymous Signup Prompt Modal (April 2026)
   Fired by iframe preview tools when an anonymous user attempts a gated action
   (save, PDF, send-to-LCC, history, save-zones).
   Hardcoded dark theme — matches the showcase modal pattern. Modals are
   "moments" and stay high-contrast regardless of page theme.
   ============================================ */
.bb-signup-prompt-container {
    position: fixed;
    inset: 0;
    z-index: 10001; /* above showcase modal in case of edge-case stacking */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    overscroll-behavior: contain;
}

.bb-signup-prompt-container * {
    box-sizing: border-box;
}

.bb-signup-prompt-container.active {
    opacity: 1;
    visibility: visible;
}

.bb-signup-prompt-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
}

.bb-signup-prompt-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 36px 24px 22px;
    background: linear-gradient(180deg, #0f1828 0%, #0a1220 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(30, 94, 52, 0.15) inset;
    text-align: center;
    transform: scale(0.94) translateY(24px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bb-signup-prompt-container.active .bb-signup-prompt-modal {
    transform: scale(1) translateY(0);
}

/* Subtle green ambient glow at top — visual anchor without overwhelming */
.bb-signup-prompt-modal::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 220px;
    background: radial-gradient(ellipse at center, rgba(42, 122, 72, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.bb-signup-prompt-modal > * {
    position: relative;
    z-index: 1;
}

/* === Close button === */
.bb-signup-prompt-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.bb-signup-prompt-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: scale(1.05);
}

.bb-signup-prompt-close:active {
    transform: scale(0.95);
}

/* === Icon === */
.bb-signup-prompt-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 12px rgba(42, 122, 72, 0.4));
}

/* === Title === */
.bb-signup-prompt-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

/* === Body === */
.bb-signup-prompt-body {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 22px;
}

/* === Perks list === */
.bb-signup-prompt-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.bb-signup-prompt-perk {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.bb-signup-prompt-perk-check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 94, 52, 0.25);
    border: 1px solid rgba(42, 122, 72, 0.5);
    border-radius: 50%;
    color: #34d399;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* === CTA button === */
.bb-signup-prompt-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1E5E34 0%, #2A7A48 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(30, 94, 52, 0.4);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    margin-bottom: 6px;
}

.bb-signup-prompt-cta:hover,
.bb-signup-prompt-cta:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(30, 94, 52, 0.5);
    filter: brightness(1.08);
    outline: none;
}

.bb-signup-prompt-cta:active {
    transform: translateY(0);
    box-shadow: 0 3px 14px rgba(30, 94, 52, 0.4);
}

/* === Dismiss link === */
.bb-signup-prompt-dismiss {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    font-family: inherit;
}

.bb-signup-prompt-dismiss:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* === Tight mobile (sub-380px viewports) === */
@media (max-width: 380px) {
    .bb-signup-prompt-container {
        padding: 12px;
    }
    
    .bb-signup-prompt-modal {
        padding: 30px 18px 18px;
        border-radius: 20px;
    }
    
    .bb-signup-prompt-icon {
        font-size: 42px;
        margin-bottom: 12px;
    }
    
    .bb-signup-prompt-title {
        font-size: 20px;
    }
    
    .bb-signup-prompt-body {
        font-size: 14px;
        margin-bottom: 18px;
    }
}

/* === Tablet+ polish === */
@media (min-width: 768px) {
    .bb-signup-prompt-modal {
        padding: 40px 32px 28px;
    }
    
    .bb-signup-prompt-title {
        font-size: 24px;
    }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    .bb-signup-prompt-container,
    .bb-signup-prompt-modal,
    .bb-signup-prompt-close,
    .bb-signup-prompt-cta {
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }
    
    .bb-signup-prompt-modal {
        transform: none;
    }
    
    .bb-signup-prompt-container.active .bb-signup-prompt-modal {
        transform: none;
    }
    
    .bb-signup-prompt-cta:hover,
    .bb-signup-prompt-close:hover {
        transform: none;
    }
}