/* Mobile responsive modal fixes for Terms of Service */

/* ---- Mobile responsive Terms of Service modal fixes - BROWSER ONLY ---- */
/* Fix modal height for smaller mobile BROWSER screens (not PWA/app view) */
@media (max-width: 600px) and (display-mode: browser) {
    .pricing-modal {
        padding: 10px;
        height: 100vh;
        height: 100svh; /* use small viewport height where supported */
        /* Don't set display here - let JavaScript control show/hide */
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .pricing-content {
        width: 100%;
        max-width: 95%;
        /* Ensure content fits within viewport with proper margins */
        max-height: calc(100vh - 40px);
        max-height: calc(100svh - 40px);
        margin: 20px auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Ensure proper scrolling behavior */
        overscroll-behavior: contain;
    }
}

/* Extra small screens (iPhone SE, older Android) - BROWSER ONLY */
@media (max-width: 375px) and (max-height: 667px) and (display-mode: browser) {
    .pricing-modal {
        padding: 5px;
    }
    
    .pricing-content {
        max-height: calc(100vh - 30px);
        max-height: calc(100svh - 30px);
        margin: 15px auto;
        padding: 15px;
    }
    
    .pricing-content h2 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .pricing-content h3 {
        font-size: 1.05em;
        margin-bottom: 8px;
    }
    
    .pricing-content p {
        font-size: 0.85em;
        margin-bottom: 8px;
    }
    
    .plan-divider {
        margin: 15px 0;
    }
}

/* Very small screens (iPhone 5/SE 1st gen) - BROWSER ONLY */
@media (max-width: 320px) and (max-height: 568px) and (display-mode: browser) {
    .pricing-content {
        max-height: calc(100vh - 20px);
        max-height: calc(100svh - 20px);
        margin: 10px auto;
        padding: 12px;
    }
    
    .pricing-content h2 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .pricing-content h3 {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
    
    .pricing-content p {
        font-size: 0.8em;
        margin-bottom: 6px;
    }
    
    .plan-divider {
        margin: 12px 0;
    }
    
    .modal-close-btn {
        top: 5px;
        right: 5px;
        padding: 5px 8px;
        font-size: 0.9em;
    }
}

/* Landscape orientation on mobile - BROWSER ONLY */
@media (max-width: 768px) and (orientation: landscape) and (display-mode: browser) {
    .pricing-modal {
        align-items: flex-start;
        padding-top: 10px;
    }
    
    .pricing-content {
        max-height: calc(100vh - 20px);
        max-height: calc(100svh - 20px);
        margin: 10px auto;
    }
}

/* Fallback for browsers that don't support display-mode - use touch detection */
@media (max-width: 600px) and (hover: none) and (pointer: coarse) {
    /* Only apply to mobile browsers, not PWA */
    body:not(.pwa-standalone) .pricing-modal {
        padding: 10px;
        height: 100vh;
        height: 100svh;
        /* Don't set display here - let JavaScript control show/hide */
        align-items: center;
        justify-content: center;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    body:not(.pwa-standalone) .pricing-content {
        width: 100%;
        max-width: 95%;
        max-height: calc(100vh - 40px);
        max-height: calc(100svh - 40px);
        margin: 20px auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* JavaScript-enhanced mobile browser detection (consistent with about.html) */
body.mobile-browser .pricing-modal {
    padding: 10px;
    height: 100vh;
    height: 100svh;
    /* Don't set display here - let JavaScript control show/hide */
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body.mobile-browser .pricing-content {
    width: 100%;
    max-width: 95%;
    max-height: calc(100vh - 40px);
    max-height: calc(100svh - 40px);
    margin: 20px auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}


/* Enhanced Landing Page Button Effects */
/* Base enhanced effects - colors inherited from theme classes */
.dos-button {
    position: relative;
    overflow: hidden;
    padding: 10px 20px;
    margin: 10px;
    text-decoration: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 150px;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 8px;
    z-index: 2;
    pointer-events: auto;
    contain: layout style;
    will-change: transform, box-shadow;
}

/* Dark theme button enhanced effects */
html.theme-dark .dos-button {
    background:
        radial-gradient(circle at 15% 25%, rgba(212, 165, 116, 0.5) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(212, 165, 116, 0.3) 0.5px, transparent 0.5px),
        radial-gradient(circle at 45% 15%, rgba(212, 165, 116, 0.25) 0.8px, transparent 0.8px),
        radial-gradient(circle at 75% 45%, rgba(212, 165, 116, 0.35) 0.6px, transparent 0.6px),
        linear-gradient(145deg, #000, #0a0a0a);
    background-size: 80px 80px, 60px 60px, 100px 100px, 70px 70px, 100% 100%;
    background-position: 0 0, 40px 40px, 20px 20px, 60px 10px, 0 0;
    border: 2px solid #D4A574;
    color: #D4A574;
    box-shadow:
        0 0 0 1px rgba(212, 165, 116, 0.1),
        inset 0 1px 0 rgba(212, 165, 116, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    animation: prismBorder 4s ease-in-out infinite;
}

/* Liquid shimmer background effect */
.dos-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(212, 165, 116, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 165, 116, 0.02) 0%, transparent 40%),
        linear-gradient(45deg, 
            transparent 30%, 
            rgba(212, 165, 116, 0.015) 35%, 
            rgba(212, 165, 116, 0.03) 50%, 
            rgba(212, 165, 116, 0.015) 65%, 
            transparent 70%);
    background-size: 300% 300%, 250% 250%, 200% 200%;
    /* Animation set individually per button */
    border-radius: 6px;
    opacity: 0.7;
    pointer-events: none;
}

@keyframes liquidShimmer {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%, 0% 0%;
        opacity: 0.7;
    }
    25% { 
        background-position: 100% 50%, 0% 50%, 50% 25%;
        opacity: 0.9;
    }
    50% { 
        background-position: 50% 100%, 50% 0%, 100% 50%;
        opacity: 0.8;
    }
    75% { 
        background-position: 0% 50%, 100% 50%, 25% 75%;
        opacity: 0.9;
    }
}



/* Prismatic border glow effect that preserves border-radius */

@keyframes prismBorder {
    0%, 100% { 
        border-color: #D4A574;
        box-shadow: 
            0 0 0 1px rgba(212, 165, 116, 0.1),
            inset 0 1px 0 rgba(212, 165, 116, 0.05),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3),
            0 0 8px rgba(212, 165, 116, 0.3);
    }
    50% { 
        border-color: #E8C4A0;
        box-shadow: 
            0 0 0 1px rgba(0, 255, 170, 0.2),
            inset 0 1px 0 rgba(0, 255, 170, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3),
            0 0 12px rgba(0, 255, 170, 0.4);
    }
}

/* Enhanced hover effects */
.dos-button:hover,
.dos-button:focus {
    background: linear-gradient(145deg, #D4A574, #B8935F);
    color: #000;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(212, 165, 116, 0.6),
        0 0 40px rgba(212, 165, 116, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    border-color: #E8C4A0;
}

/* Intensify effects on hover */
.dos-button:hover::before {
    animation: liquidShimmerFast 3s ease-in-out infinite;
    opacity: 1;
}


@keyframes liquidShimmerFast {
    0%, 100% { 
        background-position: 0% 0%, 100% 100%, 0% 0%;
        opacity: 1;
    }
    50% { 
        background-position: 100% 100%, 0% 0%, 100% 100%;
        opacity: 0.8;
    }
}


/* Active state */
.dos-button:active,
.dos-button.active-click {
    transform: translateY(1px) scale(0.98);
    box-shadow: 
        0 0 15px rgba(212, 165, 116, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile active-click class for sustained hover state during delay */
.dos-button.active-click {
    background: linear-gradient(145deg, #D4A574, #B8935F) !important;
    color: #000 !important;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(212, 165, 116, 0.6),
        0 0 40px rgba(212, 165, 116, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
    border-color: #E8C4A0 !important;
}

/* Ensure text is always visible above effects */

/* Individual sparkle animations for each button */
#start-btn {
    animation: sparkleMove1 12s linear infinite, prismBorder 4s ease-in-out infinite;
}


#start-btn::before {
    animation: liquidShimmer 8s ease-in-out infinite;
}

#observe-btn {
    animation: sparkleMove2 12s linear infinite, prismBorder 4s ease-in-out infinite 3s;
}


#observe-btn::before {
    animation: liquidShimmer 8s ease-in-out infinite 5s;
}

#about-btn {
    animation: sparkleMove3 12s linear infinite, prismBorder 4s ease-in-out infinite 6s;
}


#about-btn::before {
    animation: liquidShimmer 8s ease-in-out infinite 10s;
}

@keyframes sparkleMove1 {
    0% { 
        background-position: 0 0, 40px 40px, 20px 20px, 60px 10px, 0 0;
    }
    25% { 
        background-position: 20px 10px, 60px 60px, 40px 40px, 80px 30px, 0 0;
    }
    50% { 
        background-position: 40px 20px, 80px 80px, 60px 60px, 100px 50px, 0 0;
    }
    75% { 
        background-position: 60px 30px, 100px 100px, 80px 80px, 120px 70px, 0 0;
    }
    100% { 
        background-position: 80px 40px, 120px 120px, 100px 100px, 140px 90px, 0 0;
    }
}

@keyframes sparkleMove2 {
    0% { 
        background-position: 30px 15px, 70px 25px, 50px 45px, 90px 35px, 0 0;
    }
    25% { 
        background-position: 50px 25px, 90px 45px, 70px 65px, 110px 55px, 0 0;
    }
    50% { 
        background-position: 70px 35px, 110px 65px, 90px 85px, 130px 75px, 0 0;
    }
    75% { 
        background-position: 90px 45px, 130px 85px, 110px 105px, 150px 95px, 0 0;
    }
    100% { 
        background-position: 110px 55px, 150px 105px, 130px 125px, 170px 115px, 0 0;
    }
}

@keyframes sparkleMove3 {
    0% { 
        background-position: 60px 30px, 25px 65px, 75px 5px, 45px 80px, 0 0;
    }
    25% { 
        background-position: 80px 40px, 45px 85px, 95px 15px, 65px 100px, 0 0;
    }
    50% { 
        background-position: 100px 50px, 65px 105px, 115px 25px, 85px 120px, 0 0;
    }
    75% { 
        background-position: 120px 60px, 85px 125px, 135px 35px, 105px 140px, 0 0;
    }
    100% { 
        background-position: 140px 70px, 105px 145px, 155px 45px, 125px 160px, 0 0;
    }
}

/* Light Theme Styles - Only affects light theme, preserves dark theme unchanged */
html.theme-light #landing-page-content {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    
    /* Light theme scanlines with more transparency */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(150, 150, 150, 0.15) 0px,
        rgba(150, 150, 150, 0.15) 1px,
        transparent 1px,
        transparent 3px
    );
    background-size: 100% 4px;
}

/* Light theme logo override */
html.theme-light #landing-logo {
    background-image: url(../img/pixel_heart_newcolor_logo_black.png) !important;
}

/* Light theme text styling */
html.theme-light #landing-page-content h1 {
    color: var(--theme-text);
    text-shadow: none;
}

