/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Multi-Category Color System */
    /* Financial - Professional Blue/Green */
    --financial-primary: #10b981;
    --financial-secondary: #059669;
    --financial-light: #d1fae5;
    
    /* Lifestyle - Warm Pink/Rose */
    --lifestyle-primary: #ec4899;
    --lifestyle-secondary: #be185d;
    --lifestyle-light: #fce7f3;
    
    /* Regional - Purple/Violet */
    --regional-primary: #8b5cf6;
    --regional-secondary: #7c3aed;
    --regional-light: #ede9fe;
    
    /* Utility - Warm Orange/Amber */
    --utility-primary: #f59e0b;
    --utility-secondary: #d97706;
    --utility-light: #fef3c7;
    
    /* Premium Colors */
    --premium-gold: #fbbf24;
    --premium-gold-dark: #f59e0b;
    --viral-red: #ef4444;
    --surprise-purple: #a855f7;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
    padding-top: 70px;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: #2563eb; /* Default blue background */
    color: white;
    padding: 0.75rem 0;
    transition: background 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Category-specific header backgrounds override default */
.header.financial {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.header.lifestyle {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%) !important;
}

.header.utility {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.header.regional {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    text-align: left;
    transition: opacity 0.2s;
}

.brand:hover {
    opacity: 0.8;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}



/* Viral Header in Site Header */
.viral-header-content {
    text-align: left;
    transition: opacity 0.2s;
}

.viral-header-content:hover {
    opacity: 0.8;
}

.viral-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.viral-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Mobile viral header optimization */
@media (max-width: 768px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .viral-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .viral-subtitle {
        font-size: 0.7rem;
        line-height: 1.4;
    }
}

/* Main Content */
.main {
    padding: 1rem 0;
    min-height: calc(100vh - 120px);
}

/* Enhanced Viral Header System */
.viral-header {
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    /* Background and box-shadow defined by category-specific classes */
}

.viral-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 700;
}

.viral-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Category-Specific Viral Headers */
.viral-header.financial {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3) !important;
}

.viral-header.lifestyle {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%) !important;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3) !important;
}

.viral-header.utility {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3) !important;
}

.viral-header.regional {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3) !important;
}

/* Multi-Category Hero Section */
.hero-multi-category {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    border: 1px solid #cbd5e1;
}

.hero-content h2 {
    font-size: 1.8rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
    font-weight: 500;
}

