/* 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 */
.dos-button {
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 15% 25%, rgba(0, 255, 0, 0.5) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(0, 255, 0, 0.3) 0.5px, transparent 0.5px),
        radial-gradient(circle at 45% 15%, rgba(0, 255, 0, 0.25) 0.8px, transparent 0.8px),
        radial-gradient(circle at 75% 45%, rgba(0, 255, 0, 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 #00FF00;
    color: #00FF00;
    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;
    box-shadow: 
        0 0 0 1px rgba(0, 255, 0, 0.1),
        inset 0 1px 0 rgba(0, 255, 0, 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(0, 255, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 0, 0.02) 0%, transparent 40%),
        linear-gradient(45deg, 
            transparent 30%, 
            rgba(0, 255, 0, 0.015) 35%, 
            rgba(0, 255, 0, 0.03) 50%, 
            rgba(0, 255, 0, 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;
    }
}

/* Moving light flare effect */
.dos-button::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -100%;
    width: 50%;
    height: calc(100% + 4px);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.1) 20%,
        rgba(0, 255, 0, 0.3) 40%,
        rgba(0, 255, 0, 0.3) 50%,
        rgba(0, 255, 0, 0.3) 60%,
        rgba(0, 255, 0, 0.1) 80%,
        transparent 100%
    );
    /* Animation set individually per button */
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
}

@keyframes lightFlare {
    0%, 85% { 
        left: -100%; 
        opacity: 0;
        transform: skewX(0deg);
    }
    15% { 
        opacity: 1;
        transform: skewX(-15deg);
    }
    75% { 
        opacity: 0.8;
        transform: skewX(-10deg);
    }
    100% { 
        left: 150%; 
        opacity: 0;
        transform: skewX(-5deg);
    }
}

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

@keyframes prismBorder {
    0%, 100% { 
        border-color: #00FF00;
        box-shadow: 
            0 0 0 1px rgba(0, 255, 0, 0.1),
            inset 0 1px 0 rgba(0, 255, 0, 0.05),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3),
            0 0 8px rgba(0, 255, 0, 0.3);
    }
    50% { 
        border-color: #00ffaa;
        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, #00FF00, #00cc00);
    color: #000;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.6),
        0 0 40px rgba(0, 255, 0, 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: #00ff88;
}

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

.dos-button:hover::after {
    animation: lightFlareFast 2s ease-in-out infinite;
}

@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;
    }
}

@keyframes lightFlareFast {
    0%, 70% { 
        left: -100%; 
        opacity: 0;
        transform: skewX(0deg);
    }
    10% { 
        opacity: 1;
        transform: skewX(-20deg);
    }
    60% { 
        opacity: 0.9;
        transform: skewX(-15deg);
    }
    100% { 
        left: 150%; 
        opacity: 0;
        transform: skewX(-10deg);
    }
}

/* Active state */
.dos-button:active,
.dos-button.active-click {
    transform: translateY(1px) scale(0.98);
    box-shadow: 
        0 0 15px rgba(0, 255, 0, 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, #00FF00, #00cc00) !important;
    color: #000 !important;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.6),
        0 0 40px rgba(0, 255, 0, 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: #00ff88 !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::after {
    animation: lightFlare 6s 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::after {
    animation: lightFlare 6s ease-in-out infinite 4s;
}

#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::after {
    animation: lightFlare 6s ease-in-out infinite 8s;
}

#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_light.png) !important;
}

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

/* Animation now defined in style.css - no duplicate needed */

/* Light theme: Override the existing scanning line effect with light theme blue */
html.theme-light #landing-page-content::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        #1F75FE 50%,
        transparent 100%
    ) !important;
    /* Remove opacity override to let animation control visibility */
    animation: var(--scanner-animation, indexScanlineLight 4s linear infinite) !important;
    animation-delay: 0.1s !important;
}