/* Light theme: Disable the scanning line effect */
html.theme-light #landing-page-content::before {
    display: none !important;
}

/* Dark theme: Disable the scanning line effect */
html.theme-dark #landing-page-content::before {
    display: none !important;
}

/* CRITICAL: Disable transitions during theme switching to prevent button color lag/flicker */
html.theme-switching .dos-button,
html.theme-switching .dos-button::before,
html.theme-switching .dos-button::after {
    transition: none !important;
    animation: none !important;
}

/* Dark theme button hover/focus/active - REQUIRED to override inline !important styles */
html.theme-dark .dos-button:hover,
html.theme-dark .dos-button:focus {
    background: linear-gradient(145deg, #D4A574, #B8935F) !important;
    color: #000 !important;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(212, 165, 116, 0.6),
        0 0 40px rgba(212, 165, 116, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
    border-color: #E8C4A0 !important;
}

html.theme-dark .dos-button:active,
html.theme-dark .dos-button.active-click {
    background: linear-gradient(145deg, #D4A574, #B8935F) !important;
    color: #000 !important;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 15px rgba(212, 165, 116, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(1px) scale(0.98);
    border-color: #E8C4A0 !important;
}

/* Light theme button styles - ONLY affects light theme, preserves all dark theme behavior */
html.theme-light .dos-button {
    background: 
        radial-gradient(circle at 15% 25%, rgba(0, 0, 0, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(0, 0, 0, 0.6) 0.5px, transparent 0.5px),
        radial-gradient(circle at 45% 15%, rgba(0, 0, 0, 0.5) 0.8px, transparent 0.8px),
        radial-gradient(circle at 75% 45%, rgba(0, 0, 0, 0.7) 0.6px, transparent 0.6px),
        var(--theme-bg);
    background-size: 80px 80px, 60px 60px, 100px 100px, 70px 70px, 100% 100%;
    background-position: 0 0, 40px 40px, 20px 20px, 60px 10px, 0 0;
    border: 2px solid var(--theme-text) !important;
    color: var(--theme-text) !important;
}

/* Light theme button hover - use same colors as Dark theme hover state */
html.theme-light .dos-button:hover,
html.theme-light .dos-button:focus,
html.theme-light .dos-button.active-click {
    background: linear-gradient(145deg, #D4A574, #B8935F) !important;
    color: #000 !important;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(212, 165, 116, 0.6),
        0 0 40px rgba(212, 165, 116, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
    border-color: #E8C4A0 !important;
}

/* Layering: make sure the scan bar sits above the shimmer in light theme */
html.theme-light .dos-button::before { z-index: 1; mix-blend-mode: normal !important; }


/* Light theme prismatic border animation - override the colors but keep the animation */
html.theme-light .dos-button {
    animation: prismBorderLight 4s ease-in-out infinite !important;
}

html.theme-light #start-btn {
    animation: sparkleMove1 12s linear infinite, prismBorderLight 4s ease-in-out infinite !important;
}

html.theme-light #observe-btn {
    animation: sparkleMove2 12s linear infinite, prismBorderLight 4s ease-in-out infinite 3s !important;
}

html.theme-light #about-btn {
    animation: sparkleMove3 12s linear infinite, prismBorderLight 4s ease-in-out infinite 6s !important;
}

@keyframes prismBorderLight {
    0%, 100% { 
        border-color: var(--theme-text);
        box-shadow: 
            0 0 0 1px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(0, 0, 0, 0.05),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3),
            0 0 8px rgba(0, 0, 0, 0.3);
    }
    50% { 
        border-color: #1F75FE;
        box-shadow: 
            0 0 0 1px rgba(31, 117, 254, 0.2),
            inset 0 1px 0 rgba(31, 117, 254, 0.1),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3),
            0 0 12px rgba(31, 117, 254, 0.4);
    }
}

/* Light theme: ensure base box-shadow is neutral (prevent green bleed) */
html.theme-light .dos-button {
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(0, 0, 0, 0.05),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Light theme: replace green-tinted shimmer with blue tones */
html.theme-light .dos-button::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(31, 117, 254, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(31, 117, 254, 0.04) 0%, transparent 40%),
        linear-gradient(45deg,
            transparent 30%,
            rgba(31, 117, 254, 0.04) 35%,
            rgba(31, 117, 254, 0.07) 50%,
            rgba(31, 117, 254, 0.04) 65%,
            transparent 70%
        ) !important;
    background-size: 300% 300%, 250% 250%, 200% 200% !important;
}

/* =============== CUTTING-EDGE LOGO ANIMATION EFFECTS =============== */
/* Digital Materialization Logo Effect - Unique & Classy */
#landing-logo {
    position: relative;
    overflow: visible;
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: logoMaterialize 2.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    /* Move logo down closer to "People, Health & Compute" text */
    top: 25px;
}