.category-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Mobile-First Viral Header Optimization */
@media (max-width: 768px) {
    .viral-header {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .viral-header h2 {
        font-size: 1.4em;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .viral-header p {
        font-size: 1em;
        line-height: 1.4;
    }
    
    .hero-multi-category {
        padding: 1rem 0.75rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .hero-content h2 {
        font-size: 1.3rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .category-highlights {
        display: none; /* Hide detailed highlights on mobile */
    }
    
    .hero-cta {
        gap: 0.75rem;
    }
    
    .cta-primary, .cta-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

.highlight {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid;
}

.highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.highlight.financial {
    border-left-color: var(--financial-primary);
    background: linear-gradient(135deg, var(--financial-light), #ffffff);
}

.highlight.lifestyle {
    border-left-color: var(--lifestyle-primary);
    background: linear-gradient(135deg, var(--lifestyle-light), #ffffff);
}

.highlight.regional {
    border-left-color: var(--regional-primary);
    background: linear-gradient(135deg, var(--regional-light), #ffffff);
}

.highlight.utility {
    border-left-color: var(--utility-primary);
    background: linear-gradient(135deg, var(--utility-light), #ffffff);
}

.highlight-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.highlight h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 600;
}

.highlight p {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.highlight-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.highlight-stats span {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.revenue {
    background: var(--financial-light);
    color: var(--financial-secondary);
}

.viral {
    background: #fee2e2;
    color: var(--viral-red);
}

.engagement {
    background: var(--regional-light);
    color: var(--regional-secondary);
}

.surprise {
    background: #f3e8ff;
    color: var(--surprise-purple);
}

.users, .sharing, .regions, .astrology {
    background: #f1f5f9;
    color: #475569;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cta-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

/* Content Layout with Sidebar */
.content-with-sidebar {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

/* Sidebar Ad */
.sidebar-ad {
    width: 160px;
    flex-shrink: 0;
}

.sidebar-ad-unit {
    width: 160px;
    height: 600px;
}

/* Calculator Section */
.calculator-section {
    flex: 1;
}

/* Enhanced Category Navigation with Mobile-First Design */
.category-nav {
    margin-bottom: 2rem;
}

/* Desktop: Clean Single-Container Navigation */
@media (min-width: 769px) {
    .category-nav {
        position: sticky;
        top: 70px;
        z-index: 50;
        padding: 1rem 0;
        margin-bottom: 1rem;
        transition: all 0.3s ease;
    }
    
    .nav-container {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        max-width: 1000px;
        margin: 0 auto;
        padding: 0;
        background: none;
        border: none;
        box-shadow: none;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .nav-container::-webkit-scrollbar {
        display: none;
    }
    
    .nav-btn {
        background: white;
        border: 1px solid #e2e8f0;
        padding: 0.75rem 1.5rem;
        border-radius: 12px;
        font-size: 0.9rem;
        font-weight: 600;
        color: #64748b;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        min-width: fit-content;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        position: relative;
        transform: translateZ(0); /* Fix for animation glitches */
        backface-visibility: hidden; /* Prevent flickering */
    }
    
    .nav-btn:hover {
        background: #f8fafc;
        border-color: #cbd5e1;
        transform: translateY(-1px) translateZ(0);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .nav-btn.active {
        background: linear-gradient(135deg, #1e293b, #334155);
        color: white;
        border-color: #1e293b;
        box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
        transform: translateZ(0);
    }
    
    .nav-btn.active:hover {
        background: linear-gradient(135deg, #334155, #475569);
        transform: translateY(-1px) translateZ(0);
        box-shadow: 0 6px 16px rgba(30, 41, 59, 0.3);
    }
    
    /* Prevent animation conflicts */
    .nav-btn:active {
        transform: translateY(0) translateZ(0);
        transition: transform 0.1s ease;
    }
    
    .filter-toggle {
        display: none;
    }
}

/* Mobile: Modern Slide-up Drawer Filter */
@media (max-width: 768px) {
    .category-nav {
        display: none !important;
    }
    
    .filter-toggle {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 56px !important;
        height: 56px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        border: none !important;
        border-radius: 50% !important;
        font-size: 1.2rem !important;
        cursor: pointer !important;
        z-index: 1000 !important;
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4) !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .filter-toggle:hover {
        transform: scale(1.1) !important;
        box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6) !important;
    }
    
    .filter-toggle.active {
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        transform: rotate(45deg) !important;
    }
    
    /* Mobile Filter Drawer */
    .mobile-filter-drawer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .mobile-filter-drawer.visible {
        transform: translateY(0);
    }
    
    .drawer-handle {
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
        margin: 12px auto 20px;
    }
    
    .drawer-title {
        text-align: center;
        font-size: 1.1rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 20px;
    }
    
    .mobile-filter-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 0 20px 30px;
    }
    
    .mobile-filter-btn {
        background: #f8fafc;
        border: 2px solid #e2e8f0;
        padding: 16px 12px;
        border-radius: 16px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
        font-weight: 600;
        color: #475569;
        min-height: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .mobile-filter-btn:active {
        transform: scale(0.95);
    }
    
    .mobile-filter-btn.active {
        background: linear-gradient(135deg, #1e293b, #334155);
        color: white;
        border-color: #1e293b;
        box-shadow: 0 4px 16px rgba(30, 41, 59, 0.3);
    }
    
    /* Category-Specific Mobile Filter Active States */
    .mobile-filter-btn[data-category="financial"].active {
        background: linear-gradient(135deg, #10b981, #059669) !important;
        border-color: #10b981 !important;
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
    }
    
    .mobile-filter-btn[data-category="lifestyle"].active {
        background: linear-gradient(135deg, #ec4899, #be185d) !important;
        border-color: #ec4899 !important;
        box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4) !important;
    }
    
    .mobile-filter-btn[data-category="utility"].active {
        background: linear-gradient(135deg, #f59e0b, #d97706) !important;
        border-color: #f59e0b !important;
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4) !important;
    }
    
    .mobile-filter-btn[data-category="regional"].active {
        background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
        border-color: #8b5cf6 !important;
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4) !important;
    }
    
    .mobile-filter-btn[data-category="all"].active {
        background: linear-gradient(135deg, #1e293b, #334155) !important;
        border-color: #1e293b !important;
        box-shadow: 0 4px 16px rgba(30, 41, 59, 0.4) !important;
    }
    
    .filter-icon {
        font-size: 1.5rem;
        margin-bottom: 2px;
    }
    
    .filter-count {
        font-size: 0.75rem;
        opacity: 0.8;
    }
    
    /* Backdrop */
    .mobile-filter-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-filter-backdrop.visible {
        opacity: 1;
        visibility: visible;
    }
}
    
    .nav-btn:focus {
        outline: 3px solid #3b82f6;
        outline-offset: 2px;
    }
    
    .nav-btn::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.1);
        opacity: 0;
        transition: opacity 0.2s ease;
    }
    
    .nav-btn:active::after {
        opacity: 1;
    }
    
    .nav-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* Mobile Category-Specific Active States */
    .nav-btn[data-category="financial"].active {
        background: linear-gradient(135deg, #10b981, #059669) !important;
        color: white !important;
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
    }
    
    .nav-btn[data-category="lifestyle"].active {
        background: linear-gradient(135deg, #ec4899, #be185d) !important;
        color: white !important;
        box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4) !important;
    }
    
    .nav-btn[data-category="utility"].active {
        background: linear-gradient(135deg, #f59e0b, #d97706) !important;
        color: white !important;
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4) !important;
    }
    
    .nav-btn[data-category="regional"].active {
        background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
        color: white !important;
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4) !important;
    }
    
    .nav-btn[data-category="all"].active {
        background: linear-gradient(135deg, #1e293b, #334155) !important;
        color: white !important;
        box-shadow: 0 4px 16px rgba(30, 41, 59, 0.4) !important;
    }
    
    /* Mobile Category-Specific Hover Effects */
    .nav-btn[data-category="financial"]:hover:not(.active) {
        background: rgba(16, 185, 129, 0.1) !important;
        border: 2px solid #10b981 !important;
        color: #059669 !important;
    }
    
    .nav-btn[data-category="lifestyle"]:hover:not(.active) {
        background: rgba(236, 72, 153, 0.1) !important;
        border: 2px solid #ec4899 !important;
        color: #be185d !important;
    }
    
    .nav-btn[data-category="utility"]:hover:not(.active) {
        background: rgba(245, 158, 11, 0.1) !important;
        border: 2px solid #f59e0b !important;
        color: #d97706 !important;
    }
    
    .nav-btn[data-category="regional"]:hover:not(.active) {
        background: rgba(139, 92, 246, 0.1) !important;
        border: 2px solid #8b5cf6 !important;
        color: #7c3aed !important;
    }
    
    .nav-btn[data-category="all"]:hover:not(.active) {
        background: rgba(30, 41, 59, 0.1) !important;
        border: 2px solid #1e293b !important;
        color: #334155 !important;
    }
    
    /* Enhanced Mobile Touch Feedback */
    .nav-btn:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    

}

/* Category-Specific CTAs */
.category-ctas {
    margin: 2rem 0;
}

/* Mobile CTA Optimization */
@media (max-width: 768px) {
    .category-ctas {
        display: none; /* Hide detailed CTAs on mobile to reduce scroll */
    }
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cta-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cta-card.financial {
    border-left-color: var(--financial-primary);
    background: linear-gradient(135deg, var(--financial-light), #ffffff);
}

.cta-card.lifestyle {
    border-left-color: var(--lifestyle-primary);
    background: linear-gradient(135deg, var(--lifestyle-light), #ffffff);
}

.cta-card.utility {
    border-left-color: var(--utility-primary);
    background: linear-gradient(135deg, var(--utility-light), #ffffff);
}

.cta-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 700;
}

.cta-card p {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.cta-pricing {
    margin-bottom: 1.5rem;
}

.price-range {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--financial-primary);
    margin-bottom: 0.25rem;
}

.value-prop {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.cta-features {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.feature {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.cta-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-btn.premium {
    background: linear-gradient(135deg, var(--financial-primary), var(--financial-secondary));
    color: white;
}

.cta-btn.viral {
    background: linear-gradient(135deg, var(--lifestyle-primary), var(--lifestyle-secondary));
    color: white;
}

.cta-btn.surprise {
    background: linear-gradient(135deg, var(--utility-primary), var(--utility-secondary));
    color: white;
}

.cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Smart Calculator Grid */
.calculator-grid-smart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.calculator-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.calculator-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

.calculator-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
    font-weight: 500;
}

.calculator-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    padding: 0.4rem 0.9rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #0ea5e9;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    gap: 0.25rem;
}

/* Category-Specific Badge Styles - Aligned with Category Colors */
.calculator-badge.financial {
    background: linear-gradient(135deg, var(--financial-light), #a7f3d0);
    color: var(--financial-secondary);
    border: 1px solid var(--financial-primary);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.calculator-badge.lifestyle {
    background: linear-gradient(135deg, var(--lifestyle-light), #f9a8d4);
    color: var(--lifestyle-secondary);
    border: 1px solid var(--lifestyle-primary);
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2);
}

.calculator-badge.utility {
    background: linear-gradient(135deg, var(--utility-light), #fde68a);
    color: var(--utility-secondary);
    border: 1px solid var(--utility-primary);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.calculator-badge.health {
    background: linear-gradient(135deg, #fee2e2, #fca5a5);
    color: #dc2626;
    border: 1px solid #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Regional Badge Styles - Using Regional Category Colors */
.calculator-badge.usa,
.calculator-badge.uk,
.calculator-badge.canada,
.calculator-badge.australia,
.calculator-badge.europe,
.calculator-badge.india,
.calculator-badge.japan,
.calculator-badge.singapore {
    background: linear-gradient(135deg, var(--regional-light), #c4b5fd);
    color: var(--regional-secondary);
    border: 1px solid var(--regional-primary);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

.calculator-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s;
}

.calculator-card:hover .calculator-badge::before {
    left: 100%;
}

.calculator-card.featured {
    border: 2px solid var(--viral-red);
    background: linear-gradient(135deg, #fef2f2, #ffffff);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
}

.calculator-card.premium {
    border: 2px solid var(--premium-gold);
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.2);
}

.calculator-card.surprise {
    border: 2px solid var(--surprise-purple);
    background: linear-gradient(135deg, #faf5ff, #ffffff);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge.viral {
    background: linear-gradient(135deg, var(--viral-red), #dc2626);
    color: white;
    animation: pulse 2s infinite;
}

.card-badge.premium {
    background: linear-gradient(135deg, var(--premium-gold), var(--premium-gold-dark));
    color: white;
    animation: goldShimmer 3s infinite;
}

.card-badge.surprise {
    background: linear-gradient(135deg, var(--surprise-purple), #9333ea);
    color: white;
    animation: mysticalGlow 4s infinite;
}

.card-badge.free {
    background: linear-gradient(135deg, var(--financial-primary), var(--financial-secondary));
    color: white;
}

.card-badge.health {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

@keyframes goldShimmer {
    0%, 100% { box-shadow: 0 0 5px rgba(251, 191, 36, 0.5); }
    50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.8); }
}

@keyframes mysticalGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(168, 85, 247, 0.5); }
    50% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.7); }
}

.card-stats, .card-pricing {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    text-align: center;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--premium-gold-dark);
}

.value {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Category-specific static borders */
.calculator-card[data-category="financial"] {
    border-color: #a7f3d0;
}

.calculator-card[data-category="lifestyle"] {
    border-color: #f9a8d4;
}

.calculator-card[data-category="utility"] {
    border-color: #fde68a;
}

.calculator-card[data-category="regional"] {
    border-color: #c4b5fd !important;
}

.calculator-card[data-category="global"] {
    border-color: #a5f3fc;
}

/* Tooltip Styles */
.calculator-card[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: normal;
    width: 280px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease-out;
}

.calculator-card[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 1001;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.calculator-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.calculator-card[data-category="financial"]:hover {
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.25);
}

.calculator-card[data-category="lifestyle"]:hover {
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.25);
}

.calculator-card[data-category="utility"]:hover {
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.25);
}

.calculator-card[data-category="regional"]:hover {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.25);
}

/* Enhanced Category-Specific Hover Effects */
.calculator-card[data-category="financial"]:hover {
    border-color: #10b981 !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
    transform: translateY(-6px) !important;
}

.calculator-card[data-category="lifestyle"]:hover {
    border-color: #ec4899 !important;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.3) !important;
    transform: translateY(-6px) !important;
}

.calculator-card[data-category="utility"]:hover {
    border-color: #f59e0b !important;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3) !important;
    transform: translateY(-6px) !important;
}

.calculator-card[data-category="regional"]:hover {
    border-color: #8b5cf6 !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3) !important;
    transform: translateY(-6px) !important;
}

.calculator-card[data-category="global"]:hover {
    border-color: #06b6d4 !important;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3) !important;
    transform: translateY(-6px) !important;
}

/* Enhanced Card Transitions */
.calculator-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.calculator-card:hover {
    transform: translateY(-6px);
}

.ad-card:hover {
    transform: none;
    box-shadow: none;
}

.calculator-badge.premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 700;
    border: 1px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    animation: premiumGlow 3s ease-in-out infinite;
    position: relative;
}

.calculator-badge.premium::before {
    content: '⭐';
    position: absolute;
    left: -6px;
    top: -6px;
    font-size: 0.9rem;
    animation: starRotate 4s linear infinite;
}

.calculator-badge.viral {
    background: linear-gradient(135deg, #ec4899, #be185d);
    color: white;
    font-weight: 700;
    border: 1px solid #ec4899;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
    animation: viralPulse 2s ease-in-out infinite;
}

@keyframes premiumGlow {
    0%, 100% { box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6); }
}

@keyframes viralPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes starRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calculator-badge.global {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    font-weight: 600;
    border: 1px solid #06b6d4;
    box-shadow: 0 2px 4px rgba(6, 182, 212, 0.3);
    animation: pulse 2s infinite;
    position: relative;
}

.calculator-badge.global::after {
    content: '🔥';
    position: absolute;
    right: -8px;
    top: -8px;
    font-size: 0.8rem;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Enhanced Viral Animations - Category-Specific */
@keyframes viralGlowLifestyle {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3);
    }
    50% { 
        box-shadow: 0 8px 24px rgba(236, 72, 153, 0.6);
    }
}

@keyframes viralGlowUtility {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
    }
    50% { 
        box-shadow: 0 8px 24px rgba(245, 158, 11, 0.6);
    }
}

@keyframes viralGlowFinancial {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    }
    50% { 
        box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6);
    }
}

@keyframes viralGlowRegional {
    0%, 100% { 
        box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    }
    50% { 
        box-shadow: 0 8px 24px rgba(139, 92, 246, 0.6);
    }
}

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

/* Category-Specific Viral Header Animations */
.viral-header.lifestyle {
    animation: viralGlowLifestyle 3s ease-in-out infinite;
}

.viral-header.financial {
    animation: viralGlowFinancial 3s ease-in-out infinite;
}

.viral-header.utility {
    animation: viralGlowUtility 3s ease-in-out infinite;
}

.viral-header.regional {
    animation: viralGlowRegional 3s ease-in-out infinite;
}

.nav-btn.active {
    background-size: 200% 100%;
    animation: categoryShimmer 3s ease-in-out infinite;
}

/* Calculator Interface */
.calculator-interface {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.calculator-main {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-header h2 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

/* Mobile Calculator Optimization */
@media (max-width: 768px) {
    .calculator-interface {
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .calculator-main {
        max-width: 100%;
        padding: 0;
    }
    
    .calculator-header {
        margin-bottom: 1rem;
        text-align: left;
        padding-left: 60px; /* Account for floating back button */
    }
    
    .calculator-form.mobile-optimized {
        gap: 0.5rem !important;
    }
    
    .calculator-form .form-group {
        margin-bottom: 0.75rem;
    }
    
    .calculator-form .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        font-weight: 600;
    }
    
    .calculator-form input,
    .calculator-form select {
        padding: 0.6rem;
        font-size: 1rem;
        border-radius: 6px;
        border: 1px solid #d1d5db;
    }
    
    .calculator-form small {
        font-size: 0.8rem;
        margin-top: 0.25rem;
        color: #6b7280;
        line-height: 1.3;
    }
    
    .mobile-calc-btn {
        width: 100%;
        background: linear-gradient(135deg, #3b82f6, #1d4ed8);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        font-weight: 600;
        margin-top: 1rem !important;
        touch-action: manipulation; /* Prevent double-tap zoom, allow clicks */
    }
    
    .mobile-calc-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    
    .result-display {
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .result-value {
        font-size: 1.3rem;
    }
    
    .result-explanation {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #1d4ed8 !important;
}

/* Enhanced Vehicle Selection */
.vehicle-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.vehicle-option {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.vehicle-option:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.vehicle-option.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.vehicle-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.vehicle-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.vehicle-mileage {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Animated Number Counter */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-number {
    animation: countUp 0.6s ease-out;
}

/* Fuel Efficiency Indicator */
.efficiency-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 0.85rem;
}

.efficiency-good { color: #10b981; }
.efficiency-average { color: #f59e0b; }
.efficiency-poor { color: #ef4444; }

.calculator-interface.active {
    display: block;
}

.calculator-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.calculate-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    min-height: 44px; /* Touch-friendly */
    touch-action: manipulation; /* Prevent double-tap zoom, allow clicks */
}

.calculate-btn:hover {
    background: #1d4ed8;
}

.result-display {
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
    display: none;
}

.result-display.show {
    display: block;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    word-break: break-word;
}

.result-explanation {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile Result Display Optimization */
@media (max-width: 768px) {
    .result-display {
        padding: 1rem;
        margin-top: 0.75rem;
        border-radius: 6px;
    }
    
    .result-value {
        font-size: 1.25rem;
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 0.375rem;
    }
    
    .result-explanation {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .result-display {
        padding: 0.75rem;
        margin-top: 0.5rem;
    }
    
    .result-value {
        font-size: 1.1rem;
        font-weight: 800;
        line-height: 1.1;
    }
    
    .result-explanation {
        font-size: 0.8rem;
        line-height: 1.25;
    }
}

/* History Interface */
.history-interface-container {
    max-width: 800px;
    margin: 0 auto;
}

.history-title-section {
    text-align: center;
    margin-bottom: 2rem;
}

.history-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.history-filter select {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}



.history-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.history-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.history-item.recent {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.history-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f9ff, #dbeafe);
    border-radius: 12px;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.history-header h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.recent-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-result {
    color: #374151;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.history-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.history-date,
.history-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.history-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .history-actions {
    opacity: 1;
}

.recalculate-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recalculate-btn:hover {
    background: #e5e7eb;
    transform: scale(1.1);
}

.empty-history {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-history h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-history p {
    color: #6b7280;
    margin-bottom: 2rem;
}

.start-calculating-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.start-calculating-btn:hover {
    transform: translateY(-1px);
}

.history-limit-notice {
    text-align: center;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-top: 1rem;
}

.history-limit-notice p {
    margin: 0;
    color: #92400e;
    font-size: 0.9rem;
}

/* Mobile History Responsive */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .history-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .history-icon {
        align-self: center;
    }
    
    .history-content {
        text-align: center;
    }
    
    .history-header {
        justify-content: center;
    }
    
    .history-meta {
        justify-content: center;
    }
    
    .history-actions {
        flex-direction: row;
        justify-content: center;
        opacity: 1;
    }
    
    .history-stats {
        gap: 0.75rem;
    }
    
    .stat-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Tablet Responsive (iPad) */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-with-sidebar {
        gap: 1.5rem;
    }
    
    .sidebar-ad {
        width: 120px;
    }
    
    .sidebar-ad-unit {
        width: 120px;
        height: 400px;
    }
    
    .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .calculator-card {
        padding: 1.25rem;
    }
    
    .value-prop h2 {
        font-size: 1.4rem;
    }
    
    .top-banner {
        max-width: 728px;
        height: 90px;
    }
    
    .top-banner-ad {
        width: 728px;
        height: 90px;
    }
    
    /* Calculator Interface Tablet */
    .calculator-with-sidebar {
        gap: 1.5rem;
    }
    
    .calculator-sidebar-ad {
        width: 120px;
    }
    
    .calculator-sidebar-unit {
        width: 120px;
        height: 400px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header {
        padding: 0.5rem 0; /* Reduce header padding */
    }
    
    .header-content {
        flex-direction: row; /* Keep horizontal on mobile */
        gap: 0.5rem;
        align-items: center;
        justify-content: space-between;
    }
    
    .brand {
        text-align: left;
        flex: 1;
    }
    
    .logo {
        font-size: 1.2rem; /* Smaller logo on mobile */
    }
    
    .tagline {
        font-size: 0.7rem;
        display: none; /* Hide tagline on mobile to save space */
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    #premium-status {
        display: none; /* Hide premium status on mobile */
    }
    

    
    .value-prop {
        text-align: center;
        margin: 0 auto;
    }
    
    .value-prop h2 {
        font-size: 1.2rem;
    }
    
    .features {
        gap: 0.75rem;
        justify-content: center;
    }
    
    .feature {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile Layout Changes */
    .content-with-sidebar {
        flex-direction: column;
        gap: 0.5rem; /* Reduce gap */
        align-items: center;
    }
    
    .privacy-features-sidebar {
        display: none; /* Hide sidebar on mobile to save space */
    }
    
    .sidebar-ad {
        display: none;
    }
    
    .mobile-only {
        display: flex;
        justify-content: center;
    }
    
    /* Mobile Bottom Sheet Navigation Styles */
    .nav-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        border-radius: 8px;
        text-align: center;
        white-space: normal;
        line-height: 1.3;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Enhanced Bottom Sheet Toggle Button - FORCE MOBILE VISIBILITY */
    .filter-toggle {
        position: fixed !important;
        bottom: 24px !important;
        right: 24px !important;
        width: 64px !important;
        height: 64px !important;
        background: none !important;
        color: #374151 !important;
        border: none !important;
        border-radius: 0 !important;
        font-size: 1.8rem !important;
        cursor: pointer !important;
        z-index: 999 !important;
        box-shadow: none !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        outline: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .filter-toggle:focus {
        outline: 3px solid #ffffff;
        outline-offset: 2px;
    }
    
    .filter-toggle[aria-expanded="true"] {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        transform: rotate(45deg);
    }
    
    .filter-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 24px rgba(59, 130, 246, 0.6);
    }
    
    .filter-toggle.active {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        transform: rotate(180deg);
    }
    
    .filter-toggle::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
        animation: pulse 2s infinite;
    }
    
    /* Bottom sheet handle */
    .category-nav::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
    }
    
    .calculator-grid-smart {
        grid-template-columns: 1fr;
        gap: 0.75rem; /* Reduce gap between cards */
        max-width: 400px;
        margin: 0 auto;
    }
    
    .calculator-card {
        padding: 0.75rem;
        text-align: center;
        border-radius: 12px;
    }
    
    .calculator-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
    
    .calculator-card p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    /* Mobile Top Banner */
    .top-banner {
        max-width: 320px;
        height: 50px;
        margin: 0.5rem auto;
    }
    
    .top-banner-ad {
        width: 320px;
        height: 50px;
    }
    
    .container {
        padding: 0 0.75rem;
        text-align: center;
    }
    
    .main {
        padding: 0.25rem 0; /* Reduce main padding */
    }
    
    /* Calculator Interface Mobile */
    .calculator-interface {
        text-align: left;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .calculator-header {
        text-align: center;
    }
    
    .calculator-header h2 {
        text-align: center;
    }
    
    .result-display {
        text-align: center;
    }
}

/* Premium Paywall */
.premium-paywall {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.premium-paywall.active {
    display: block;
}

.premium-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.premium-features {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.premium-features h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.premium-features ul {
    list-style: none;
    padding: 0;
}

.premium-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.95rem;
}

.premium-features li:last-child {
    border-bottom: none;
}

.pricing-card {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 1rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 0.25rem;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.period {
    font-size: 1rem;
    margin-left: 0.5rem;
    opacity: 0.9;
}

.unlock-premium-btn {
    background: white;
    color: #f59e0b;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    min-height: 44px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.unlock-premium-btn:hover {
    background: #fef3c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.payment-methods {
    margin-top: 1rem;
}

.tax-season-urgency {
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); }
    to { box-shadow: 0 0 20px rgba(245, 158, 11, 0.6); }
}

/* Ad Containers */
.ad-container {
    text-align: center;
    margin: 1rem 0;
}

/* Top Banner Ad */
.top-banner {
    max-width: 728px;
    height: 90px;
    margin: 1rem auto;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-banner-ad {
    width: 728px;
    height: 90px;
}

/* Mobile Mid-Content Ad */
.ad-card {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.mid-content-ad {
    width: 300px;
    height: 250px;
}

/* Show mobile ad only on mobile */
.mobile-only {
    display: none;
}

/* Ad placeholder styling (for development) */
.ad-container::before {
    content: "Advertisement";
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive ad sizing */
@media (max-width: 768px) {
    .ad-container {
        max-width: 320px;
    }
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-links {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.contact-info a {
    color: #60a5fa !important;
    text-decoration: none;
}

.contact-info a:hover {
    color: #93c5fd !important;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Business Inquiry Modal */
.business-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.business-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.business-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    margin: 1rem;
    text-align: center;
}

.business-content h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.business-options {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.business-option {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s;
}

.business-option:hover {
    border-color: #2563eb;
}

.business-option h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.business-option p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.close-modal {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 1rem;
}

/* Calculator Layout */
.calculator-with-sidebar {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.calculator-main {
    flex: 1;
    min-width: 0;
}

.calculator-sidebar-ad {
    width: 160px;
    flex-shrink: 0;
}

.calculator-sidebar-unit {
    width: 160px;
    height: 600px;
}

.mobile-result-ad {
    display: none;
    margin: 1rem 0;
    text-align: center;
}

/* Progress Indicators */
.calculation-progress {
    display: none;
    text-align: center;
    padding: 2rem;
}

.calculation-progress.show {
    display: block;
}

.progress-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-text {
    color: #64748b;
    font-size: 0.9rem;
}

/* Enhanced Form Validation */
.form-group input:invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Removed auto-green validation - handled by JS validation system */

.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.validation-error {
    color: #dc2626;
    background: #fef2f2;
}

.validation-success {
    color: #166534;
    background: #f0fdf4;
}

/* Enhanced Touch-Friendly Improvements */
@media (max-width: 768px) {
    .calculator-with-sidebar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .calculator-sidebar-ad {
        display: none;
    }
    
    .mobile-result-ad {
        display: block;
    }
    
    /* Enhanced Touch Targets */
    .calculator-card {
        min-height: 120px;
        padding: 1.25rem;
    }
    
    .nav-btn,
    .calculate-btn,
    .share-btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Improved Tap Feedback */
    .calculator-card:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    .nav-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s;
    }
}

@media (max-width: 480px) {
    .form-group input,
    .form-group select,
    .calculate-btn {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
    
    .premium-paywall {
        padding: 1rem;
    }
    
    .premium-content {
        padding: 0;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .amount {
        font-size: 2.5rem;
    }
    
    /* Enhanced Small Screen Optimization */
    .viral-header {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .viral-header h2 {
        font-size: 1.2em;
    }
    
    .viral-header p {
        font-size: 0.9em;
    }
    
    .calculator-grid-smart {
        gap: 0.5rem;
    }
    
    .calculator-card {
        padding: 1rem;
        min-height: 100px;
    }
}
.calculator-badge.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    font-weight: 700;
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 8px rgba(251, 191, 36, 0.4);
    animation: goldPulse 3s ease-in-out infinite;
    position: relative;
    padding: 0.35rem 0.85rem;
}

.calculator-badge.gold::before {
    content: '⭐';
    position: absolute;
    left: -6px;
    top: -6px;
    font-size: 0.9rem;
    animation: starRotate 4s linear infinite;
}

@keyframes goldPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 8px rgba(251, 191, 36, 0.4);
    }
    50% { 
        transform: scale(1.03);
        box-shadow: 0 6px 12px rgba(251, 191, 36, 0.6);
    }
}

@keyframes starRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Sharing System */
.sharing-section {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.sharing-section h4 {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

.sharing-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn.whatsapp:hover {
    background: #1da851;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.twitter:hover {
    background: #0d8bd9;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.linkedin:hover {
    background: #005885;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.facebook:hover {
    background: #0b5ccc;
}

/* Tooltip Styles for Input Fields */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    cursor: help;
    color: #6b7280;
    font-size: 14px;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.2s ease-out;
    max-width: 250px;
    white-space: normal;
    text-align: center;
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 1001;
}

@media (max-width: 768px) {
    .sharing-section {
        padding: 1rem;
        margin-top: 1.5rem;
    }
    
    .sharing-buttons {
        gap: 0.5rem;
        grid-template-columns: repeat(2, 1fr);
        display: grid;
    }
    
    .share-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
        min-width: auto;
        min-height: 48px;
    }
}
/* Enhanced Calculator Result Styles */

/* Enhanced Viral Header System for Calculators - DISABLED */
/* Viral headers now use site header replacement instead */
.calculator-viral-header {
    display: none !important; /* Hide any remaining viral headers inside calculators */
}

/* Result Container */
.calculator-result {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.calculator-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b, #ef4444);
}

/* Result Header */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.result-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.viral-message {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    color: #92400e;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    margin: 1rem 0;
    border: 2px solid #f59e0b;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
        transform: scale(1.02);
    }
}

/* Result Grid */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.result-item.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
}

.result-item.primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.result-item label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #64748b;
}

.result-item.primary label {
    color: rgba(255, 255, 255, 0.9);
}

.result-item value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.result-item.primary value {
    color: white;
}

/* Insights Section */
.insights {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #3b82f6;
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-item strong {
    color: #1e293b;
    font-weight: 600;
}

/* Social Card - Category-Aware Colors */
.social-card {
    background: linear-gradient(135deg, #ec4899, #be185d); /* Default lifestyle */
    color: white !important;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Category-Specific Social Card Colors */
.social-card.financial {
    background: linear-gradient(135deg, var(--financial-primary), var(--financial-secondary)) !important;
}

.social-card.lifestyle {
    background: linear-gradient(135deg, var(--lifestyle-primary), var(--lifestyle-secondary)) !important;
}

.social-card.utility {
    background: linear-gradient(135deg, var(--utility-primary), var(--utility-secondary)) !important;
}

.social-card.regional {
    background: linear-gradient(135deg, var(--regional-primary), var(--regional-secondary)) !important;
}

.social-card .card-title {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white !important;
}

.social-card .card-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 15px 0;
    color: white !important;
    line-height: 1.1;
}

.social-card .card-subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
    color: white !important;
    line-height: 1.4;
}

.social-card * {
    color: white !important;
}

.card-brand,
.card-title,
.card-subtitle,
.stat-value,
.stat-label,
.card-cta {
    color: white !important;
}

.social-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-icon {
    font-size: 2rem;
}

.card-brand {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 600;
}

.card-content {
    text-align: center;
    margin: 1.5rem 0;
}

.card-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.card-stat {
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.card-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.card-cta {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
}

/* Enhanced Sharing Buttons */
.sharing-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 2px solid #e2e8f0;
}

.sharing-section h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: #1e293b;
    font-size: 1.1rem;
}

.sharing-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    font-family: inherit;
    width: 100%;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #000000, #333333);
}

.share-btn.linkedin {
    background: linear-gradient(135deg, #0077b5, #005885);
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877f2, #166fe5);
}

/* Partner Links */
.partner-links {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #0ea5e9;
}

.partner-links h4 {
    text-align: center;
    color: #0369a1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.partner-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.partner-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: white;
    color: #0369a1;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid #0ea5e9;
    transition: all 0.3s ease;
}

.partner-btn:hover {
    background: #0ea5e9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* Error States */
.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #f87171;
    text-align: center;
    font-weight: 600;
    margin: 1rem 0;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: #64748b;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced History Modal Styles */
.history-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.history-modal {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.history-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.close-history {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-history:hover {
    background: rgba(255, 255, 255, 0.2);
}

.privacy-info {
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.privacy-icon {
    font-size: 1.25rem;
}

.privacy-text strong {
    display: block;
    color: #1e293b;
    font-size: 0.9rem;
}

.privacy-text small {
    color: #64748b;
    font-size: 0.8rem;
}

/* Enhanced History Controls */
.history-controls {
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-container {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.history-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 0;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

.history-item:hover {
    background: #f8fafc;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.calculator-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calculator-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.calculation-time {
    font-size: 0.75rem;
    color: #64748b;
}

.rerun-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rerun-btn:hover {
    background: #2563eb;
}

.input-summary {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
}

.no-history {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* Mobile Responsive for Enhanced History */
@media (max-width: 640px) {
    .history-modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .filter-container {
        flex-direction: column;
    }
    
    .history-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .history-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Small Mobile Devices (iPhone SE, etc.) */
@media (max-width: 480px) {
    .calculator-result {
        padding: 0.75rem;
        margin: 0.5rem 0;
    }
    
    .result-header h3 {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .result-item {
        padding: 0.75rem;
    }
    
    .result-item label {
        font-size: 0.75rem;
    }
    
    .result-item value {
        font-size: 1.2rem;
        font-weight: 800;
    }
    
    .result-item.primary value {
        font-size: 1.4rem;
    }
    
    /* Social Card Small Mobile */
    .social-card .card-title {
        font-size: 1rem !important;
    }
    
    .social-card .card-value {
        font-size: 1.4rem !important;
    }
    
    .social-card .card-subtitle {
        font-size: 0.85rem !important;
    }
    
    .share-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .viral-message {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .profile-cards {
        grid-template-columns: 1fr;
    }
    
    .profile-value {
        font-size: 0.9rem;
    }
}

/* Critical Mobile Typography Fix for Calculator Results */
@media (max-width: 768px) {
    /* Fix result-item value elements */
    .result-item value,
    .calculator-result value {
        font-size: 1.3rem !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        display: block !important;
        margin-top: 0.25rem !important;
    }
    
    .result-item.primary value {
        font-size: 1.5rem !important;
        font-weight: 900 !important;
    }
    
    /* Fix result-item labels */
    .result-item label,
    .calculator-result label {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #64748b !important;
        display: block !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Fix insights section */
    .insights h4 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .insight-item {
        font-size: 0.85rem !important;
        padding: 0.5rem 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .insight-item strong {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
    }
}

@media (max-width: 480px) {
    .result-item value,
    .calculator-result value {
        font-size: 1.1rem !important;
    }
    
    .result-item.primary value {
        font-size: 1.3rem !important;
    }
    
    .result-item label,
    .calculator-result label {
        font-size: 0.75rem !important;
    }
    
    .insights h4 {
        font-size: 0.9rem !important;
    }
    
    .insight-item {
        font-size: 0.8rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.25rem !important;
    }
}

/* Force Mobile Typography for All Calculator Results */
@media (max-width: 768px) {
    /* Target HTML value elements specifically */
    value {
        font-size: 1.3rem !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        word-break: break-word !important;
        display: block !important;
        color: #1e293b !important;
    }
    
    /* Target primary result values */
    .result-item.primary value {
        font-size: 1.5rem !important;
        font-weight: 900 !important;
        color: white !important;
    }
    
    /* Target all possible result value selectors */
    .value,
    [class*="value"],
    .result-value,
    .calculator-result .result-item > *:last-child {
        font-size: 1.3rem !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        word-break: break-word !important;
    }
    
    /* Target HTML label elements specifically */
    .result-item label {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.25rem !important;
        color: #64748b !important;
        display: block !important;
    }
    
    /* Target all possible label selectors */
    .label,
    [class*="label"],
    .result-label,
    .calculator-result .result-item > *:first-child {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Ensure proper spacing in result grids */
    .result-grid {
        gap: 0.75rem !important;
        grid-template-columns: 1fr !important;
    }
    
    .result-item {
        padding: 1rem !important;
        text-align: center !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 480px) {
    value {
        font-size: 1.1rem !important;
    }
    
    .result-item.primary value {
        font-size: 1.3rem !important;
    }
    
    .result-item label {
        font-size: 0.75rem !important;
    }
}

/* CRITICAL: Mobile Typography Hierarchy Fix */
@media screen and (max-width: 768px) {
    /* Universal calculator result typography */
    .calculator-result * {
        max-width: 100% !important;
    }
    
    /* CRITICAL: Target HTML value elements with maximum specificity */
    html body .calculator-result value,
    html body .result-grid value,
    html body .result-item value,
    html body div.result-item > value {
        font-size: 0.7rem !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        display: block !important;
        margin-top: 0.2rem !important;
        color: #64748b !important;
        text-align: center !important;
        word-break: break-word !important;
    }
    
    /* CRITICAL: Target primary result values */
    html body .result-item.primary value {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: white !important;
    }
    
    /* CRITICAL: Target HTML label elements with maximum specificity */
    html body .calculator-result label,
    html body .result-grid label,
    html body .result-item label,
    html body div.result-item > label {
        font-size: 0.6rem !important;
        font-weight: 500 !important;
        color: #94a3b8 !important;
        display: block !important;
        margin-bottom: 0.15rem !important;
        text-align: center !important;
    }
    
    /* CRITICAL: Target primary result labels */
    html body .result-item.primary label {
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    /* CRITICAL: Force result grid mobile layout - 2 columns for better space usage */
    html body .result-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.4rem !important;
        margin: 0.75rem 0 !important;
    }
    
    /* CRITICAL: Force result item mobile styling */
    html body .result-item {
        padding: 0.5rem !important;
        border-radius: 6px !important;
        text-align: center !important;
    }
    
    /* CRITICAL: Social Card Typography Hierarchy Fix */
    html body .social-card .card-title {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    html body .social-card .card-value {
        font-size: 1.3rem !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        margin: 8px 0 !important;
    }
    
    html body .social-card .card-subtitle {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        opacity: 0.9 !important;
    }
    
    /* CRITICAL: Profile Cards - 2 columns instead of 3 sequential boxes */
    html body .profile-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }
    
    html body .profile-card {
        padding: 0.75rem !important;
    }
    
    html body .profile-value {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
    }
    
    /* CRITICAL: Alternatives Grid - 2x2 instead of 4 sequential boxes */
    html body .alternatives-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }
    
    html body .alternative-item {
        padding: 0.5rem !important;
        gap: 0.25rem !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    
    html body .alt-quantity {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
    }
    
    html body .alt-item {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
}

@media screen and (max-width: 480px) {
    /* CRITICAL: Small mobile typography */
    html body .calculator-result value,
    html body .result-grid value,
    html body .result-item value {
        font-size: 0.8rem !important;
    }
    
    html body .result-item.primary value {
        font-size: 0.9rem !important;
    }
    
    html body .calculator-result label,
    html body .result-grid label,
    html body .result-item label {
        font-size: 0.65rem !important;
    }
    
    html body .result-item {
        padding: 0.5rem !important;
    }
    
    /* CRITICAL: Social Card Small Mobile */
    html body .social-card .card-title {
        font-size: 0.8rem !important;
    }
    
    html body .social-card .card-value {
        font-size: 1.1rem !important;
    }
    
    html body .social-card .card-subtitle {
        font-size: 0.7rem !important;
    }
    
    /* CRITICAL: Profile and Alternatives Small Mobile */
    html body .profile-value {
        font-size: 0.8rem !important;
    }
    
    html body .alt-quantity {
        font-size: 0.8rem !important;
    }
    
    html body .alt-item {
        font-size: 0.65rem !important;
    }
}

/* Viral Header Styles - Removed duplicate definition to prevent category override */

.viral-title {
    margin: 0 0 10px 0;
    font-size: 1.8em;
    font-weight: 700;
    color: white;
}

.viral-subtitle {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
    color: white;
    line-height: 1.4;
}

/* Profile Analysis Styles - Category Aware */
.profile-analysis {
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid var(--lifestyle-primary);
    background: linear-gradient(135deg, var(--lifestyle-light) 0%, #fbcfe8 100%);
}

.profile-analysis.lifestyle {
    border-left-color: var(--lifestyle-primary);
    background: linear-gradient(135deg, var(--lifestyle-light) 0%, #fbcfe8 100%);
}

.profile-analysis.utility {
    border-left-color: var(--utility-primary);
    background: linear-gradient(135deg, var(--utility-light) 0%, #fef3c7 100%);
}

.profile-analysis.regional {
    border-left-color: var(--regional-primary);
    background: linear-gradient(135deg, var(--regional-light) 0%, #ede9fe 100%);
}

.profile-analysis.financial {
    border-left-color: var(--financial-primary);
    background: linear-gradient(135deg, var(--financial-light) 0%, #d1fae5 100%);
}

.profile-title {
    color: #9f1239;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.profile-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.profile-emoji {
    font-size: 2em;
    margin-bottom: 5px;
}

.profile-value {
    font-weight: bold;
    color: #9f1239;
    font-size: 1.1rem;
    margin: 5px 0;
}

.profile-label {
    font-size: 0.9em;
    color: #64748b;
}

/* Percentile Analysis Styles */
.percentile-analysis {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid #f59e0b;
}

.percentile-title {
    color: #92400e;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.percentile-grid {
    display: grid;
    gap: 15px;
}

.percentile-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.percentile-label {
    font-weight: 600;
    color: #1e293b;
}

.percentile-highlight {
    color: #f59e0b;
    font-weight: bold;
}

/* Share Preview Styles */
.share-preview {
    background: #f8d7da;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.share-preview-title {
    margin: 0 0 15px 0;
    color: #721c24;
    font-size: 1rem;
    font-weight: 600;
}

.share-stats {
    margin: 15px 0;
}

.share-stat {
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Mobile Typography Optimization for All Calculator Elements */
@media (max-width: 768px) {
    /* Viral Header Mobile */
    .viral-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .viral-title {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }
    
    .viral-subtitle {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
    }
    
    /* Profile Analysis Mobile */
    .profile-analysis {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .profile-title {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    .profile-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .profile-card {
        padding: 10px !important;
    }
    
    .profile-emoji {
        font-size: 1.5em !important;
        margin-bottom: 3px !important;
    }
    
    .profile-value {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin: 3px 0 !important;
    }
    
    .profile-label {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
    
    /* Percentile Analysis Mobile */
    .percentile-analysis {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .percentile-title {
        font-size: 0.95rem !important;
        margin-bottom: 15px !important;
    }
    
    .percentile-grid {
        gap: 10px !important;
    }
    
    .percentile-item {
        padding: 10px !important;
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    .percentile-label {
        font-weight: 600 !important;
        font-size: 0.8rem !important;
    }
    
    /* Insights Section Mobile */
    .insights {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .insights h4 {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }
    
    .insights p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
    }
    
    .insight-item {
        padding: 8px 0 !important;
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    .insight-item strong {
        font-size: 0.8rem !important;
        font-weight: 700 !important;
    }
    
    /* Health Impact Mobile */
    .health-impact {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .health-impact h4 {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
    }
    
    .health-warning {
        padding: 10px !important;
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        margin: 10px 0 !important;
    }
    
    .health-impact p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    /* Alternatives Section Mobile */
    .alternatives {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .alternatives h4 {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        line-height: 1.3 !important;
    }
    
    /* Share Preview Mobile */
    .share-preview {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .share-preview-title {
        font-size: 0.85rem !important;
        margin-bottom: 10px !important;
    }
    
    .share-stat {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
        margin: 5px 0 !important;
    }
    
    /* Sharing Section Mobile */
    .sharing-section {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .sharing-section h4 {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
    }
    
    /* CRITICAL: Sharing Buttons Mobile Layout - 2x2 Grid */
    .sharing-buttons {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    
    .share-btn {
        padding: 10px 8px !important;
        font-size: 0.75rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
}

@media (max-width: 480px) {
    /* Small Mobile Optimization */
    .viral-title {
        font-size: 1rem !important;
    }
    
    .viral-subtitle {
        font-size: 0.8rem !important;
    }
    
    .profile-title,
    .percentile-title {
        font-size: 0.9rem !important;
    }
    
    .profile-value {
        font-size: 0.8rem !important;
    }
    
    .profile-label {
        font-size: 0.65rem !important;
    }
    
    .percentile-item {
        font-size: 0.75rem !important;
    }
    
    .insights h4,
    .health-impact h4,
    .alternatives h4 {
        font-size: 0.9rem !important;
    }
    
    .insights p,
    .health-impact p {
        font-size: 0.75rem !important;
    }
    
    .insight-item,
    .health-warning {
        font-size: 0.75rem !important;
    }
    
    .share-preview-title {
        font-size: 0.8rem !important;
    }
    
    .share-stat {
        font-size: 0.7rem !important;
    }
    
    /* Small Mobile Sharing Buttons */
    .share-btn {
        padding: 8px 6px !important;
        font-size: 0.7rem !important;
        min-height: 40px !important;
    }
}

/* Emergency CSS override removed - fixing calculators individually */

/* Mind-Blowing Facts Enhanced Styles */
.mind-blowing-facts {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #f59e0b;
}

.mind-blowing-facts h3 {
    color: #92400e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.fact-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #fbbf24;
    transition: transform 0.2s ease;
}

.fact-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fact-item strong {
    color: #92400e;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

/* Region Info Styles */
.region-info {
    margin-top: 8px;
    font-size: 0.9em;
    color: #059669;
    font-weight: bold;
}

/* Tipping Info Styles */
.tipping-info {
    margin-top: 8px;
    font-size: 0.9em;
    color: #059669;
    font-weight: bold;
}

/* Healthcare Info Styles */
.healthcare-info {
    margin-top: 8px;
    font-size: 0.9em;
    color: #059669;
    font-weight: bold;
}

/* Additional existing styles... */
.viral-tip {
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.1) !important;
    border-radius: 6px;
    color: #1e40af !important;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.health-impact {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #10b981;
}

.health-warning {
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 600;
}

.health-warning.excessive {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
    border: 1px solid #f87171;
}

.health-warning.high {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
    border: 1px solid #fbbf24;
}

.health-warning.moderate {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #16a34a;
    border: 1px solid #4ade80;
}

.percentile-data {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
    border: 1px solid #0ea5e9;
}

.percentile-badge {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alternatives {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.alternative-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.alternative-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.alt-emoji {
    font-size: 1.5rem;
}

.alt-quantity {
    font-weight: 700;
    color: #3b82f6;
    font-size: 1.1rem;
}

.alt-item {
    font-size: 0.9rem;
    color: #64748b;
}

/* Mobile Typography Optimization */
@media (max-width: 768px) {
    .calculator-result {
        padding: 1rem;
        margin: 0.75rem 0;
        border-radius: 12px;
    }
    
    /* Result Header Mobile */
    .result-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .result-header h3 {
        font-size: 1.1rem;
        line-height: 1.3;
        font-weight: 700;
    }
    
    /* Result Grid Mobile */
    .result-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    /* Result Items Mobile Typography */
    .result-item {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .result-item label {
        font-size: 0.8rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
    
    .result-item value {
        font-size: 1.4rem;
        font-weight: 800;
        line-height: 1.2;
        word-break: break-word;
    }
    
    /* Primary Result Mobile */
    .result-item.primary value {
        font-size: 1.6rem;
        font-weight: 900;
    }
    
    /* Insights Mobile */
    .insights {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: 8px;
    }
    
    .insight-item {
        padding: 0.5rem 0;
        font-size: 0.85rem;
        line-height: 1.4;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    /* Social Card Mobile */
    .social-card {
        padding: 1.25rem !important;
        margin: 1rem 0 !important;
        border-radius: 12px !important;
    }
    
    .social-card .card-title {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .social-card .card-value {
        font-size: 1.6rem !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        margin: 10px 0 !important;
    }
    
    .social-card .card-subtitle {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        opacity: 0.9 !important;
    }
    
    .card-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .stat-value {
        font-size: 1rem;
        font-weight: 700;
    }
    
    .stat-label {
        font-size: 0.75rem;
        margin-top: 0.125rem;
    }
    
    /* Sharing Section Mobile */
    .sharing-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .sharing-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .sharing-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .share-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        font-weight: 600;
        min-height: 48px;
    }
    
    /* Partner Links Mobile */
    .partner-links {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .partner-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .partner-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 48px;
    }
    
    /* Viral Message Mobile */
    .viral-message {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
        margin: 0.75rem 0;
        line-height: 1.4;
        border-radius: 20px;
    }
    
    /* Error States Mobile */
    .error {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        line-height: 1.4;
        margin: 0.75rem 0;
    }
    
    /* Loading States Mobile */
    .loading {
        padding: 1.5rem;
        font-size: 0.85rem;
    }
}

/* Animation Enhancements */
.result-item {
    animation: slideInUp 0.6s ease-out;
}

.result-item:nth-child(2) { animation-delay: 0.1s; }
.result-item:nth-child(3) { animation-delay: 0.2s; }
.result-item:nth-child(4) { animation-delay: 0.3s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility Improvements */
.share-btn:focus,
.partner-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.result-item:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Profile Section Styles */
.profile-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #8b5cf6;
}

.profile-section h4 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.profile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.profile-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.profile-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.profile-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
}

/* Percentile Section Styles */
.percentile-section {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #0ea5e9;
}

.percentile-section h4 {
    margin: 0 0 1.5rem 0;
    color: #0369a1;
    font-size: 1.1rem;
    text-align: center;
}

.percentile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.percentile-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.percentile-item.active {
    opacity: 1;
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.percentile-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.percentile-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.percentile-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.percentile-range {
    font-size: 0.9rem;
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.percentile-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

/* Mobile Responsive for Profile and Percentile */
@media (max-width: 768px) {
    /* Profile Section Mobile */
    .profile-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .profile-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .profile-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .profile-card {
        padding: 1rem;
    }
    
    .profile-emoji {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .profile-label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .profile-value {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.2;
    }
    
    /* Percentile Section Mobile */
    .percentile-section {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .percentile-section h4 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .percentile-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .percentile-item {
        padding: 1rem;
    }
    
    .percentile-item.active {
        transform: scale(1.01);
    }
    
    .percentile-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .percentile-label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .percentile-range {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .percentile-desc {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* Health Impact Mobile */
    .health-impact {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .health-warning {
        padding: 0.75rem;
        font-size: 0.85rem;
        line-height: 1.4;
        margin: 0.75rem 0;
    }
    
    /* Mind-Blowing Facts Mobile */
    .mind-blowing-facts {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .mind-blowing-facts h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .facts-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .fact-item {
        padding: 0.75rem !important;
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    .fact-item strong {
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Alternatives Mobile */
    .alternatives {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .alternatives-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .alternative-item {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .alt-emoji {
        font-size: 1.25rem;
    }
    
    .alt-quantity {
        font-size: 1rem;
    }
    
    .alt-item {
        font-size: 0.8rem;
    }
}