@keyframes indexScanlineLight {
    0% { 
        transform: translateX(-100%); 
        opacity: 0.3;
    }
    50% {
        opacity: 0.3;
    }
    100% { 
        transform: translateX(100%); 
        opacity: 0.3;
    }
}

/* 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, #00FF00, #00cc00) !important;
    color: #000 !important;
    text-decoration: none;
    outline: none;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.6),
        0 0 40px rgba(0, 255, 0, 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: #00ff88 !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; }
html.theme-light .dos-button::after { z-index: 2; mix-blend-mode: normal !important; }

/* Ensure the hover moving bar uses two-tone blue and animates in light mode */
html.theme-light .dos-button::after {
    width: 50%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(31, 117, 254, 0.35) 25%,
        rgba(63, 149, 255, 0.8) 50%,
        rgba(31, 117, 254, 0.35) 75%,
        transparent 100%
    ) !important;
}

/* Match dark-mode behavior: on hover/active, keep the scan visible and moving */
html.theme-light .dos-button:hover::after,
html.theme-light .dos-button:active::after {
    animation: lightFlareFast 2s ease-in-out infinite;
}

/* 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;
}

/* Light theme: force the hover flare to be visible on desktop */
html.theme-light .dos-button:hover::after {
    opacity: 1 !important;
    animation: lightFlareFast 2s ease-in-out infinite;
}

/* Light theme: completely remove the moving scan effect on hover/active */
html.theme-light .dos-button::after,
html.theme-light .dos-button:hover::after,
html.theme-light .dos-button:active::after {
    content: none !important;
    animation: none !important;
    background: none !important;
    opacity: 0 !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;
}

/* 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(0, 255, 0, 0.4) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 0, 0.3) 0.8px, transparent 0.8px),
        radial-gradient(circle at 40% 70%, rgba(0, 255, 0, 0.5) 1.2px, transparent 1.2px),
        radial-gradient(circle at 75% 85%, rgba(0, 255, 0, 0.35) 0.6px, transparent 0.6px),
        radial-gradient(circle at 15% 80%, rgba(0, 255, 0, 0.25) 0.9px, transparent 0.9px),
        radial-gradient(circle at 60% 15%, rgba(0, 255, 0, 0.4) 1.1px, transparent 1.1px),
        radial-gradient(circle at 90% 60%, rgba(0, 255, 0, 0.3) 0.7px, transparent 0.7px),
        radial-gradient(circle at 35% 45%, rgba(0, 255, 0, 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(0, 255, 0, 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_logo.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_logo.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_light.png');
    filter: blur(8px) brightness(0.7);
}

html.theme-light .logo-depth::after {
    background-image: url('../img/pixel_heart_newcolor_logo_light.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, filter;
    backface-visibility: hidden;
    transform-origin: center center;
}

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

/* =============== BACKGROUND IMAGES LAYER WITH SCANNING REVEAL EFFECT =============== */
/* Background Images Layer - Hidden by default, revealed by scanning gradient */
#background-images-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind scanning line (z-index 1) but above base background */
    pointer-events: none;
    overflow: hidden;
    
    /* The background images */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Background image with robust fallback system */
    background-image: var(--img-people-bg-url);
    /* Fallback if CSS custom property fails */
    background-image: url('../img/people_background_tall.jpg');
    
    /* Base transparency - start hidden to match animation */
    opacity: 0;
    --bg-opacity: 0.4;
    
    /* Subtle vivid filter to enhance colors */
    filter: saturate(1.15) contrast(1.08) brightness(1.02);
    
    /* Enable base layer animation with consolidated syntax */
    animation: backgroundImageBaseLayer 4s linear infinite 0.1s both;
    
    /* Smooth theme transitions and orientation changes to prevent glitches */
    /* transition: opacity 0.3s ease, filter 0.3s ease; - REMOVED: Conflicts with animation */
    
    /* Prevent animation restart on orientation change - PWA/Mobile stability */
    animation-fill-mode: both;
    animation-play-state: running;
    
    /* Force animation continuity during orientation changes */
    -webkit-animation-fill-mode: both;
    -webkit-animation-play-state: running;
}