/* Main logo starts invisible and materializes */
@keyframes logoMaterialize {
    0% {
        opacity: 0;
        transform: scale(0.85) rotateY(15deg) translateZ(-50px);
        filter: blur(8px) brightness(0.3);
    }
    20% {
        opacity: 0.3;
        transform: scale(0.92) rotateY(8deg) translateZ(-25px);
        filter: blur(4px) brightness(0.6);
    }
    60% {
        opacity: 0.8;
        transform: scale(0.98) rotateY(2deg) translateZ(-5px);
        filter: blur(1px) brightness(0.9);
    }
    85% {
        opacity: 0.95;
        transform: scale(1.02) rotateY(0deg) translateZ(0px);
        filter: blur(0px) brightness(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg) translateZ(0px);
        filter: blur(0px) brightness(1);
    }
}

/* Particle Assembly Layer */
.logo-particles {
    position: absolute;
    inset: -20px;
    pointer-events: none;
    opacity: 0;
    animation: particleAssembly 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    z-index: 3;
}

.logo-particles::before,
.logo-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(212, 165, 116, 0.4) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(212, 165, 116, 0.3) 0.8px, transparent 0.8px),
        radial-gradient(circle at 40% 70%, rgba(212, 165, 116, 0.5) 1.2px, transparent 1.2px),
        radial-gradient(circle at 75% 85%, rgba(212, 165, 116, 0.35) 0.6px, transparent 0.6px),
        radial-gradient(circle at 15% 80%, rgba(212, 165, 116, 0.25) 0.9px, transparent 0.9px),
        radial-gradient(circle at 60% 15%, rgba(212, 165, 116, 0.4) 1.1px, transparent 1.1px),
        radial-gradient(circle at 90% 60%, rgba(212, 165, 116, 0.3) 0.7px, transparent 0.7px),
        radial-gradient(circle at 35% 45%, rgba(212, 165, 116, 0.45) 1.3px, transparent 1.3px);
    background-size: 60px 60px, 45px 45px, 75px 75px, 35px 35px, 50px 50px, 65px 65px, 40px 40px, 80px 80px;
    animation: particleDrift 3s linear infinite;
}

.logo-particles::after {
    animation-delay: 1.5s;
    opacity: 0.6;
    background-size: 55px 55px, 40px 40px, 70px 70px, 30px 30px, 45px 45px, 60px 60px, 35px 35px, 75px 75px;
}

@keyframes particleAssembly {
    0% {
        opacity: 1;
        transform: scale(3) rotate(180deg);
        filter: blur(12px);
    }
    30% {
        opacity: 0.8;
        transform: scale(2) rotate(90deg);
        filter: blur(6px);
    }
    70% {
        opacity: 0.4;
        transform: scale(1.2) rotate(20deg);
        filter: blur(2px);
    }
    90% {
        opacity: 0.1;
        transform: scale(1.05) rotate(5deg);
        filter: blur(0.5px);
    }
    100% {
        opacity: 0;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
}

@keyframes particleDrift {
    0% { background-position: 0 0, 20px 20px, 10px 10px, 30px 5px, 5px 25px, 25px 15px, 15px 30px, 35px 0; }
    100% { background-position: 60px 60px, 80px 80px, 70px 70px, 90px 65px, 65px 85px, 85px 75px, 75px 90px, 95px 60px; }
}

/* Holographic Shimmer Overlay */
.logo-hologram {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    animation: hologramReveal 3.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    z-index: 4;
}

.logo-hologram::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(212, 165, 116, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(0, 255, 200, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(0, 200, 255, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 25%);
    animation: organicShimmer 8s ease-in-out infinite;
    filter: blur(2px);
}

@keyframes hologramReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateZ(45deg);
        filter: hue-rotate(180deg) saturate(2);
    }
    40% {
        opacity: 0.7;
        transform: scale(1.1) rotateZ(0deg);
        filter: hue-rotate(0deg) saturate(1.5);
    }
    80% {
        opacity: 0.3;
        transform: scale(1.02) rotateZ(0deg);
        filter: hue-rotate(0deg) saturate(1.1);
    }
    100% {
        opacity: 0.15;
        transform: scale(1) rotateZ(0deg);
        filter: hue-rotate(0deg) saturate(1);
    }
}