/* Create a revealing overlay that moves with the scanning line */
#background-images-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Create a beautiful feathered reveal effect - KEEP THIS PERFECT */
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 35%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0.4) 45%,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.4) 55%,
        rgba(0, 0, 0, 0.8) 60%,
        rgba(0, 0, 0, 1) 65%,
        rgba(0, 0, 0, 1) 100%
    );
    
    /* Enable reveal animation with stable positioning */
    width: 200%;
    left: -100%;
    transform: translateX(0%);
    opacity: 1;
    animation: backgroundImageReveal 4s linear infinite 0.1s both;
    
    /* Use mix-blend-mode for better effect */
    mix-blend-mode: multiply;
}

/* Animation reset state - stops all pseudo-element animations */
#background-images-layer.animation-reset::before {
    animation: none !important;
    transform: translateX(0%) !important;
}

/* Add dual fade overlays for seamless looping on both sides */
#background-images-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Dual-side fade effect for seamless looping */
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 0.8) 5%,
        rgba(0, 0, 0, 0.3) 10%,
        transparent 15%,
        transparent 75%,
        rgba(0, 0, 0, 0.2) 82%,
        rgba(0, 0, 0, 0.6) 88%,
        rgba(0, 0, 0, 0.9) 94%,
        rgba(0, 0, 0, 1) 100%
    );
    
    /* Enable dual fade animation */
    animation: backgroundImageDualFade 4s ease-in-out infinite 0.1s both;
    mix-blend-mode: multiply;
}

/* Animation reset state - stops all pseudo-element animations */
#background-images-layer.animation-reset::after {
    animation: none !important;
}

@keyframes backgroundImageReveal {
    0% { 
        transform: translateX(0%);
        opacity: 1;
    }
    100% { 
        transform: translateX(50%);
        opacity: 1;
    }
}

@keyframes backgroundImageBaseLayer {
    0% {
        opacity: 0;
    }
    18% {
        opacity: var(--bg-opacity, 0.92);
    }
    82% {
        opacity: var(--bg-opacity, 0.92);
    }
    100% {
        opacity: 0;
    }
}

@keyframes backgroundImageDualFade {
    0% {
        opacity: 1;
    }
    15% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

/* Mobile-first approach - always use cover for mobile/PWA stability */
#background-images-layer {
    /* Default mobile settings - stable for PWA */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Only apply tiling on true desktop screens (not rotated mobile) */
@media (min-width: 1024px) and (min-height: 600px) {
    #background-images-layer {
        /* Desktop only - tile horizontally */
        background-repeat: repeat-x;
        background-size: auto 100%;
        background-position: center center;
    }
}

/* Scanning line should be above background images but below UI elements */
#landing-page-content::before {
    z-index: 2 !important; /* Scanning line above background images */
}

/* UI elements should be above scanning line */
#landing-logo {
    z-index: 3; /* Logo above scanning line */
}

#landing-theme-switch {
    z-index: 500; /* Theme switch above everything */
}

/* Light theme adaptations for background images */
html.theme-light #background-images-layer {
    /* Light theme transparency - let animation control opacity */
    /* opacity: 0.78; - REMOVED: Conflicts with animation */
    --bg-opacity: 0.32;
    
    /* Slightly more vivid filter for light theme to stand out against light background */
    filter: saturate(1.2) contrast(1.12) brightness(1.05);
}

html.theme-light #background-images-layer::before {
    /* Use white overlay for light theme to create proper masking */
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 1) 35%,
        rgba(255, 255, 255, 0.8) 40%,
        rgba(255, 255, 255, 0.4) 45%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.4) 55%,
        rgba(255, 255, 255, 0.8) 60%,
        rgba(255, 255, 255, 1) 65%,
        rgba(255, 255, 255, 1) 100%
    );
    mix-blend-mode: screen;
}

html.theme-light #background-images-layer::after {
    /* Dual-side fade effect for light theme seamless looping */
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.8) 5%,
        rgba(255, 255, 255, 0.3) 10%,
        transparent 15%,
        transparent 75%,
        rgba(255, 255, 255, 0.2) 82%,
        rgba(255, 255, 255, 0.6) 88%,
        rgba(255, 255, 255, 0.9) 94%,
        rgba(255, 255, 255, 1) 100%
    );
    mix-blend-mode: screen;
}

/* PWA and edge-to-edge viewport support */
@supports (display-mode: standalone) {
    #background-images-layer {
        /* Extend to full screen edges in PWA mode */
        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));
        
        /* Initially hidden in PWA until image preloads */
        visibility: hidden;
    }
}

/* PWA image preload detection */
@media (display-mode: standalone) {
    #background-images-layer[style*="visibility: visible"] {
        visibility: visible !important;
    }
}

/* High DPI display optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #background-images-layer {
        /* Ensure crisp rendering on high DPI displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Performance optimizations and orientation change stability */
#background-images-layer {
    will-change: mask-position;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* PWA/Mobile orientation stability - simplified */
@supports (display-mode: standalone) {
    #background-images-layer,
    #background-images-layer::before,
    #background-images-layer::after {
        /* Ensure animations continue smoothly in PWA */
        animation-fill-mode: both !important;
        animation-play-state: running !important;
    }
}

/* Mobile browser stability - prevent orientation change glitches */
@media (max-width: 768px) and (hover: none) and (pointer: coarse) {
    #background-images-layer {
        /* Stable background properties for mobile */
        background-attachment: scroll !important;
        transform: translateZ(0) !important;
        will-change: opacity, transform !important;
    }
}

/* Animation reset class for pseudo-elements - Mobile stability fix */
#background-images-layer.animation-reset::before {
    animation: none !important;
}

#background-images-layer.animation-reset::after {
    animation: none !important;
}

/* Animation now defined above with theme overrides - no duplicate needed */

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    #background-images-layer {
        animation-duration: 8s; /* Slower animation for accessibility */
    }
}

/* Enhanced feathering for smoother reveal effect on larger screens */
@media (min-width: 1024px) {
    #background-images-layer::before {
        /* Wider, more dramatic feathering on larger screens */
        background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 30%,
            rgba(0, 0, 0, 0.9) 35%,
            rgba(0, 0, 0, 0.6) 42%,
            rgba(0, 0, 0, 0.2) 47%,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 0.2) 53%,
            rgba(0, 0, 0, 0.6) 58%,
            rgba(0, 0, 0, 0.9) 65%,
            rgba(0, 0, 0, 1) 70%,
            rgba(0, 0, 0, 1) 100%
        );
        /* Restore original desktop settings */
        width: 200%;
        left: -100%;
        /* Fixed: Ensure animation runs on desktop dark theme */
        animation: backgroundImageReveal 4s linear infinite;
    }
    
    html.theme-light #background-images-layer::before {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 1) 30%,
            rgba(255, 255, 255, 0.9) 35%,
            rgba(255, 255, 255, 0.6) 42%,
            rgba(255, 255, 255, 0.2) 47%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.2) 53%,
            rgba(255, 255, 255, 0.6) 58%,
            rgba(255, 255, 255, 0.9) 65%,
            rgba(255, 255, 255, 1) 70%,
            rgba(255, 255, 255, 1) 100%
        );
        width: 200%;
        left: -100%;
        /* Fixed: Ensure animation runs on desktop light theme */
        animation: backgroundImageReveal 4s linear infinite;
    }
}