@keyframes organicShimmer {
    0% {
        background-position: 30% 30%, 70% 70%, 20% 80%, 80% 20%;
        filter: blur(2px) brightness(1);
    }
    25% {
        background-position: 70% 20%, 30% 80%, 80% 30%, 20% 70%;
        filter: blur(1.5px) brightness(1.1);
    }
    50% {
        background-position: 80% 80%, 20% 20%, 70% 30%, 30% 70%;
        filter: blur(2.5px) brightness(0.9);
    }
    75% {
        background-position: 20% 70%, 80% 30%, 30% 80%, 70% 20%;
        filter: blur(1.8px) brightness(1.05);
    }
    100% {
        background-position: 30% 30%, 70% 70%, 20% 80%, 80% 20%;
        filter: blur(2px) brightness(1);
    }
}

/* Depth Shadow Layer - Creates 3D layered effect */
.logo-depth {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    animation: depthEmergence 2.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    z-index: 1;
}

.logo-depth::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../img/pixel_heart_newcolor_white.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: blur(8px) brightness(0.4);
    transform: translateZ(-30px) scale(1.05);
    opacity: 0.6;
}

.logo-depth::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../img/pixel_heart_newcolor_white.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: blur(4px) brightness(0.6);
    transform: translateZ(-15px) scale(1.025);
    opacity: 0.4;
}

@keyframes depthEmergence {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(1.2);
    }
    50% {
        opacity: 0.8;
        transform: translateY(5px) scale(1.05);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0px) scale(1);
    }
}

/* Light Theme Adaptations */
html.theme-light .logo-particles::before,
html.theme-light .logo-particles::after {
    background: 
        radial-gradient(circle at 20% 30%, rgba(31, 117, 254, 0.4) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(31, 117, 254, 0.3) 0.8px, transparent 0.8px),
        radial-gradient(circle at 40% 70%, rgba(31, 117, 254, 0.5) 1.2px, transparent 1.2px),
        radial-gradient(circle at 75% 85%, rgba(31, 117, 254, 0.35) 0.6px, transparent 0.6px),
        radial-gradient(circle at 15% 80%, rgba(31, 117, 254, 0.25) 0.9px, transparent 0.9px),
        radial-gradient(circle at 60% 15%, rgba(31, 117, 254, 0.4) 1.1px, transparent 1.1px),
        radial-gradient(circle at 90% 60%, rgba(31, 117, 254, 0.3) 0.7px, transparent 0.7px),
        radial-gradient(circle at 35% 45%, rgba(31, 117, 254, 0.45) 1.3px, transparent 1.3px);
}

html.theme-light .logo-hologram::before {
    background: 
        radial-gradient(circle at 30% 30%, rgba(31, 117, 254, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(100, 150, 255, 0.06) 0%, transparent 35%),
        radial-gradient(circle at 20% 80%, rgba(150, 180, 255, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 25%);
}

html.theme-light .logo-depth::before {
    background-image: url('../img/pixel_heart_newcolor_logo_black.png');
    filter: blur(8px) brightness(0.7);
}

html.theme-light .logo-depth::after {
    background-image: url('../img/pixel_heart_newcolor_logo_black.png');
    filter: blur(4px) brightness(0.8);
}

/* Responsive scaling for smaller screens */
@media (max-width: 768px) {
    #landing-logo {
        perspective: 800px;
    }
    
    .logo-particles::before,
    .logo-particles::after {
        background-size: 45px 45px, 35px 35px, 55px 55px, 25px 25px, 40px 40px, 50px 50px, 30px 30px, 60px 60px;
    }
}

@media (max-width: 480px) {
    #landing-logo {
        perspective: 600px;
    }
    
    .logo-particles::before,
    .logo-particles::after {
        background-size: 35px 35px, 25px 25px, 45px 45px, 20px 20px, 30px 30px, 40px 40px, 25px 25px, 50px 50px;
    }
}

/* Subtle idle state animation after materialization */
#landing-logo {
    animation: logoMaterialize 2.8s cubic-bezier(0.23, 1, 0.32, 1) forwards,
                logoIdle 6s ease-in-out infinite 3s;
}

@keyframes logoIdle {
    0%, 100% {
        transform: translateY(0px) scale(1);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-2px) scale(1.005);
        filter: brightness(1.05);
    }
}

/* Enhance hologram effect during idle state */
.logo-hologram {
    animation: hologramReveal 3.2s cubic-bezier(0.23, 1, 0.32, 1) forwards,
                hologramIdle 8s ease-in-out infinite 3.5s;
}

@keyframes hologramIdle {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

/* Performance optimizations */
#landing-logo,
.logo-particles,
.logo-hologram,
.logo-depth {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-origin: center center;
    contain: layout style paint;
}

/* Clean up will-change after animations complete */
#landing-logo.materialized {
    will-change: auto;
}

/* =============== STARFIELD BACKGROUND CONTAINER =============== */
/* Background layer - container for starfield canvas */
#background-images-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* UI elements z-index hierarchy */
#landing-logo {
    z-index: 3;
}

#landing-theme-switch {
    z-index: 500;
}

/* PWA and edge-to-edge viewport support */
@supports (display-mode: standalone) {
    #background-images-layer {
        top: calc(-1 * env(safe-area-inset-top, 0px));
        left: calc(-1 * env(safe-area-inset-left, 0px));
        right: calc(-1 * env(safe-area-inset-right, 0px));
        bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
        width: calc(100% + env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px));
        height: calc(100% + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px));
    }
}

/* Performance optimizations */
#background-images-layer {
    contain: strict;
}