/* =============== 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;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00FF00;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        0 0 40px rgba(0, 255, 0, 0.1),
        inset 0 1px 0 rgba(0, 255, 0, 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;
}

.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: 480px) {
    .social-icons {
        gap: 12px;
        padding: 10px;
    }
    
    .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_logo.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_light.png');
}

/* Signup process Light theme styles (scoped to terminal sections only) */
/* 1.0 Background and scanlines for signup flow (terminal container) */
html.theme-light .terminal-container {
    background-color: var(--theme-bg) !important;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(150, 150, 150, 0.15) 0px,
        rgba(150, 150, 150, 0.15) 1px,
        transparent 1px,
        transparent 3px
    ) !important;
    background-size: 100% 4px !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 15px var(--theme-back-button-hover-bg), 0 0 25px rgba(0,0,0,0.6) !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 15px var(--terminal-cyan), 0 0 25px rgba(31, 117, 254, 0.6) !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 20px var(--terminal-cyan), 0 0 35px rgba(31, 117, 254, 0.8) !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 10px var(--theme-text) !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 15px rgba(31, 117, 254, 0.3) !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 25px rgba(31, 117, 254, 0.6) !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 15px var(--terminal-cyan), 0 0 25px rgba(31, 117, 254, 0.6) !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 20px var(--terminal-cyan), 0 0 35px rgba(31, 117, 254, 0.8) !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 20px var(--terminal-cyan), 0 0 35px rgba(31, 117, 254, 0.8) !important;
    transform: scale(0.98);
    outline: none !important;
}

/* Input focus states: remove green glow */
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 10px color-mix(in srgb, var(--theme-text) 50%, 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;
}

/* AGE VERIFICATION & TERMS - Light theme overrides */
/* Checkbox styling for light theme - use blue instead of yellow */
html.theme-light .terminal-container .terminal-checkbox {
    background: var(--theme-input-bg) !important;
    border: 2px solid var(--terminal-cyan) !important;
}

html.theme-light .terminal-container .terminal-checkbox:checked {
    background: var(--terminal-cyan) !important;
    border-color: var(--terminal-cyan) !important;
    box-shadow: 0 0 10px var(--terminal-cyan) !important;
}

html.theme-light .terminal-container .terminal-checkbox:checked::after {
    color: var(--theme-bg) !important;
}

html.theme-light .terminal-container .terminal-checkbox:hover {
    border-color: var(--terminal-cyan) !important;
    box-shadow: 0 0 5px var(--terminal-cyan) !important;
}

/* Terms of Service link styling for light theme - use blue instead of yellow */
html.theme-light .terminal-container .terms-link {
    color: var(--terminal-cyan) !important;
    text-decoration: underline !important;
}

html.theme-light .terminal-container .terms-link:hover {
    color: var(--terminal-cyan) !important;
    text-shadow: 0 0 5px var(--terminal-cyan) !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, #fac929, #e6b625) !important;
    border: 2px solid #fac929 !important;
    color: #000 !important;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(250, 201, 41, 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 8px 20px rgba(250, 201, 41, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !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 20px rgba(250, 201, 41, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

/* Dark theme: USE MY LOCATION button - outlined glow yellow */
html.theme-dark .terminal-container .location-button {
    background: rgba(250, 201, 41, 0.1) !important;
    border: 2px solid #fac929 !important;
    color: #fac929 !important;
    box-shadow: 0 0 15px rgba(250, 201, 41, 0.3) !important;
}

html.theme-dark .terminal-container .location-button:hover,
html.theme-dark .terminal-container .location-button:focus {
    background: #fac929 !important;
    color: #000 !important;
    box-shadow: 0 0 10px #fac929 !important;
    outline: none !important;
}

html.theme-dark .terminal-container .location-button:active,
html.theme-dark .terminal-container .location-button:active:focus {
    background: #fac929 !important;
    color: #000 !important;
    box-shadow: 0 0 10px #fac929 !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 15px var(--terminal-text), 0 0 25px rgba(0, 255, 0, 0.6) !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 20px var(--terminal-text), 0 0 35px rgba(0, 255, 0, 0.8) !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 4px rgba(0, 255, 0, 0.25) !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 8px rgba(0, 255, 0, 0.35) !important;
}