/* =============== SOCIAL MEDIA SLIDING PANEL =============== */
/* Social Media Panel - Hidden by default */
.social-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 25;
    pointer-events: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-panel.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Social Icons Container */
.social-icons {
    display: flex;
    gap: 20px;
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #D4A574;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 0 20px rgba(212, 165, 116, 0.3),
        0 0 40px rgba(212, 165, 116, 0.1),
        inset 0 1px 0 rgba(212, 165, 116, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
    position: relative;
    z-index: 5;
    justify-content: center;
}

.social-panel.active .social-icons {
    transform: scale(1) translateY(0);
}

/* Individual Social Icons */
.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
    touch-action: manipulation; /* Enable fast taps on mobile */
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2); /* Visual feedback on tap */
    transform: translateY(10px);
    opacity: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Staggered animation delays for each icon */
.social-panel.active .social-icon:nth-child(1) { animation: slideInIcon 0.4s ease forwards 0.1s; }
.social-panel.active .social-icon:nth-child(2) { animation: slideInIcon 0.4s ease forwards 0.2s; }
.social-panel.active .social-icon:nth-child(3) { animation: slideInIcon 0.4s ease forwards 0.3s; }
.social-panel.active .social-icon:nth-child(4) { animation: slideInIcon 0.4s ease forwards 0.4s; }

@keyframes slideInIcon {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Icon Shapes */
.icon-shape {
    width: 28px;
    height: 28px;
    position: relative;
    pointer-events: none; /* Let clicks pass through to parent icon */
}

/* X (Twitter) Icon */
.x-icon {
    background: linear-gradient(145deg, #000000, #1a1a1a);
}

.x-icon:hover {
    background: linear-gradient(145deg, #1a1a1a, #000000);
}

.x-icon .icon-shape::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #ffffff;
    clip-path: polygon(
        20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%
    );
}

/* Instagram Icon */
.instagram-icon {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-icon:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    filter: brightness(1.1);
}

.instagram-icon .icon-shape::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    border: 2px solid white;
    border-radius: 6px;
    box-sizing: border-box;
}

.instagram-icon .icon-shape::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    box-sizing: border-box;
}

/* Share Icon */
.share-icon {
    background: linear-gradient(145deg, #00cc66, #00aa55);
    border: none;
    cursor: pointer;
    pointer-events: auto;
}

.share-icon:hover {
    background: linear-gradient(145deg, #00aa55, #00cc66);
}

/* Share icon design: Using ios_share.png with white overlay */
.share-icon .icon-shape {
    width: 24px;
    height: 24px;
    background-image: url('../img/ios_share.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1); /* White overlay effect */
}

.share-icon .icon-shape::before {
    display: none;
}

.share-icon .icon-shape::after {
    display: none;
}

/* YouTube Icon */
.youtube-icon {
    background: linear-gradient(145deg, #ff0000, #cc0000);
}

.youtube-icon:hover {
    background: linear-gradient(145deg, #cc0000, #ff0000);
}

.youtube-icon .icon-shape::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 8px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 2px;
}

/* Light Theme Adaptations */
html.theme-light .social-icons {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--terminal-cyan);
    box-shadow: 
        0 0 20px rgba(31, 117, 254, 0.3),
        0 0 40px rgba(31, 117, 254, 0.1),
        inset 0 1px 0 rgba(31, 117, 254, 0.2);
}

html.theme-light .x-icon {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
}

html.theme-light .x-icon:hover {
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
}

html.theme-light .x-icon .icon-shape::before {
    background: #000000;
}

html.theme-light .share-icon {
    background: linear-gradient(145deg, #1f75fe, #0d5fd6);
}

html.theme-light .share-icon:hover {
    background: linear-gradient(145deg, #0d5fd6, #1f75fe);
}

/* Responsive scaling */
@media (max-width: 768px) {
    .social-icons {
        gap: 15px;
        padding: 12px;
    }

    .social-icon {
        width: 45px;
        height: 45px;
    }

    .icon-shape {
        width: 24px;
        height: 24px;
    }

    .share-icon .icon-shape {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 600px) {
    /* FIXED: Ensure social-icons container covers the full logo width on mobile */
    /* Logo on mobile is min(350px, 85vw), so social-icons must match */
    .social-icons {
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
        gap: 12px;
        padding: 12px 15px;
        justify-content: center;
    }

    /* Ensure social panel fills the entire logo area */
    .social-panel {
        width: 100%;
        height: 100%;
        left: 0;
        right: 0;
        transform: translate(0, -50%);
        top: 50%;
    }
}

@media (max-width: 480px) {
    .social-icons {
        gap: 10px;
        padding: 10px 12px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .icon-shape {
        width: 20px;
        height: 20px;
    }

    .share-icon .icon-shape {
        width: 18px;
        height: 18px;
    }
}

/* Logo clickable cursor and transition states */
#landing-logo {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

#landing-logo.social-active {
    cursor: default;
}

/* Logo content fade transitions - only affects logo elements, not social panel */
.logo-particles,
.logo-hologram,
.logo-depth {
    transition: opacity 0.3s ease;
}

/* When social panel is active, fade out logo content */
#landing-logo.social-active .logo-particles,
#landing-logo.social-active .logo-hologram,
#landing-logo.social-active .logo-depth {
    opacity: 0;
}

/* Fade out the main logo background image when social panel is active */
#landing-logo {
    position: relative;
    transition: none; /* Remove transition from container to avoid conflicts */
}

#landing-logo.social-active {
    background-image: none !important;
}

/* Create a pseudo-element that replicates the logo background for smooth fading */
#landing-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../img/pixel_heart_newcolor_white.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

#landing-logo.social-active::after {
    opacity: 0;
}

/* Light theme logo background */
html.theme-light #landing-logo::after {
    background-image: url('../img/pixel_heart_newcolor_logo_black.png');
}

/* Signup process Light theme styles (scoped to terminal sections only) */
/* 1.0 Background for signup flow (terminal container) - scan lines removed */
html.theme-light .terminal-container {
    background-color: var(--theme-bg) !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* 1.1 Cycling-line styling like change-password.html */
html.theme-light .terminal-container .cycling-text,
html.theme-light .terminal-container .cycling-line {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}
html.theme-light .terminal-container .cycling-line { font-weight: 600; }

/* 1.2 BACK button (left) styles: black outline, white fill, black text */
html.theme-light .terminal-container .terminal-button.secondary {
    background-color: var(--theme-back-button-bg) !important;
    border-color: var(--theme-back-button-border) !important;
    color: var(--theme-back-button-text) !important;
}
html.theme-light .terminal-container .terminal-button.secondary:hover,
html.theme-light .terminal-container .terminal-button.secondary:focus {
    background-color: var(--theme-back-button-hover-bg) !important;
    color: var(--theme-back-button-hover-text) !important;
    box-shadow: 0 0 7.5px var(--theme-back-button-hover-bg), 0 0 12.5px rgba(0,0,0,0.3) !important;
    outline: none;
}

/* 1.3 Primary action buttons: CONTINUE/SEND/VERIFY/NEXT/SUBMIT use Light theme blue */
html.theme-light .terminal-container .terminal-button:not(.secondary) {
    background-color: var(--terminal-cyan) !important;
    border-color: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
}
html.theme-light .terminal-container .terminal-button:not(.secondary):hover,
html.theme-light .terminal-container .terminal-button:not(.secondary):focus {
    background-color: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 7.5px var(--terminal-cyan), 0 0 12.5px rgba(31, 117, 254, 0.3) !important;
    outline: none;
}
html.theme-light .terminal-container .terminal-button:not(.secondary):active,
html.theme-light .terminal-container .terminal-button:not(.secondary):active:focus {
    background-color: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 10px var(--terminal-cyan), 0 0 17.5px rgba(31, 117, 254, 0.4) !important;
    transform: scale(0.98);
    outline: none;
}

/* 1.4 All green text becomes black in signup flow */
html.theme-light .terminal-container .section-header,
html.theme-light .terminal-container label,
html.theme-light .terminal-container .message-area,
html.theme-light .terminal-container .location-subtext,
html.theme-light .terminal-container .waitlist-message,
html.theme-light .terminal-container .waitlist-link,
html.theme-light .terminal-container p,
html.theme-light .terminal-container h1,
html.theme-light .terminal-container h2,
html.theme-light .terminal-container h3 {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}

/* Inputs and code squares */
html.theme-light .terminal-container .terminal-input,
html.theme-light .terminal-container .code-square {
    background-color: var(--theme-input-bg) !important;
    border-bottom-color: var(--theme-input-border) !important;
    color: var(--theme-text) !important;
}

/* 1.5 Dropdown styling (mirror match.html Light theme dropdowns) */
html.theme-light .terminal-container select {
    background-color: var(--theme-input-bg) !important;
    border: 2px solid var(--theme-text) !important;
    color: var(--theme-text) !important;
    -webkit-appearance: none;
            appearance: none;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px 12px !important;
    padding-right: 2rem !important;
    /* Blue caret */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%2300A3E0' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e") !important;
}
html.theme-light .terminal-container select:focus {
    border-color: var(--theme-text) !important;
    box-shadow: 0 0 5px color-mix(in srgb, var(--theme-text) 25%, transparent) !important;
    outline: none !important;
}
html.theme-light .terminal-container select option {
    background-color: var(--theme-input-bg) !important;
    color: var(--theme-text) !important;
}
/* Ensure special green-styled classes are overridden in Light theme */
html.theme-light .terminal-container .location-button,
html.theme-light .terminal-container .terminal-button.location-button,
html.theme-light .location-button,
html.theme-light .terminal-button.location-button {
    background: rgba(31, 117, 254, 0.1) !important;
    border: 2px solid var(--terminal-cyan) !important;
    color: var(--terminal-cyan) !important;
    text-shadow: none !important;
    box-shadow: 0 0 7.5px rgba(31, 117, 254, 0.15) !important;
}
html.theme-light .terminal-container .terminal-green-submit {
    background-color: var(--terminal-cyan) !important;
    border-color: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    text-shadow: none !important;
}
html.theme-light .terminal-container .location-button:hover,
html.theme-light .terminal-container .location-button:focus,
html.theme-light .terminal-container .terminal-button.location-button:hover,
html.theme-light .terminal-container .terminal-button.location-button:focus,
html.theme-light .location-button:hover,
html.theme-light .location-button:focus,
html.theme-light .terminal-button.location-button:hover,
html.theme-light .terminal-button.location-button:focus {
    background: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 12.5px rgba(31, 117, 254, 0.3) !important;
    outline: none !important;
}
html.theme-light .terminal-container .terminal-green-submit:hover,
html.theme-light .terminal-container .terminal-green-submit:focus {
    background-color: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 7.5px var(--terminal-cyan), 0 0 12.5px rgba(31, 117, 254, 0.3) !important;
    outline: none !important;
}
html.theme-light .terminal-container .location-button:active,
html.theme-light .terminal-container .location-button:active:focus,
html.theme-light .terminal-container .terminal-button.location-button:active,
html.theme-light .terminal-container .terminal-button.location-button:active:focus,
html.theme-light .location-button:active,
html.theme-light .location-button:active:focus,
html.theme-light .terminal-button.location-button:active,
html.theme-light .terminal-button.location-button:active:focus {
    background: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 10px var(--terminal-cyan), 0 0 17.5px rgba(31, 117, 254, 0.4) !important;
    transform: scale(0.98);
    outline: none !important;
}
html.theme-light .terminal-container .terminal-green-submit:active,
html.theme-light .terminal-container .terminal-green-submit:active:focus {
    background-color: var(--terminal-cyan) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 10px var(--terminal-cyan), 0 0 17.5px rgba(31, 117, 254, 0.4) !important;
    transform: scale(0.98);
    outline: none !important;
}

/* Input focus states: reduced glow to match login.html */
html.theme-light .terminal-container .terminal-input:focus,
html.theme-light .terminal-container #zipCode:focus {
    border-color: var(--theme-text) !important;
    box-shadow: 0 0 5px color-mix(in srgb, var(--theme-text) 25%, transparent) !important;
    outline: none !important;
}

/* Zip Code field: ensure full black border before focus (prevent any green on load) */
html.theme-light .terminal-container #zipCode {
    background-color: var(--theme-input-bg) !important;
    border: 2px solid var(--theme-text) !important;
    color: var(--theme-text) !important;
    box-shadow: none !important;
}

/* Labels in input groups */
html.theme-light .terminal-container .input-group label {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}

/* Terms of Service popup (pricing modal) styling for light theme */
html.theme-light .pricing-modal {
    background: rgba(255, 255, 255, 0.97) !important;
}

html.theme-light .pricing-content {
    border: 2px solid var(--theme-text) !important;
    background: var(--theme-bg) !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3) !important;
    color: var(--theme-text) !important;
}

/* Terms modal close button for light theme */
html.theme-light .modal-close-btn {
    background: var(--theme-bg) !important;
    border: 2px solid var(--theme-text) !important;
    color: var(--theme-text) !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) !important;
}

html.theme-light .modal-close-btn:hover,
html.theme-light .modal-close-btn:focus {
    background: var(--theme-text) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3) !important;
}

/* Terms modal headings for light theme */
html.theme-light .pricing-content h2 {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}

html.theme-light .terms-content h3 {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}

/* Terms modal text content for light theme */
html.theme-light .pricing-content p,
html.theme-light .terms-content p {
    color: var(--theme-text) !important;
}

html.theme-light .terms-content strong {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}

/* Terms modal list items for light theme */
html.theme-light .pricing-content li {
    color: var(--theme-text) !important;
}

html.theme-light .pricing-content li::first-letter {
    color: var(--theme-text) !important;
}

/* Terms modal divider for light theme */
html.theme-light .plan-divider {
    background: linear-gradient(90deg, transparent, var(--theme-text) 50%, transparent) !important;
}

/* Dark theme cycling-line no glow override for signup process */
/* Remove glow effect from cycling-line text in Dark theme signup process only */
html.theme-dark .terminal-container .cycling-text,
html.theme-dark .terminal-container .cycling-line {
    text-shadow: none !important;
}

/* Dark theme primary action buttons: convert sky-blue to yellow style */
/* Apply yellow to SEND, VERIFY, NEXT, SUBMIT without touching USE MY LOCATION */
html.theme-dark .terminal-container .terminal-button:not(.secondary):not(.location-button) {
    background: linear-gradient(145deg, #D4A574, #A67B5B) !important;
    border: 2px solid #D4A574 !important;
    color: #000 !important;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(212, 165, 116, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        inset 1px 0 0 rgba(255, 255, 255, 0.05),
        inset -1px 0 0 rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px !important;
}
html.theme-dark .terminal-container .terminal-button:not(.secondary):not(.location-button):hover,
html.theme-dark .terminal-container .terminal-button:not(.secondary):not(.location-button):focus {
    transform: translateY(-2px);
    box-shadow:
        0 6px 14px rgba(212, 165, 116, 0.25),
        0 3px 6px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    outline: none !important;
}
html.theme-dark .terminal-container .terminal-button:not(.secondary):not(.location-button):active,
html.theme-dark .terminal-container .terminal-button:not(.secondary):not(.location-button):active:focus {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 0 10px rgba(212, 165, 116, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

/* Dark theme: USE MY LOCATION button - outlined yellow */
html.theme-dark .terminal-container .location-button {
    background: rgba(212, 165, 116, 0.1) !important;
    border: 2px solid #D4A574 !important;
    color: #D4A574 !important;
    box-shadow: 0 0 7.5px rgba(212, 165, 116, 0.15) !important;
}

html.theme-dark .terminal-container .location-button:hover,
html.theme-dark .terminal-container .location-button:focus {
    background: #D4A574 !important;
    color: #000 !important;
    box-shadow: 0 0 5px rgba(212, 165, 116, 0.25) !important;
    outline: none !important;
}

html.theme-dark .terminal-container .location-button:active,
html.theme-dark .terminal-container .location-button:active:focus {
    background: #D4A574 !important;
    color: #000 !important;
    box-shadow: 0 0 5px rgba(212, 165, 116, 0.25) !important;
    transform: scale(0.98);
    outline: none !important;
}

/* Dark theme BACK button outline (no dimming) */
html.theme-dark .terminal-container .terminal-button.secondary {
    background-color: transparent !important;
    border: 2px solid var(--terminal-text) !important;
    color: var(--terminal-text) !important;
}
html.theme-dark .terminal-container .terminal-button.secondary:hover,
html.theme-dark .terminal-container .terminal-button.secondary:focus {
    background-color: var(--terminal-text) !important;
    border-color: var(--terminal-text) !important;
    color: #000 !important;
    box-shadow: 0 0 7.5px var(--terminal-text), 0 0 12.5px rgba(212, 165, 116, 0.3) !important;
    outline: none !important;
}
html.theme-dark .terminal-container .terminal-button.secondary:active,
html.theme-dark .terminal-container .terminal-button.secondary:active:focus {
    background-color: var(--terminal-bright) !important;
    border-color: var(--terminal-bright) !important;
    color: #000 !important;
    box-shadow: 0 0 10px var(--terminal-text), 0 0 17.5px rgba(212, 165, 116, 0.4) !important;
    transform: scale(0.98);
    outline: none !important;
}

/* Dark theme waitlist link: green with subtle glow */
html.theme-dark .terminal-container .waitlist-link {
    color: var(--terminal-text) !important;
    text-shadow: 0 0 3px rgba(212, 165, 116, 0.22) !important;
}
html.theme-dark .terminal-container .waitlist-link:hover,
html.theme-dark .terminal-container .waitlist-link:focus {
    color: var(--terminal-text) !important;
    text-shadow: 0 0 6px rgba(212, 165, 116, 0.30) !important;
}

/* ============================
   Terms of Service Modal Styles
   ============================ */

/* Dark Theme (Default) */
#termsServiceModal.pricing-modal {
    display: none;
    position: fixed;
    inset: 0;
    padding: 24px;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.88);
    z-index: 20000;
    overflow-y: auto;
}

#termsServiceModal.pricing-modal.modal-force-visible {
    display: flex !important;
    width: 100vw;
    height: 100vh;
    padding: 24px;
}

#termsServiceModal.pricing-modal.modal-open {
    display: flex;
}

#termsServiceModal .pricing-content.terms-service-modal-content {
    position: relative;
    width: clamp(320px, 78vw, 980px);
    max-height: 88vh;
    overflow-y: auto;
    padding: 48px 36px 36px 36px;
    background: #050505;
    border: 2px solid #D4A574;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(212, 165, 116, 0.22);
    border-radius: 12px;
    color: #f3f3f3;
}

#termsServiceModal .pricing-content.modal-content-force-size {
    display: block !important;
    min-width: clamp(320px, 80vw, 600px) !important;
    min-height: clamp(260px, 60vh, 520px) !important;
}

#termsServiceModal .modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px solid #D4A574;
    color: #D4A574;
    font-size: 1.4em;
    font-weight: 700;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
}

#termsServiceModal .modal-close-btn:hover,
#termsServiceModal .modal-close-btn:focus {
    background: #D4A574;
    color: #050505;
    box-shadow: 0 0 14px rgba(212, 165, 116, 0.45);
}

.terms-service-content-inner {
    font-size: 0.85em;
    line-height: 1.7;
    color: #f0f0f0;
}

.terms-service-content-inner h2 {
    font-size: 1.9em;
    color: #D4A574;
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 0 6px rgba(212, 165, 116, 0.35);
}

.terms-service-content-inner h3,
.terms-service-content-inner h4,
.terms-service-content-inner strong,
.terms-service-content-inner li strong {
    color: #D4A574;
}

.terms-service-content-inner h3 {
    font-size: 1.25em;
    margin-top: 26px;
    margin-bottom: 12px;
}

.terms-service-content-inner h4 {
    font-size: 1.05em;
    margin-top: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.terms-service-content-inner p {
    font-size: 1em;
    color: #d8d8d8;
    margin-bottom: 14px;
    line-height: 1.65;
}

.terms-service-content-inner ul,
.terms-service-content-inner ol {
    margin-left: 22px;
    margin-bottom: 18px;
}

.terms-service-content-inner li {
    font-size: 0.96em;
    color: #d0d0d0;
    margin-bottom: 9px;
    line-height: 1.6;
}

.terms-service-content-inner .effective-date {
    text-align: center;
    font-size: 0.95em;
    color: #D4A574;
    margin-bottom: 24px;
    font-style: italic;
}

.terms-service-content-inner .policy-intro,
.terms-service-content-inner .emphasis-box,
.terms-service-content-inner .contact-info {
    padding: 16px;
    border-radius: 6px;
    border-left: 3px solid #D4A574;
    background: rgba(212, 165, 116, 0.12);
    margin: 20px 0;
}

.terms-service-content-inner .emphasis-box strong,
.terms-service-content-inner .final-statement {
    color: #D4A574;
}

.terms-service-content-inner .policy-section {
    margin-bottom: 32px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.18);
}

.terms-service-content-inner .policy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.terms-service-content-inner .final-statement {
    text-align: center;
    font-style: italic;
    margin-top: 32px;
    font-size: 1.05em;
}

/* Light Theme Overrides */
html.theme-light #termsServiceModal .pricing-content.terms-service-modal-content {
    background: #f8f8f8;
    border: 2px solid #D4A574;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
    color: #1b1b1b;
}

html.theme-light #termsServiceModal .terms-service-content-inner {
    color: #333333;
}

html.theme-light #termsServiceModal .terms-service-content-inner h2 {
    color: #1b1b1b;
    text-shadow: none;
}

html.theme-light #termsServiceModal .terms-service-content-inner h3,
html.theme-light #termsServiceModal .terms-service-content-inner h4,
html.theme-light #termsServiceModal .terms-service-content-inner strong,
html.theme-light #termsServiceModal .terms-service-content-inner li strong {
    color: #1b1b1b;
}

html.theme-light #termsServiceModal .terms-service-content-inner .effective-date {
    color: #1b1b1b;
}

html.theme-light #termsServiceModal .terms-service-content-inner .emphasis-box strong,
html.theme-light #termsServiceModal .terms-service-content-inner .final-statement {
    color: #1b1b1b;
}

html.theme-light #termsServiceModal .terms-service-content-inner p,
html.theme-light #termsServiceModal .terms-service-content-inner li {
    color: #4a4a4a;
}

/* Remove white first-letter effect for terms of service in signup - dark theme only */
html.theme-dark #termsServiceModal .pricing-content li::first-letter {
    color: inherit !important;
}

html.theme-light #termsServiceModal .terms-service-content-inner .policy-intro,
html.theme-light #termsServiceModal .terms-service-content-inner .emphasis-box,
html.theme-light #termsServiceModal .terms-service-content-inner .contact-info {
    background: rgba(212, 165, 116, 0.16);
    border-left-color: #D4A574;
}

html.theme-light #termsServiceModal .modal-close-btn {
    background: transparent;
    border: 2px solid #D4A574;
    color: #D4A574;
}

html.theme-light #termsServiceModal .modal-close-btn:hover,
html.theme-light #termsServiceModal .modal-close-btn:focus {
    background: #D4A574;
    color: #f8f8f8;
}

/* Mobile & PWA Responsive Styles */
@media (max-width: 768px), (display-mode: standalone) {
    #termsServiceModal.pricing-modal {
        padding: 16px;
    }
    
    /* Only apply flex display when modal is open */
    #termsServiceModal.pricing-modal.modal-open {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    #termsServiceModal .pricing-content.terms-service-modal-content {
        width: min(95vw, 600px);
        padding: 32px 22px 24px 22px;
        border-radius: 10px;
        max-height: 90vh;
        margin: auto;
    }

    #termsServiceModal .modal-close-btn {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 1.2em;
    }

    .terms-service-content-inner {
        font-size: 0.78em;
    }
}

@media (max-width: 480px) {
    #termsServiceModal.pricing-modal {
        padding: 12px;
    }
    
    #termsServiceModal.pricing-modal.modal-open {
        display: flex !important;
        align-items: flex-start;
        padding-top: 24px;
    }

    #termsServiceModal .pricing-content.terms-service-modal-content {
        width: min(96vw, 600px);
        padding: 28px 18px 20px 18px;
        border-radius: 8px;
        max-height: 88vh;
    }

    #termsServiceModal .modal-close-btn {
        top: 8px;
        right: 8px;
        width: 32px;
        height: 32px;
        font-size: 1.1em;
    }

    .terms-service-content-inner {
        font-size: 0.74em;
    }
    
    .terms-service-content-inner h2 {
        font-size: 1.6em;
    }
    
    .terms-service-content-inner h3 {
        font-size: 1.15em;
        margin-top: 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING THEME TOGGLE STYLES
   Theme icon positioning and styling for landing page
   Base styles are in index.html inline CSS; these add enhancements
   ═══════════════════════════════════════════════════════════════════════════ */

/* Theme icon styling (base positioning is in inline CSS) */
#landing-theme-switch img.theme-icon {
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* Intro fade - hidden until positioned */
#landing-theme-switch img.theme-icon.intro-fade {
    opacity: 0 !important;
}

/* Prevent unwanted styling on interaction states */
#landing-theme-switch img.theme-icon:hover,
#landing-theme-switch img.theme-icon:focus,
#landing-theme-switch img.theme-icon:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* Active click state */
#landing-theme-switch img.theme-icon.active {
    transform: translateY(2px) scale(0.972);
}