/* UNAWARE - Terminal Dating App Styles */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;700&display=swap');

:root {
    --terminal-bg: #f8f8f8;
    --terminal-text: #000000;
    --terminal-dim: #333333;
    --terminal-bright: #000000;
    --terminal-error: #ff0000;
    --terminal-warning: #ff8800;
    --terminal-cyan: #1F75FE;
    --terminal-purple: #8b00ff;
    --terminal-border: #cccccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: var(--terminal-bg);
    color: var(--terminal-text);
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
}

/* Allow user interaction on input fields and form elements */
input, textarea, select, button, label {
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    touch-action: manipulation !important;
    -webkit-touch-callout: default !important;
}

/* Ensure input fields can be focused in App View mode */
@media (display-mode: standalone) {
    input, textarea, select {
        pointer-events: auto !important;
        user-select: auto !important;
        -webkit-user-select: auto !important;
        -moz-user-select: auto !important;
        -ms-user-select: auto !important;
        touch-action: manipulation !important;
        -webkit-touch-callout: default !important;
    }
    
    /* Ensure terminal-input maintains no border-radius in PWA mode, but exclude zipCode */
    .terminal-input:not(#zipCode) {
        border-radius: 0 !important;
    }
}

/* Landing page should stay hidden when explicitly hidden */
#landing-page-content[style*="display: none"],
#landing-page-content.hidden {
    display: none !important;
}

/* Prevent landing page from reappearing during input focus in app view */
@media (display-mode: standalone) {
    #landing-page-content[style*="display: none"] {
        display: none !important;
        visibility: hidden !important;
        position: fixed !important;
        top: -9999px !important;
        left: -9999px !important;
    }
}

/* iOS Safari specific fix for phantom scrollbars */
@supports (-webkit-touch-callout: none) {
    @media not all and (display-mode: standalone) {
        body {
            overflow-y: hidden;
        }
    }
}

/* Landing Page Styles */
#landing-page-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    z-index: 1051;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    color: #00FF00;
    flex-direction: column;
    overflow: hidden;
    
    /* Scan-lines background effect */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.06) 0px,
        rgba(0, 255, 0, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    background-size: 100% 4px;

    /* Respect notch and side insets, but let the bottom reach the screen edge */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: 0;
}

/* iOS PWA fix - use screen dimensions directly */
@supports (-webkit-touch-callout: none) {
    @media (display-mode: standalone) {
        /* Reset body and html for PWA */
        html, body {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
        }
        
        /* Force elements to use screen height instead of viewport height */
        #landing-page-content {
            height: 100vh;
            height: calc(var(--vh, 1vh) * 100);
            /* Also try screen height as fallback */
            height: calc(var(--screen-height, 100vh));
            /* Ensure flexbox centering is maintained */
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        
        .terminal-container {
            height: 100vh;
            height: calc(var(--vh, 1vh) * 100);
            /* Also try screen height as fallback */
            height: calc(var(--screen-height, 100vh));
        }
    }
}

/* Windows PWA fix - ensure landing page is always centered */
@media (display-mode: standalone) {
    /* Windows specific PWA fixes */
    @supports not (-webkit-touch-callout: none) {
        html, body {
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
        }
        
        /* Only apply centering when landing page is visible (not hidden by JavaScript) */
        #landing-page-content:not(.hidden) {
            height: 100vh !important;
            min-height: 100vh !important;
            /* Force flexbox centering to always work */
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            align-items: center !important;
            /* Ensure content is always centered on page load */
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            /* Reset any transforms that might affect positioning */
            transform: none !important;
            /* Ensure proper z-index */
            z-index: 1051 !important;
        }
        
        .terminal-container {
            height: 100vh !important;
            min-height: 100vh !important;
        }
    }
}

/* Landing page scanning line effect - exactly like user-profile.html */
#landing-page-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 0, 0.15) 50%,
        transparent 100%
    );
    animation: var(--scanner-animation, indexScanline 4s linear infinite);
    animation-delay: 0.1s;
    /* Start hidden to prevent green flash on page load */
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* Animation reset state - stops main scanning line animation */
#landing-page-content.animation-reset::before {
    animation: none !important;
    transform: translateX(-100%) !important;
    opacity: 0 !important;
}

/* Animation delays removed - causing flash conflicts with !important rules in HTML */

@keyframes indexScanline {
    0% { 
        transform: translateX(-100%); 
        opacity: 1;
    }
    100% { 
        transform: translateX(100%); 
        opacity: 1;
    }
}

/* #landing-logo {
    width: 400px;
    height: 100px;
    margin: 0 auto 60px;
    background-color: #00FF00;
    -webkit-mask-image: url(../img/pixel_heart_color_logo.png);
    mask-image: url(../img/pixel_heart_color_logo.png);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    filter: drop-shadow(0 0 5px #00FF00);
    position: relative;
    z-index: 2;
} */

#landing-logo {
    width: 400px;
    height: 100px;
    margin: 0 auto 60px;
    background-image: url(../img/pixel_heart_newcolor_logo.png);   /* add this */
    background-size: contain;                                 /* add this */
    background-repeat: no-repeat;                             /* add this */
    background-position: center;                              /* add this */

    background-color: transparent;            /* remove the #00FF00 */
    -webkit-mask-image: none;                 /* remove the mask lines */
    mask-image: none;                         /* remove the mask lines */
    filter: none;                             /* optional – drop-shadow was green */
}

#landing-page-content h1 {
    font-size: 1.8em;
    margin-bottom: 40px;
    text-shadow: 0 0 5px #00FF00;
    position: relative;
    z-index: 2;
}

.dos-button {
    background-color: #000;
    border: 2px solid #00FF00;
    color: #00FF00;
    padding: 10px 20px;
    margin: 10px;
    text-decoration: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    min-width: 150px;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    text-transform: uppercase;
    font-weight: 700;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    border-radius: 8px;
}

.dos-button:hover,
.dos-button:focus {
    background-color: #00FF00;
    color: #000;
    text-decoration: none;
    outline: none;
    box-shadow: 0 0 10px #00FF00;
}

/* PWA Installation Text */
.pwa-install-text {
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    font-size: 12px;
    text-align: center;
    padding-top: 20px;
    position: relative;
    z-index: 2;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pwa-install-text #pwa-install-text {
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 30%),
        linear-gradient(135deg, #fac929 0%, #e6b525 30%, #d4a122 70%, #e6b525 100%);
    background-size: 300% 300%, 250% 250%, 200% 200%, 100% 100%;
    animation: liquidMix 10s ease-in-out infinite;
    color: black;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.05s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(250, 201, 41, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform: translateY(-2px);
}

.pwa-install-text #pwa-install-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 30%,
        rgba(255, 255, 255, 0.15) 40%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.15) 60%,
        rgba(255, 255, 255, 0.05) 70%,
        transparent 100%
    );
    animation: shimmer 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes shimmer {
    0% {
        left: -100%;
        opacity: 0;
        transform: scaleX(0.5);
    }
    5% {
        opacity: 0.1;
        transform: scaleX(0.6);
    }
    15% {
        opacity: 0.25;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 0.45;
        transform: scaleX(1);
    }
    85% {
        opacity: 0.25;
        transform: scaleX(0.8);
    }
    95% {
        opacity: 0.1;
        transform: scaleX(0.6);
    }
    100% {
        left: 100%;
        opacity: 0;
        transform: scaleX(0.5);
    }
}

@keyframes liquidMix {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
    }
    25% {
        background-position: 100% 50%, 0% 50%, 100% 0%, 0% 0%;
    }
    50% {
        background-position: 50% 100%, 100% 0%, 0% 100%, 0% 0%;
    }
    75% {
        background-position: 0% 50%, 50% 100%, 100% 50%, 0% 0%;
    }
    100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
    }
}

@keyframes textFade {
    0% {
        color: black;
        opacity: 1;
    }
    50% {
        color: black;
        opacity: 0;
    }
    100% {
        color: black;
        opacity: 1;
    }
}

.pwa-text-fade {
    animation: textFade 2s ease-in-out forwards;
}

.pwa-install-text:hover #pwa-install-text {
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 30%),
        linear-gradient(135deg, #ffd542 0%, #fac929 30%, #e6b525 70%, #fac929 100%);
    background-size: 300% 300%, 250% 250%, 200% 200%, 100% 100%;
    transform: translateY(-4px) scale(1.02);
    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);
}

.pwa-install-text:active #pwa-install-text {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.pwa-install-text::after {
    display: none;
}

/* PWA Status Message Animation */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    75% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Disabled landing page button */
.dos-button.disabled,
.dos-button:disabled {
    border: 2px solid #333;
    color: #333;
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #000;
    box-shadow: none;
}

/* Responsive adjustments for landing page */
@media (max-width: 600px) {
    #landing-page-content h1 {
        font-size: 1.6em;
        padding: 0 5vw;
        word-wrap: break-word;
    }
    
    #landing-logo {
        width: 300px;
        height: 75px;
        margin-bottom: 40px;
    }
    
    .dos-button {
        min-width: 120px;
        font-size: 1em;
    }
    
    /* Mobile-specific PWA install text styling */
    .pwa-install-text {
        padding-top: 25px;
        margin-bottom: 10px;
    }
    
    .pwa-install-text #pwa-install-text {
        font-size: 11px;
        padding: 5px 14px;
        min-height: 26px;
        border-radius: 20px;
        box-shadow: 
            0 3px 10px rgba(250, 201, 41, 0.3),
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .pwa-install-text {
        padding-top: 30px;
        margin-bottom: 15px;
    }
    
    .pwa-install-text #pwa-install-text {
        font-size: 10px;
        padding: 4px 12px;
        min-height: 24px;
        border-radius: 20px;
        box-shadow: 
            0 2px 8px rgba(250, 201, 41, 0.3),
            0 1px 3px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.terminal-container {
    width: 100%;
    height: 100vh;
    background: var(--terminal-bg);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* Add same scan-line background as match.html */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.06) 0px,
        rgba(0, 255, 0, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    background-size: 100% 4px;
}

/* Ensure terminal container stays visible in app view */
.terminal-container:not([style*="display: none"]) {
    display: flex !important;
}

@media (max-width: 768px) {
    .terminal-container {
        font-size: 14px;
    }
}

/* Remove border on mobile devices */
@media (max-width: 768px) {
    .terminal-container {
        border: none;
    }
}

.terminal-header {
    display: none;
}

.terminal-title {
    color: var(--terminal-text);
    font-size: 14px;
    font-weight: 700;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.control.minimize { background: var(--terminal-warning); }
.control.maximize { background: var(--terminal-text); }
.control.close { background: var(--terminal-error); }

.terminal-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    line-height: 1.4;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile */
}

.terminal-line {
    margin-bottom: 8px;
}

.prompt {
    color: var(--terminal-bright);
    font-weight: 700;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--terminal-bright);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.boot-sequence {
    margin: 20px 0;
}

.boot-line {
    margin-bottom: 10px;
    color: var(--terminal-dim);
    animation: fadeIn 0.5s ease-in;
}

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

.welcome-message {
    margin-top: 20px;
}

.ascii-art {
    color: var(--terminal-bright);
    font-size: 8px;
    line-height: 1;
    margin-bottom: 20px;
    white-space: pre;
    text-align: center;
}

.system-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 255, 0, 0.05);
}

.system-info p {
    margin-bottom: 8px;
    color: var(--terminal-text);
}

.menu-options {
    margin: 20px 0;
}

.option {
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.option:hover {
    background: rgba(0, 255, 0, 0.1);
    border-left-color: var(--terminal-bright);
    padding-left: 15px;
}

.option-key {
    color: var(--terminal-bright);
    font-weight: 700;
    margin-right: 10px;
}

.input-line {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--terminal-text);
    font-family: inherit;
    font-size: inherit;
    outline: none;
    flex: 1;
    padding: 5px;
    border-bottom: 1px solid var(--terminal-dim);
    text-align: center;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.terminal-input:focus {
    border-bottom-color: var(--terminal-bright);
}

.phone-entry {
    margin-top: 20px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-header {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    text-align: center;
    max-width: 500px;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.cycling-text {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    color: var(--terminal-cyan);
    text-shadow: 
        0 0 5px var(--terminal-cyan),
        0 0 10px var(--terminal-cyan),
        0 0 15px var(--terminal-cyan);
    position: relative;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 2;
    overflow: hidden;
    text-align: center;
}

.cycling-line {
    display: inline-block !important;
    opacity: 1 !important;
    white-space: nowrap;
    color: #00ff00 !important;
    text-shadow: 
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 15px #00ff00,
        0 0 20px #00ff00 !important;
    visibility: visible !important;
    font-size: 14px !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    filter: brightness(1.1) !important;
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
}

.cursor-blink {
    color: var(--terminal-cyan);
    animation: blink-cursor 1s infinite;
    text-shadow: 
        0 0 5px var(--terminal-cyan),
        0 0 10px var(--terminal-cyan);
    margin-left: 2px;
}

@keyframes fadeInGlow {
    0% {
        opacity: 0;
        text-shadow: 0 0 5px var(--terminal-cyan);
    }
    50% {
        opacity: 0.7;
        text-shadow: 
            0 0 10px var(--terminal-cyan),
            0 0 20px var(--terminal-cyan),
            0 0 30px var(--terminal-cyan);
    }
    100% {
        opacity: 1;
        text-shadow: 
            0 0 5px var(--terminal-cyan),
            0 0 10px var(--terminal-cyan),
            0 0 15px var(--terminal-cyan);
    }
}

@keyframes fadeOutGlow {
    0% {
        opacity: 1;
        text-shadow: 
            0 0 5px var(--terminal-cyan),
            0 0 10px var(--terminal-cyan),
            0 0 15px var(--terminal-cyan);
    }
    50% {
        opacity: 0.5;
        text-shadow: 
            0 0 20px var(--terminal-cyan),
            0 0 30px var(--terminal-cyan),
            0 0 40px var(--terminal-cyan);
    }
    100% {
        opacity: 0;
        text-shadow: 0 0 5px var(--terminal-cyan);
    }
}

@keyframes blink-cursor {
    0%, 50% { 
        opacity: 1; 
        text-shadow: 
            0 0 5px var(--terminal-cyan),
            0 0 10px var(--terminal-cyan);
    }
    51%, 100% { 
        opacity: 0; 
    }
}

/* Scan line effect overlay */
.section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: scanline 3s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .cycling-text {
        font-size: 12px;
    }
    
    .section-header {
        min-height: 50px;
        padding: 12px;
    }
}

.input-group {
    margin: 15px 0;
    text-align: center;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--terminal-bright);
    font-weight: 700;
}

.input-group input {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.action-buttons {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.terminal-button {
    background: transparent;
    border: 2px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 10px 20px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 8px;
}

.terminal-button:hover {
    background: var(--terminal-text);
    color: var(--terminal-bg);
    box-shadow: 0 0 10px var(--terminal-text);
}

.terminal-button.secondary {
    border-color: var(--terminal-dim);
    color: var(--terminal-dim);
}

.terminal-button.secondary:hover {
    background: var(--terminal-dim);
    color: var(--terminal-bg);
    box-shadow: 0 0 10px var(--terminal-dim);
}

.terminal-button.terminal-cyan-submit {
    background-color: #00ffff;
    border: 2px solid #00ffff;
    color: #000;
}

.terminal-button.terminal-cyan-submit:hover {
    background-color: #00ffff;
    color: #000;
    box-shadow: 0 0 15px #00ffff, 0 0 25px rgba(0, 255, 255, 0.6);
}

.terminal-button.terminal-cyan-submit:active {
    background-color: #00ffff;
    color: #000;
    box-shadow: 0 0 20px #00ffff, 0 0 35px rgba(0, 255, 255, 0.8);
    transform: scale(0.98);
}

.terminal-button.terminal-green-submit {
    background-color: #00FF00;
    border: 2px solid #00FF00;
    color: #000;
}

.terminal-button.terminal-green-submit:hover {
    background-color: #00FF00;
    color: #000;
    box-shadow: 0 0 15px #00FF00, 0 0 25px rgba(0, 255, 0, 0.6);
}

.terminal-button.terminal-green-submit:active {
    background-color: #00FF00;
    color: #000;
    box-shadow: 0 0 20px #00FF00, 0 0 35px rgba(0, 255, 0, 0.8);
    transform: scale(0.98);
}

.verification-section {
    margin-top: 20px;
    padding: 15px;
    background: transparent;
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.system-status {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px;
    border: 1px solid var(--terminal-border);
    background: rgba(0, 0, 0, 0.8);
    font-size: 12px;
}

.status-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    min-width: 200px;
}

.status-label {
    color: var(--terminal-dim);
}

.status-value {
    color: var(--terminal-bright);
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .terminal-content {
        padding: 15px;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height - adjusts for mobile keyboards */
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        /* Ensure content stays centered when keyboard appears/disappears */
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Prevent content from getting stuck when keyboard appears/disappears */
    .terminal-container {
        height: 100vh;
        height: 100dvh;
        position: relative;
        overflow: hidden;
    }
    
    .ascii-art {
        font-size: 6px;
    }
    
    .system-status {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .terminal-button {
        width: 100%;
        max-width: 200px;
    }
    
    /* Make all sign-up page buttons side by side on mobile */
    .location-entry .action-buttons,
    .phone-entry .action-buttons,
    .verification-section .action-buttons,
    .age-consent-section .action-buttons,
    .notification-section .action-buttons,
    .profile-section .action-buttons {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .location-entry .terminal-button:not(.location-button),
    .phone-entry .terminal-button,
    .verification-section .terminal-button,
    .age-consent-section .terminal-button,
    .notification-section .terminal-button,
    .profile-section .terminal-button {
        width: 100%;
        max-width: 200px;
        min-width: 120px;
        padding: 10px 20px;
        flex: 1;
    }
    
    /* Mobile responsive adjustments for new button styling */
    .location-entry .terminal-button:not(.location-button):not(.secondary) {
        padding: 12px 20px;
        font-size: 0.9em;
        min-height: 44px;
    }
    
    .location-button {
        padding: 12px 20px;
        font-size: 0.9em;
        min-height: 44px;
    }
    
    .terminal-button.terminal-cyan-submit {
        padding: 12px 20px;
        font-size: 0.9em;
        min-height: 44px;
    }
    
    .phone-entry {
        max-width: 90%;
    }
    
    .section-header {
        max-width: 100%;
    }
    
    /* Ensure all signup sections stay centered */
    .location-entry,
    .phone-entry,
    .verification-section,
    .profile-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        position: relative;
    }
    
    /* Prevent keyboard from pushing content permanently */
    .terminal-input,
    .code-square {
        transform: translateZ(0); /* Force hardware acceleration */
        backface-visibility: hidden;
        perspective: 1000px;
    }
    
    /* Smooth transitions for keyboard interactions */
    .terminal-content,
    .location-entry,
    .phone-entry,
    .verification-section,
    .profile-section {
        transition: transform 0.3s ease-in-out;
    }
    
    /* Additional fix for iOS Safari keyboard behavior */
    @supports (-webkit-touch-callout: none) {
        .terminal-content {
            height: 100vh;
            height: 100dvh;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }
        
        .terminal-container {
            height: 100vh;
            height: 100dvh;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }
    }
}

/* Terminal scan lines effect */
.terminal-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(0, 255, 0, 0.02) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}

/* Terminal glow effect */
.terminal-container {
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
}

/* Loading animation */
/* Old spinning animation removed - using progress bar instead */

/* Error messages */
.error-message {
    color: var(--terminal-error);
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid var(--terminal-error);
    padding: 16px;
    margin: 16px 0;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
}

/* Success messages */
.success-message {
    color: var(--terminal-bright);
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--terminal-bright);
    padding: 16px;
    margin: 16px 0;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
}

/* Verification Code Squares */
.code-input-container {
    display: flex;
    justify-content: center;
    margin: 32px 0;
}

.code-squares {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.code-square {
    width: 48px;
    height: 48px;
    background: var(--terminal-bg);
    border: 2px solid var(--terminal-dim);
    color: var(--terminal-text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    outline: none;
}

.code-square:focus {
    border-color: var(--terminal-bright);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    background: rgba(0, 255, 65, 0.05);
    outline: none; /* Remove browser default yellow outline */
}

/* Remove all browser autofill and focus styling */
.code-square:-webkit-autofill,
.code-square:-webkit-autofill:hover,
.code-square:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--terminal-bg) inset !important;
    -webkit-text-fill-color: var(--terminal-text) !important;
    border: 2px solid var(--terminal-dim) !important;
    outline: none !important;
}

.code-square.filled {
    border-color: var(--terminal-bright);
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
}

.code-square.error {
    border-color: var(--terminal-error);
    background: rgba(255, 0, 0, 0.1);
    animation: shake 0.5s ease-in-out;
}

.code-square:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Profile Section Styles */
.profile-section,
.password-reset-section,
.success-section,
.phone-entry-section {
    animation: fadeIn 0.8s ease-in-out;
    padding: 32px 24px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.profile-section .input-group,
.password-reset-section .input-group,
.phone-entry-section .input-group {
    margin-bottom: 24px;
}

/* Password Requirements */
.password-requirements {
    margin-top: 12px;
    padding: 16px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--terminal-dim);
    border-radius: 8px;
}

.requirement {
    color: var(--terminal-dim);
    font-size: 12px;
    margin: 4px 0;
    transition: color 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
}

.requirement.valid {
    color: var(--terminal-bright);
}

.requirement.invalid {
    color: var(--terminal-error);
}

/* Password reveal wrapper and toggle */
.password-wrapper {
    display: flex;
    align-items: center;
}

.toggle-password-btn {
    margin-left: 8px;
    background: transparent;
    border: 2px solid var(--terminal-text);
    color: var(--terminal-text);
    cursor: pointer;
    padding: 6px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 8px;
}

.toggle-password-btn:hover,
.toggle-password-btn:focus {
    background: var(--terminal-text);
    color: #000;
}

/* Enhanced Terminal Button States */
.terminal-button:disabled {
    background: var(--terminal-bg);
    border-color: var(--terminal-dim);
    color: var(--terminal-dim);
    cursor: not-allowed;
    opacity: 0.5;
}

.terminal-button:disabled:hover {
    background: var(--terminal-bg);
    color: var(--terminal-dim);
    box-shadow: none;
}

/* Responsive adjustments for code squares */
@media (max-width: 768px) {
    .code-squares {
        gap: 8px;
    }
    
    .code-square {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .profile-section {
        padding: 24px 16px;
    }
    
    .password-requirements {
        padding: 12px;
    }
    
    .requirement {
        font-size: 11px;
    }
}

/* Smooth transitions between sections */
.phone-entry,
.verification-section,
.profile-section {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.phone-entry.slide-out,
.verification-section.slide-out,
.profile-section.slide-out {
    opacity: 0;
    transform: translateX(-20px);
}

.verification-section.slide-in,
.profile-section.slide-in {
    opacity: 1;
    transform: translateX(0);
}

/* Loading states - Internal Progress Bar */
.terminal-button.loading {
    position: relative;
    overflow: hidden;
}

.terminal-button.loading::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 3px;
    right: 3px;
    height: 2px;
    background: var(--terminal-dim);
    z-index: 1;
}

.terminal-button.loading::before {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 3px;
    height: 2px;
    width: 0%;
    background: var(--terminal-bright);
    animation: progressBar 2s ease-in-out forwards;
    z-index: 2;
    box-shadow: 0 0 4px var(--terminal-bright);
}

@keyframes progressBar {
    0% { width: 0%; }
    100% { width: calc(100% - 6px); }
}

/* Login page styles */
.login-section {
    animation: fadeIn 0.8s ease-in-out;
    padding: 32px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.login-help {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid var(--terminal-border);
    color: var(--terminal-dim);
}

.login-help p {
    margin: 8px 0;
    font-size: 0.9em;
}

.help-link {
    color: var(--terminal-text);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.help-link:hover {
    color: var(--terminal-bright);
    text-shadow: 0 0 5px var(--terminal-bright);
}

.processing-section {
    animation: fadeIn 0.8s ease-in-out;
    padding: 32px 24px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.loading-indicator {
    margin: 30px 0;
    text-align: center;
}

/* Login-specific loading animation */
.processing-section .loading-text {
    width: 300px;
    height: 20px;
    background: linear-gradient(-45deg, #0a0a0a, #1a1a1a, #0a0a0a);
    border-radius: 15px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.8),
        inset 0 1px 2px rgba(0, 0, 0, 0.9),
        0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
}

.processing-section .loading-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #ff006e 0%,
        #8338ec 25%, 
        #3a86ff 50%,
        #06ffa5 75%,
        #ffbe0b 100%
    );
    border-radius: inherit;
    animation: progressFlow 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 
        0 0 10px rgba(255, 190, 11, 0.5),
        0 0 20px rgba(6, 255, 165, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.processing-section .loading-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    border-radius: inherit;
    animation: shimmerPass 0.5s ease-in-out infinite;
}

/* General loading-text fallback for other pages */
.loading-text {
    font-family: 'JetBrains Mono', monospace;
    color: var(--terminal-bright);
    font-size: 1.1em;
    animation: pulse 1.5s infinite;
}

@keyframes progressFlow {
    0% {
        left: -100%;
        background: linear-gradient(
            90deg,
            #ff006e 0%,
            #8338ec 25%, 
            #3a86ff 50%,
            #06ffa5 75%,
            #ffbe0b 100%
        );
    }
    100% {
        left: 0%;
        background: linear-gradient(
            90deg,
            #ffbe0b 0%,
            #ff006e 25%, 
            #8338ec 50%,
            #3a86ff 75%,
            #06ffa5 100%
        );
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* About Page Styles */
.about-section {
    animation: fadeIn 0.8s ease-in-out;
    padding: 24px;
    max-width: 800px;
    margin: 0 auto;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
}

.about-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 30px 0;
    padding: 0 10px;
}

.about-nav-buttons .dos-button {
    margin: 0;
    /* Override default green styling with yellow for About page */
    background-color: #000; /* keep black background */
    border: 2px solid #fac929;
    color: #fac929;
}

/* Hover / focus state override for About page nav buttons */
.about-nav-buttons .dos-button:hover,
.about-nav-buttons .dos-button:focus {
    background-color: #fac929;
    color: #000;
    box-shadow: 0 0 10px #fac929;
}

.about-content {
    margin-top: 20px;
}

.about-title h1 {
    color: #fac929;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-shadow: 0 0 5px #fac929;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.about-section-header h2 {
    color: var(--terminal-bright);
    font-size: 1.4em;
    margin: 30px 0 20px 0;
    text-shadow: 0 0 5px var(--terminal-bright);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.about-text {
    margin-bottom: 20px;
}

.about-text p {
    color: #fac929;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: justify;
}

.about-quote {
    text-align: center;
    font-style: italic;
    margin: 25px 0;
    padding: 20px;
    border: 1px solid var(--terminal-dim);
    background: rgba(0, 255, 65, 0.05);
    border-radius: 12px;
}

.about-image-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.about-image {
    width: 100%;
    max-width: 100%;
    height: auto;
}

.signature-section {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--terminal-border);
    text-align: center;
}

.signature-divider {
    width: 100%;
    height: 1px;
    background: var(--terminal-dim);
    margin-bottom: 15px;
}

.signature-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: 'JetBrains Mono', monospace;
}

.signature-text {
    color: var(--terminal-dim);
    font-size: 0.9em;
}

.signature-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.x-logo {
    width: 24px;
    height: 24px;
    /* Fixed filter to prevent yellow box and preserve transparency */
    filter: brightness(0) saturate(100%) invert(88%) sepia(83%) saturate(500%) hue-rotate(5deg) brightness(1.2);
    transition: filter 0.3s ease;
    /* Ensure transparency is preserved */
    background: transparent !important;
}

.signature-link:hover .x-logo {
    /* Simpler hover filter that maintains transparency */
    filter: brightness(0) saturate(100%) invert(88%) sepia(83%) saturate(500%) hue-rotate(5deg) brightness(1.5);
}

/* Responsive styles for about page */
@media (max-width: 768px) {
    .about-section {
        padding: 16px;
        max-height: calc(100vh - 40px);
    }
    
    .about-nav-buttons {
        margin: 15px 0 20px 0;
        padding: 0 5px;
    }
    
    .about-nav-buttons .dos-button {
        /* Match landing page mobile button sizing */
        min-width: 120px;
        font-size: 1em;
        padding: 8px 16px;
    }
    
    .about-title h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
    
    .about-section-header h2 {
        font-size: 1.2em;
        margin: 25px 0 15px 0;
    }
    
    .about-text p {
        font-size: 1em;
        line-height: 1.5;
        text-align: left;
    }
    
    .about-image {
        width: 100%;
        max-width: 100%;
    }
    
    .signature-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .x-logo {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .about-nav-buttons .dos-button {
        /* Slightly larger buttons for very small screens to improve usability */
        min-width: 120px;
        font-size: 1em;
        padding: 8px 16px;
    }
    
    .about-title h1 {
        font-size: 1.3em;
    }
    
    .about-section-header h2 {
        font-size: 1.1em;
    }
    
    .about-text p {
        font-size: 0.95em;
    }
    
    .about-image {
        width: 100%;
        max-width: 100%;
    }
}

/* ---- Pricing Modal Overlay ---- */
.pricing-modal {
    display: none; /* remains hidden until triggered */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.97); /* deep black overlay */
    z-index: 10000; /* above everything */

    /* center content */
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden; /* prevent horizontal scroll */
}

.pricing-content {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 20px; /* breathing room on narrow screens */
    box-sizing: border-box;
    border: 2px solid #fac929;
    background: #000; /* maintain terminal theme */
    padding: 60px 40px 50px 40px;
    box-shadow: 0 0 15px #fac929;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 8px;
    color: #fac929;
    text-align: left;
    max-height: 90vh; /* ensure fits within viewport */
    overflow-y: auto;
}

/* Close button */
.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: #000;
    border: 2px solid #fac929;
    color: #fac929;
    font-size: 1.5em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 10px #fac929;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
    border-radius: 8px;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    background: #fac929;
    color: #000;
    box-shadow: 0 0 20px #fac929;
    outline: none;
}

/* Plan headings */
.pricing-content h2 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.4em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFFFFF; /* white for headings */
    text-shadow: 0 0 6px #fac929;
}

.pricing-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.pricing-content li {
    margin: 6px 0;
    color: #fac929;
}

/* Make arrow symbols white like h2 headers in both about.html and match.html */
.pricing-content li {
    position: relative;
}

.pricing-content li::first-letter {
    color: #FFFFFF !important;
}

/* Decorative neon divider between plans */
.plan-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #fac929 50%, transparent);
    margin: 25px 0;
}

@media (max-width: 600px) {
    .modal-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3em;
        top: 8px;
        right: 8px;
    }

    .pricing-content {
        padding: 32px 16px 56px 16px; /* extra bottom padding for comfortable scroll */
        max-height: 85vh; /* reduced height to ensure bottom border is visible */
        overflow-y: auto;
        border-radius: 8px;
    }

    .pricing-content h2 {
        font-size: 1.15em;
    }

    .pricing-content li {
        font-size: 0.95em;
    }
}

/* Mobile browser specific fixes - targets non-PWA mobile browsers */
@media (max-width: 600px) and (display-mode: browser) {
    .pricing-modal {
        /* Removed padding to allow full screen on mobile browsers */
        box-sizing: border-box;
    }
    
    .pricing-content {
        max-height: 85vh; /* reduced height to ensure bottom border is visible */
        margin: 0 20px; /* Use same margin as other mobile views */
        border-radius: 8px;
    }
}

/* Additional mobile browser viewport fixes for browsers that don't support display-mode */
@media (max-width: 600px) and (hover: none) and (pointer: coarse) {
    .pricing-modal:not(.pwa-standalone) {
        /* Removed padding to allow full screen on mobile browsers */
        box-sizing: border-box;
    }
    
    .pricing-content:not(.pwa-standalone) {
        max-height: 85vh; /* reduced height to ensure bottom border is visible */
        margin: 0 20px; /* Use same margin as other mobile views */
        border-radius: 8px;
    }
}

/* JavaScript-enhanced mobile browser detection */
body.mobile-browser .pricing-modal,
.mobile-browser-modal {
    /* Removed padding to allow full screen on mobile browsers */
    box-sizing: border-box;
}

body.mobile-browser .pricing-content,
.mobile-browser-content {
    max-height: 85vh !important; /* reduced height to ensure bottom border is visible */
    margin: 0 20px !important; /* Use same margin as other mobile views */
    border-radius: 8px !important;
}

/* Ensure PWA mode (iOS app view) maintains original styling */
body.pwa-standalone .pricing-modal {
    padding: 0;
}

body.pwa-standalone .pricing-content {
    max-height: 85vh;
    margin: 0 20px;
    border-radius: 8px;
}

/* Location Entry Styling */
.location-entry {
    display: none;
    animation: fadeIn 0.5s ease-in;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.location-entry .cycling-text {
    width: 80vw;
    max-width: 500px;
    min-width: 300px;
    text-align: center;
    min-height: 40px;
    padding: 10px 20px;
    box-sizing: border-box;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.location-entry .cycling-line {
    display: inline-block !important;
    opacity: 1 !important;
    color: #00ff00 !important;
    text-shadow: 
        0 0 5px #00ff00,
        0 0 10px #00ff00,
        0 0 15px #00ff00,
        0 0 20px #00ff00 !important;
    visibility: visible !important;
    font-size: 14px !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
    font-weight: 400 !important;
    letter-spacing: 0.5px !important;
    filter: brightness(1.1) !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    text-align: center !important;
    line-height: 1.4 !important;
    max-width: 100% !important;
}

.location-subtext {
    color: #00FF00;
    font-size: 0.9em;
    margin-bottom: 20px;
    opacity: 0.8;
    text-align: center;
}

/* Special styling for the USE MY LOCATION button - outlined style for dark theme */
.location-button {
    background: transparent !important;
    border: 2px solid #00FF00 !important;
    color: #00FF00 !important;
    padding: 10px 20px;
    margin: 10px 0;
    text-transform: uppercase;
    font-weight: 700;
    min-width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 8px;
}

.location-button:hover,
.location-button:focus {
    background: #00FF00 !important;
    color: #000 !important;
    box-shadow: 0 0 10px #00FF00 !important;
    outline: none;
}

.location-button:active,
.location-button:active:focus {
    background: #00FF00 !important;
    color: #000 !important;
    box-shadow: 0 0 10px #00FF00 !important;
    outline: none;
    transform: scale(0.98);
}



.message-area {
    min-height: 20px;
    color: #00FF00;
    font-size: 0.9em;
    margin: 10px 0;
    text-align: center;
}

/* Desktop browser specific styling - narrower container for location message */
@media (min-width: 1024px) and (display-mode: browser) {
    .message-area {
        max-width: 400px;
        margin: 10px auto;
    }
}

/* Fallback for desktop browsers that don't support display-mode */
@media (min-width: 1024px) {
    body:not(.pwa-standalone) .message-area {
        max-width: 400px;
        margin: 10px auto;
    }
}

/* Desktop browser specific styling - match section-header width to message-area */
@media (min-width: 1024px) and (display-mode: browser) {
    .section-header {
        max-width: 400px;
        margin: 0 auto 20px auto;
    }
}

/* Fallback for desktop browsers that don't support display-mode */
@media (min-width: 1024px) {
    body:not(.pwa-standalone) .section-header {
        max-width: 400px;
        margin: 0 auto 20px auto;
    }
}

.waitlist-link {
    color: var(--terminal-cyan);
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    transition: color 0.2s ease;
    text-shadow: 0 0 5px var(--terminal-cyan);
}

.waitlist-link:hover {
    color: var(--terminal-bright);
    text-shadow: 0 0 10px var(--terminal-bright);
}

/* # change this back yellow*/
/* .waitlist-link {
    color: #fac929;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
    transition: color 0.2s ease;
    text-shadow: 0 0 5px #fac929;
}

.waitlist-link:hover {
    color: var(--terminal-bright);
    text-shadow: 0 0 10px var(--terminal-bright);
} */

/* Waitlist Page Styles */
.waitlist-entry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    animation: fadeIn 0.5s ease-in;
}

.waitlist-content {
    margin: 30px 0 15px 0; /* Reduced bottom margin */
    text-align: left;
    width: 100%;
}

.waitlist-text {
    color: var(--terminal-text);
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

/* Waitlist buttons matching location page style */
.waitlist-entry .action-buttons {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 10px; /* Reduced gap from country input */
}

.waitlist-entry .terminal-button {
    width: auto;
    max-width: 120px;
    min-width: 80px;
    padding: 10px 15px;
    flex: 1;
}

.waitlist-success {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    animation: fadeIn 0.5s ease-in;
}

.success-content {
    margin: 30px 0;
    text-align: center;
    width: 100%;
}

.success-text {
    color: var(--terminal-text);
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.success-subtext {
    color: var(--terminal-dim);
    font-size: 1em;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* Ensure all terminal inputs have consistent styling */
#zipCode {
    background-color: #000;
    border: 1px solid #00FF00;
    color: #00FF00;
    padding: 10px;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    width: 200px;
    text-align: center;
    font-size: 1.1em;
    border-radius: 8px;
}

#zipCode:focus {
    outline: none;
    box-shadow: 0 0 10px #00FF00;
    border-color: #00FF00;
}

/* Terminal button consistency */
.terminal-button {
    background-color: #000;
    border: 2px solid #00FF00;
    color: #00FF00;
    padding: 10px 20px;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    text-transform: uppercase;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
}

.terminal-button:hover {
    background-color: #00FF00;
    color: #000;
    box-shadow: 0 0 15px #00FF00;
}

.terminal-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.terminal-button:disabled:hover {
    background-color: #000;
    color: #00FF00;
    box-shadow: none;
}

.location-entry .section-header {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Age Consent Section Styling */
.age-consent-section {
    display: none;
    animation: fadeIn 0.5s ease-in;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.consent-content {
    margin: 30px 0;
    text-align: center;
    width: 100%;
}

.consent-text {
    color: var(--terminal-text);
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

.age-verification {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1em;
    color: #fac929;
}

.terminal-checkbox {
    width: 20px;
    height: 20px;
    background: var(--terminal-bg);
    border: 2px solid #fac929;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.terminal-checkbox:checked {
    background: #fac929;
    border-color: #fac929;
    box-shadow: 0 0 10px #fac929;
}

.terminal-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--terminal-bg);
    font-size: 14px;
    font-weight: bold;
}

.terminal-checkbox:hover {
    border-color: #fac929;
    box-shadow: 0 0 5px #fac929;
}

.checkbox-group label {
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.checkbox-group label:hover {
    color: #fac929;
}

.terms-section {
    margin: 25px 0;
    text-align: center;
}

.terms-text {
    color: var(--terminal-text);
    font-size: 1em;
    line-height: 1.6;
}

.terms-link {
    color: #fac929;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: #fac929;
    text-shadow: 0 0 5px #fac929;
}

/* Notification Method Section Styling */
.notification-section {
    display: none;
    animation: fadeIn 0.5s ease-in;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.notification-content {
    margin: 30px 0;
    text-align: left;
    width: 100%;
}

.notification-text {
    color: var(--terminal-text);
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

.notification-method {
    margin: 25px 0;
    text-align: left;
}

.terminal-select {
    background: var(--terminal-bg);
    border: 2px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 8px 12px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 35px;
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
}

.terminal-select:focus {
    outline: none;
    border-color: var(--terminal-bright);
    box-shadow: 0 0 10px var(--terminal-bright);
}

.terminal-select:hover {
    border-color: var(--terminal-bright);
    box-shadow: 0 0 5px var(--terminal-bright);
}

.terminal-select option {
    background: var(--terminal-bg);
    color: var(--terminal-text);
    padding: 8px;
}

.terminal-select option.locked {
    color: var(--terminal-cyan);
    font-style: italic;
}

/* Questionnaire dropdown styles */
.dropdown {
    background: var(--terminal-bg);
    border: 2px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 8px 12px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300ff00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 35px;
    width: 100%;
    border-radius: 8px;
}

.dropdown:focus {
    outline: none;
    border-color: var(--terminal-bright);
    box-shadow: 0 0 10px var(--terminal-bright);
}

.dropdown:hover {
    border-color: var(--terminal-bright);
    box-shadow: 0 0 5px var(--terminal-bright);
}

.dropdown option {
    background: var(--terminal-bg);
    color: var(--terminal-text);
    padding: 8px;
}

.dropdown option.locked {
    color: var(--terminal-cyan);
    font-style: italic;
}

/* Questionnaire textarea styles */
.textarea-container {
    width: 100%;
    margin: 0;
}

.textarea {
    background: var(--terminal-bg);
    border: 2px solid var(--terminal-text);
    color: var(--terminal-text);
    padding: 12px 16px;
    font-family: inherit;
    font-size: inherit;
    cursor: text;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 120px;
    border-radius: 8px;
    resize: vertical;
    line-height: 1.5;
    /* Override any scanlines background effects */
    background-image: none !important;
}

/* Light theme: ensure clean solid background without scanlines */
html.theme-light .textarea,
body.theme-light .textarea {
    background: #f8f8f8 !important;
    background-image: none !important;
}

/* Override terminal-container scanlines for light theme */
html.theme-light .terminal-container {
    background-image: none !important;
}

/* More specific override for textareas within any container in light theme */
html.theme-light .textarea-container .textarea,
html.theme-light .question-page .textarea,
html.theme-light .terminal-container .textarea,
body.theme-light .textarea-container .textarea,
body.theme-light .question-page .textarea,
body.theme-light .terminal-container .textarea {
    background: #f8f8f8 !important;
    background-image: none !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
}

/* Aggressive override for any textarea in light theme - highest specificity */
html.theme-light textarea[class*="textarea"],
html.theme-light textarea.textarea,
html.theme-light .textarea,
body.theme-light textarea[class*="textarea"],
body.theme-light textarea.textarea,
body.theme-light .textarea {
    background: #f8f8f8 !important;
    background-image: none !important;
    background-attachment: initial !important;
    background-clip: padding-box !important;
    background-color: #f8f8f8 !important;
    background-origin: padding-box !important;
    background-position: 0% 0% !important;
    background-repeat: no-repeat !important;
    background-size: auto !important;
}

.textarea:focus {
    outline: none;
    border-color: var(--terminal-bright);
    box-shadow: 0 0 10px var(--terminal-bright);
}

.textarea:hover {
    border-color: var(--terminal-bright);
    box-shadow: 0 0 5px var(--terminal-bright);
}

/* Light theme specific placeholder styling */
html.theme-light .textarea::placeholder,
body.theme-light .textarea::placeholder {
    color: #666666;
    opacity: 1;
}

/* Dark theme placeholder styling (maintain existing behavior) */
html.theme-dark .textarea::placeholder,
body.theme-dark .textarea::placeholder,
.textarea::placeholder {
    color: var(--terminal-dim);
    opacity: 0.8;
}

/* Character count styling */
.char-count {
    color: var(--terminal-dim);
    font-size: 0.85em;
    text-align: right;
    margin-top: 5px;
    font-family: inherit;
}

/* Light theme character count */
html.theme-light .char-count,
body.theme-light .char-count {
    color: #666666;
}

/* Prevent mobile keyboard navigation arrows for specific fields */
#age,
#self_description {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

/* Additional mobile keyboard navigation prevention */
#age::-webkit-outer-spin-button,
#age::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Prevent mobile form navigation for questionnaire fields */
@media (max-width: 768px) {
    #age,
    #self_description {
        /* Prevent mobile browsers from showing field navigation arrows */
        isolation: isolate;
        /* Remove from tab sequence navigation */
        -webkit-user-modify: read-write-plaintext-only;
    }
}

.email-input-group {
    margin-top: 25px;
    animation: fadeIn 0.3s ease-in;
}

.email-input-group label {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    color: var(--terminal-text);
    font-size: 1em;
    font-weight: 700;
}

.email-input {
    width: 100% !important;
    max-width: none !important;
}

.email-error {
    color: var(--terminal-error);
    font-size: 0.9em;
    margin-top: 5px;
    text-shadow: 0 0 3px var(--terminal-error);
}



.terms-section {
    margin: 25px 0;
    text-align: center;
}

.terms-text {
    color: var(--terminal-text);
    font-size: 1em;
    line-height: 1.6;
}

.terms-link {
    color: #fac929;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.3s ease;
}

.terms-link:hover {
    color: #fac929;
    text-shadow: 0 0 5px #fac929;
}

/* Terms Modal Content Styling */
.terms-content {
    text-align: left;
    line-height: 1.6;
}

.terms-content h3 {
    color: #FFFFFF;
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 6px #fac929;
}

.terms-content p {
    color: #fac929;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.terms-content strong {
    color: #FFFFFF;
    text-shadow: 0 0 3px #fac929;
}

/* Disabled button styling for consent */
#consentNextBtn.disabled {
    background: var(--terminal-bg);
    color: var(--terminal-dim);
    border-color: var(--terminal-dim);
    cursor: not-allowed;
    opacity: 0.6;
}

#consentNextBtn.disabled:hover {
    background: var(--terminal-bg);
    color: var(--terminal-dim);
    border-color: var(--terminal-dim);
    box-shadow: none;
}

/* Desktop styles for age consent - prevent shifting */
@media (min-width: 769px) {
    .age-consent-section {
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin: 0 auto;
        padding: 40px 20px;
        max-width: 700px;
        min-height: 50vh;
    }
    
    .consent-content {
        margin: 40px 0;
        text-align: center;
        width: 100%;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .consent-text {
        font-size: 1.2em;
        line-height: 1.8;
        margin-bottom: 35px;
    }
    
    .age-verification {
        margin: 35px 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .checkbox-group {
        font-size: 1.2em;
        gap: 20px;
    }
    
    .terminal-checkbox {
        width: 22px;
        height: 22px;
        border-radius: 8px;
    }
    
    .terms-section {
        margin: 35px 0;
        text-align: center;
    }
    
    .terms-text {
        font-size: 1.1em;
        line-height: 1.7;
    }
}

/* Mobile responsiveness for age consent and notifications */
@media (max-width: 768px) {
    .age-consent-section,
    .notification-section {
        padding: 15px;
    }
    
    .consent-text,
    .notification-text {
        font-size: 1em;
    }
    
    .checkbox-group {
        font-size: 1em;
        gap: 12px;
    }
    
    .terminal-checkbox {
        width: 18px;
        height: 18px;
    }
    
    .terms-text {
        font-size: 0.9em;
    }
    
    .terminal-select {
        font-size: 1em;
        max-width: 100%;
        border-radius: 8px;
    }
    
    .email-input-group {
        margin-top: 15px;
    }
    
    .terms-content h3 {
        font-size: 1.1em;
    }
    
    .terms-content p {
        font-size: 0.9em;
    }
}

/* ===== 3-PHOTO UPLOAD SYSTEM STYLES ===== */

/* Photo Upload Container */
.photo-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.photo-description {
    text-align: center;
    margin-bottom: 20px;
    color: var(--terminal-text);
    font-size: 1em;
    line-height: 1.5;
}

/* Photo Upload Area */
.photo-upload-area {
    width: 100%;
    min-height: 300px;
    border: 2px dashed var(--terminal-dim);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 255, 0, 0.02);
    padding: 30px 20px;
    margin-bottom: 25px; /* Consistent spacing between upload area and buttons for all views */
}

.photo-upload-area:hover,
.photo-upload-area.dragover {
    border-color: var(--terminal-bright);
    background: rgba(0, 255, 0, 0.05);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

.upload-icon {
    width: 60px;
    height: 60px;
    opacity: 0.7;
    margin-bottom: 15px;
    filter: brightness(0) invert(1) sepia(1) saturate(5) hue-rotate(90deg);
    pointer-events: none; /* Prevent icon from interfering with click cycling */
}

.upload-text {
    color: var(--terminal-text);
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
    pointer-events: none; /* Prevent text from interfering with click cycling */
}

.upload-note {
    color: var(--terminal-dim);
    font-size: 0.9em;
    text-align: center;
    pointer-events: none; /* Prevent text from interfering with click cycling */
    margin-bottom: 10px; /* Add space after the note text */
}

/* Photo Preview Container */
.photo-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Portrait layout - Always keep buttons below photo for consistency */
.photo-preview.portrait-layout {
    flex-direction: column; /* Always stack vertically */
    align-items: center;
    justify-content: center;
    gap: 0; /* Remove gap, use button margin instead */
}

.photo-preview.portrait-layout .photo-buttons-container {
    flex-direction: row; /* Keep buttons horizontal */
    margin: 20px 0 2px 0; /* Even tighter bottom spacing to bring much closer to nav buttons */
    margin-left: 0; /* No left margin needed */
    align-self: center;
}

/* Ensure desktop buttons maintain original size in portrait layout */
@media (min-width: 769px) {
    .photo-preview.portrait-layout .change-photo-btn,
    .photo-preview.portrait-layout .add-photo-btn {
        padding: 10px 20px;
        font-size: 0.9em;
        min-width: 140px;
    }
}

.photo-preview img {
    max-width: 100%;
    /* Dynamic height calculation based on viewport - even more space with reduced button spacing */
    max-height: min(480px, calc(68vh - 120px)); /* Bigger photos with reduced button spacing */
    width: auto !important; /* Force natural sizing for proper border fit - high priority */
    height: auto;
    border-radius: 8px;
    border: 2px solid var(--terminal-dim);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    object-fit: cover;
}

/* Photo Navigation Dots */
.photo-navigation-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 15px 0 5px 0; /* Reduced bottom margin to balance spacing */
    padding: 8px;
}

.photo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--terminal-dim);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.photo-dot.active {
    background: var(--terminal-bright);
    border-color: var(--terminal-bright);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

.photo-dot.has-photo {
    border-color: var(--terminal-text);
    background: var(--terminal-text);
}

.photo-dot.has-photo.active {
    background: var(--terminal-bright);
    border-color: var(--terminal-bright);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

.photo-dot:hover {
    border-color: var(--terminal-bright);
    transform: scale(1.2);
}

/* Photo Action Buttons Container */
.photo-buttons-container {
    display: flex;
    gap: 15px;
    margin: 20px 0 2px 0; /* Even tighter bottom spacing to bring much closer to nav buttons */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* Ensure buttons are always visible and positioned correctly */
    position: relative;
    z-index: 1;
}

/* Change Photo Button */
.change-photo-btn {
	background: var(--terminal-bg);
	border: 2px solid var(--terminal-text);
	color: var(--terminal-text);
	padding: 10px 20px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.9em;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 8px;
	min-width: 140px;
	letter-spacing: 0.5px;
	white-space: nowrap; /* Always keep text side-by-side since button is below photo */
}



/* Add Photo Button - Color Inverted */
.add-photo-btn {
	background: var(--terminal-text);
	border: 2px solid var(--terminal-text);
	color: var(--terminal-bg);
	padding: 10px 20px;
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.9em;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s ease;
	border-radius: 8px;
	min-width: 140px;
	letter-spacing: 0.5px;
}

/* Dark theme only: keep Add Photo green (unchanged by request) */
html.theme-dark .add-photo-btn:hover {
	background: var(--terminal-bg);
	color: var(--terminal-text);
	box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Ensure ADD PHOTO button is visible when needed */
.add-photo-btn {
    display: block !important; /* Override any other CSS */
}

.add-photo-btn.hidden {
    display: none !important;
}

/* Responsive Layout Classes */
.photo-preview.tall-image img {
    max-height: min(580px, calc(65vh - 100px)); /* Even bigger with reduced button spacing */
    max-width: 350px; /* Wider for better portrait photo display */
}

.photo-preview.mobile-overflow {
    max-height: 60vh;
    overflow: hidden;
}

.photo-preview.mobile-overflow img {
    max-height: min(350px, calc(45vh - 150px)); /* Dynamic sizing for mobile overflow */
    width: auto;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .photo-upload-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .photo-upload-area {
        min-height: 180px;
        padding: 15px 10px;
        margin-bottom: 25px; /* Consistent spacing with other views */
    }
    
    .upload-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .upload-text {
        font-size: 0.9em;
        margin-bottom: 8px;
    }
    
    .upload-note {
        font-size: 0.75em;
        margin-bottom: 8px; /* Consistent spacing on mobile */
    }
    
    .photo-preview img {
        /* Enhanced mobile photo sizing with smart viewport awareness */
        max-height: min(380px, calc(55vh - 120px)); /* Reduced from 58vh to account for all UI elements */
        max-width: 100%; /* Ensure photos don't exceed container width */
        width: auto !important; /* Let portrait photos size naturally for proper border fit */
        object-fit: contain; /* Maintain aspect ratio */
    }
    
    /* Smart sizing for smaller mobile screens - progressive constraints */
    @media (max-width: 768px) and (max-height: 700px) {
        .photo-preview img {
            max-height: min(300px, calc(50vh - 100px)) !important; /* More constrained for shorter screens */
        }
    }
    
    @media (max-width: 768px) and (max-height: 600px) {
        .photo-preview img {
            max-height: min(250px, calc(45vh - 90px)) !important; /* Even more constrained for small screens */
        }
    }
    
    @media (max-width: 768px) and (max-height: 500px) {
        .photo-preview img {
            max-height: min(200px, calc(40vh - 80px)) !important; /* Tight constraints for very small screens */
        }
    }
    
    /* Special handling for mobile device orientations */
    @media (max-width: 768px) and (orientation: portrait) {
        .photo-preview img {
            /* Better sizing for mobile portrait mode with smart constraints */
            max-height: min(300px, calc(48vh - 100px)) !important; /* More conservative for portrait orientation */
            max-width: 100% !important;
            width: auto !important; /* Let photos size naturally for proper border fit */
        }
        
        /* Extra constraints for tall portrait photos in mobile portrait mode */
        .photo-preview.portrait-layout img {
            max-height: min(280px, calc(45vh - 90px)) !important; /* Even more constrained for tall photos */
        }
        
        /* Force full width only for actual landscape photos in mobile portrait mode */
        .photo-preview.mobile-landscape img {
            width: 100% !important;
        }
    }
    
    /* Extra small portrait screens need very tight constraints */
    @media (max-width: 480px) and (orientation: portrait) and (max-height: 700px) {
        .photo-preview img {
            max-height: min(220px, calc(40vh - 80px)) !important;
        }
        
        .photo-preview.portrait-layout img {
            max-height: min(200px, calc(38vh - 75px)) !important; /* Very tight for tall photos on small screens */
        }
    }
    
    @media (max-width: 768px) and (orientation: landscape) {
        .photo-preview img {
            /* Constrained for mobile landscape orientation */
            max-height: min(240px, calc(40vh - 80px)) !important;
            max-width: 100% !important;
            width: auto !important; /* Let photos size naturally for proper border fit */
        }
        
        /* Force full width only for landscape photos in mobile landscape mode */
        .photo-preview.mobile-landscape img {
            width: 100% !important;
        }
    }
    
    /* Mobile landscape photo class for JavaScript-applied styling - base sizing only */
    .photo-preview.mobile-landscape img {
        max-height: min(280px, calc(45vh - 80px)) !important;
        max-width: 100% !important;
        object-fit: contain; /* Ensure the entire photo is visible */
        /* Removed width: 100% - let photos size naturally unless specifically overridden */
    }
    
    /* Portrait layout adjustments for mobile - keep buttons below photo */
    .photo-preview.portrait-layout {
        flex-direction: column !important; /* Always stack vertically on mobile too */
        align-items: center !important;
        justify-content: center !important;
        gap: 0; /* Remove gap, use button margin instead */
    }
    
    .photo-preview.portrait-layout .photo-buttons-container {
        flex-direction: row !important; /* Keep buttons horizontal on mobile */
        margin: 18px 0 2px 0 !important; /* Even tighter bottom spacing for mobile */
        margin-left: 0; /* No left margin needed */
        align-self: center !important;
    }
    
    .photo-preview.portrait-layout img {
        max-height: min(350px, calc(55vh - 80px)); /* Much larger now that buttons are below */
        max-width: 100%; /* Full width available since buttons are below */
        width: auto !important; /* Let photos size naturally for proper border fit */
        flex-shrink: 0;
    }
    
    /* Force full width only for landscape photos in portrait layout */
    .photo-preview.portrait-layout.mobile-landscape img {
        width: 100% !important;
    }
    
    .photo-navigation-dots {
        gap: 10px;
        margin: 12px 0 4px 0; /* Reduced bottom margin for mobile */
    }
    
    .photo-dot {
        width: 10px;
        height: 10px;
    }
    
    .photo-buttons-container {
        gap: 10px;
        margin: 18px 0 2px 0; /* Even tighter bottom spacing to bring much closer to nav buttons */
    }
    
    .change-photo-btn,
    .add-photo-btn {
        padding: 8px 16px;
        font-size: 0.8em;
        min-width: 120px;
    }
    
    /* Mobile view - buttons always side-by-side since they're below photos */
    .change-photo-btn {
        white-space: nowrap; /* Always side-by-side text */
    }
    
    /* Mobile overflow layout adjustments */
    .photo-preview.mobile-overflow {
        max-height: 45vh;
    }
    
    .photo-preview.mobile-overflow img {
        max-height: min(260px, calc(35vh - 60px)); /* Better mobile overflow sizing with reduced button spacing */
        max-width: 100%; /* Ensure width constraint */
        width: auto !important; /* Let photos size naturally for proper border fit */
        object-fit: contain; /* Maintain aspect ratio while fitting in container */
    }
    
    /* Force full width only for landscape photos in mobile overflow */
    .photo-preview.mobile-overflow.mobile-landscape img {
        width: 100% !important;
    }
}

/* PWA Mode Adjustments */
@media (display-mode: standalone) {
    .photo-upload-container {
        /* Ensure proper spacing in PWA mode */
        margin-bottom: 15px;
    }
    
    .photo-upload-area {
        /* Smaller upload area in PWA mode */
        min-height: 200px;
        padding: 20px 15px;
        margin-bottom: 25px; /* Consistent spacing with other views */
    }
    
    .photo-navigation-dots {
        /* Prevent dots from affecting PWA viewport */
        position: relative;
        z-index: 1;
        margin: 10px 0 4px 0; /* Reduced bottom margin for PWA */
    }
    
    .photo-buttons-container {
        margin: 20px 0 2px 0; /* Even tighter bottom spacing to bring much closer to nav buttons */
    }
    
    .photo-preview img {
        /* PWA dynamic sizing with smart viewport awareness */
        max-height: min(380px, calc(58vh - 120px)); /* More conservative for PWA with UI elements */
        width: auto !important; /* Let photos size naturally for proper border fit */
    }
    
    /* PWA portrait layout - smart sizing for tall photos */
    .photo-preview.portrait-layout img {
        max-height: min(340px, calc(55vh - 100px)); /* More constrained for tall photos in PWA */
        max-width: 100%; /* Full width available */
        width: auto !important; /* Let photos size naturally for proper border fit */
    }
    
    /* PWA responsive constraints for smaller screens */
    @media (display-mode: standalone) and (max-height: 700px) {
        .photo-preview img {
            max-height: min(300px, calc(50vh - 100px)) !important;
        }
        
        .photo-preview.portrait-layout img {
            max-height: min(280px, calc(48vh - 90px)) !important;
        }
    }
    
    @media (display-mode: standalone) and (max-height: 600px) {
        .photo-preview img {
            max-height: min(250px, calc(45vh - 90px)) !important;
        }
        
        .photo-preview.portrait-layout img {
            max-height: min(230px, calc(42vh - 80px)) !important;
        }
    }
    
    /* Force full width only for landscape photos in PWA */
    .photo-preview.mobile-landscape img {
        width: 100% !important;
    }
    
    .photo-preview.portrait-layout.mobile-landscape img {
        width: 100% !important;
    }
}

/* iOS PWA specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (display-mode: standalone) {
        .photo-upload-area {
            /* Ensure file input works properly in iOS PWA */
            -webkit-touch-callout: default;
            touch-action: manipulation;
            min-height: 160px;
            padding: 15px 10px;
            margin-bottom: 25px; /* Consistent spacing with other views */
        }
        
        .photo-navigation-dots {
            /* Prevent viewport issues with dots on iOS PWA */
            padding: 6px;
            margin: 8px 0 3px 0; /* Reduced bottom margin for iOS PWA */
        }
        
        .upload-icon {
            width: 35px;
            height: 35px;
            margin-bottom: 8px;
        }
        
        .upload-note {
            margin-bottom: 6px; /* Tighter spacing for iOS */
        }
        
        .photo-buttons-container {
            margin: 18px 0 8px 0; /* Reduced bottom spacing to bring closer to nav buttons */
        }
        
        .photo-preview img {
            /* iOS PWA dynamic sizing with smart viewport awareness */
            max-height: min(300px, calc(48vh - 90px)); /* More conservative for iOS PWA */
            width: auto !important; /* Let photos size naturally for proper border fit */
        }
        
        /* iOS PWA portrait layout - smart sizing for tall photos */
        .photo-preview.portrait-layout img {
            max-height: min(280px, calc(45vh - 80px)); /* More constrained for tall photos in iOS PWA */
            max-width: 100%; /* Full width available */
            width: auto !important; /* Let photos size naturally for proper border fit */
        }
        
        /* iOS PWA extra constraints for smaller iPhone screens */
        @supports (-webkit-touch-callout: none) {
            @media (display-mode: standalone) and (max-height: 700px) {
                .photo-preview img {
                    max-height: min(250px, calc(42vh - 80px)) !important;
                }
                
                .photo-preview.portrait-layout img {
                    max-height: min(230px, calc(40vh - 70px)) !important;
                }
            }
            
            @media (display-mode: standalone) and (max-height: 600px) {
                .photo-preview img {
                    max-height: min(200px, calc(38vh - 70px)) !important;
                }
                
                .photo-preview.portrait-layout img {
                    max-height: min(180px, calc(35vh - 60px)) !important;
                }
            }
        }
        
        /* Force full width only for landscape photos in iOS PWA */
        .photo-preview.mobile-landscape img {
            width: 100% !important;
        }
        
        .photo-preview.portrait-layout.mobile-landscape img {
            width: 100% !important;
        }
    }
}

/* High DPI display adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .photo-dot {
        /* Crisp dots on retina displays */
        border-width: 1px;
    }
    
    .upload-icon {
        /* Better icon rendering on high DPI */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Enhanced viewport-based sizing for all screen sizes */
@media (max-height: 600px) {
    /* Very short screens - but bigger photos with reduced button spacing */
    .photo-preview img {
        max-height: min(300px, calc(45vh - 80px)) !important;
    }
    
    .photo-upload-area {
        min-height: 140px;
        padding: 12px 10px;
    }
    
    .photo-buttons-container {
        margin: 15px 0 2px 0; /* Even tighter bottom spacing to bring much closer to nav buttons */
    }
}

@media (max-height: 500px) {
    /* Extra short screens - minimal button spacing for maximum photo size */
    .photo-preview img {
        max-height: min(200px, calc(35vh - 60px)) !important; /* More aggressive sizing for very short screens */
    }
    
    /* Emergency constraints for tall portrait photos on very short screens */
    .photo-preview.portrait-layout img {
        max-height: min(180px, calc(32vh - 55px)) !important;
    }
    
    .photo-upload-area {
        min-height: 120px;
        padding: 10px 8px;
    }
    
    .upload-icon {
        width: 30px;
        height: 30px;
        margin-bottom: 6px;
    }
    
    .photo-buttons-container {
        margin: 12px 0 1px 0; /* Ultra-tight bottom spacing to bring much closer to nav buttons */
    }
}

/* Emergency fallback for extremely constrained screens */
@media (max-height: 400px) {
    .photo-preview img {
        max-height: min(150px, calc(30vh - 50px)) !important; /* Emergency sizing */
    }
    
    .photo-preview.portrait-layout img {
        max-height: min(130px, calc(28vh - 45px)) !important; /* Very tight emergency constraints */
    }
    
    .photo-buttons-container {
        margin: 8px 0 1px 0; /* Minimal spacing for emergency screens */
    }
}

/* ========================================
   LIGHT THEME LOADING STATES
   ======================================== */

/* Light theme loading states and spinners */
html.theme-light .loading-state,
html.theme-light .empty-state,
html.theme-light .error-state {
    color: var(--theme-text) !important;
}

html.theme-light .loading-spinner {
    border: 2px solid var(--theme-text) !important;
    border-top: 2px solid transparent !important;
}

html.theme-light .loading-text,
html.theme-light .empty-state-text,
html.theme-light .error-state-text {
    color: var(--theme-text) !important;
}

html.theme-light .empty-state-button,
html.theme-light .error-state-button {
    background-color: var(--theme-text) !important;
    border: 2px solid var(--theme-text) !important;
    color: var(--theme-bg) !important;
}

html.theme-light .empty-state-button:hover,
html.theme-light .error-state-button:hover {
    background-color: var(--theme-text) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 15px var(--theme-text), 0 0 25px rgba(0, 0, 0, 0.6) !important;
}

html.theme-light .empty-state-button:active,
html.theme-light .error-state-button:active {
    background-color: var(--theme-text) !important;
    color: var(--theme-bg) !important;
    box-shadow: 0 0 20px var(--theme-text), 0 0 35px rgba(0, 0, 0, 0.8) !important;
    transform: scale(0.98) !important;
}

/* Light theme terminal button loading states */
html.theme-light .terminal-button.loading::after {
    background: var(--theme-text-dim) !important;
}

html.theme-light .terminal-button.loading::before {
    background: var(--theme-text) !important;
    box-shadow: 0 0 4px var(--theme-text) !important;
}

/* Light theme processing section loading text */
html.theme-light .processing-section .loading-text {
    background: linear-gradient(-45deg, #f0f0f0, #e0e0e0, #f0f0f0) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html.theme-light .processing-section .loading-text::before {
    background: linear-gradient(
        90deg,
        #007acc 0%,
        #40e0d0 25%, 
        #1e90ff 50%,
        #00bcd4 75%,
        #4fc3f7 100%
    ) !important;
    box-shadow: 
        0 0 10px rgba(64, 224, 208, 0.5),
        0 0 20px rgba(30, 144, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

html.theme-light .processing-section .loading-text::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    ) !important;
}

/* Light theme general loading text */
html.theme-light .loading-text {
    color: var(--theme-text) !important;
}

/* Light theme loading indicator */
html.theme-light .loading-indicator {
    color: var(--theme-text) !important;
}

/* Light theme loading state opacity */
html.theme-light .loading-state {
    opacity: 0.8 !important;
}

/* Light theme user-profile.html specific loading elements */
html.theme-light #loadingText {
    color: var(--theme-text) !important;
    text-shadow: none !important;
    animation: none !important;
}

html.theme-light .welcome-message {
    color: var(--theme-text) !important;
    text-shadow: none !important;
    animation: none !important;
}

/* Force override for desktop specifically where shadow issue occurs */
@media (min-width: 769px) {
    html.theme-light #loadingText,
    html.theme-light .welcome-message,
    html.theme-light #user-dashboard .welcome-message,
    html.theme-light #user-dashboard #loadingText {
        text-shadow: none !important;
        animation: none !important;
        color: var(--theme-text) !important;
    }
}

/* Prevent flash of green/yellow colors during page transitions - DESKTOP ONLY */
@media (min-width: 769px) {
    html.theme-light:not(.page-loaded) .dashboard-button {
        animation: none !important;
        background: var(--theme-button-bg) !important;
        border-color: var(--theme-button-border) !important;
        color: var(--theme-button-text) !important;
        transition: none !important;
        /* Override any yellow/gold styling immediately */
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    html.theme-light:not(.page-loaded) .dashboard-button:hover {
        animation: none !important;
        background: var(--theme-button-hover-bg) !important;
        border-color: var(--theme-button-hover-bg) !important;
        color: var(--theme-button-hover-text) !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* Specific override for elements that might flash green/yellow - DESKTOP ONLY */
@media (min-width: 769px) {
    html.theme-light:not(.page-loaded) .dashboard-button,
    html.theme-light:not(.page-loaded) .terminal-button {
        transition: none !important;
        animation: none !important;
    }
}

/* Re-enable dashboard button animations after page load - DESKTOP ONLY */
@media (min-width: 769px) {
    html.theme-light.page-loaded .dashboard-button {
        animation: borderGlowLight 4s ease-in-out infinite !important;
        transition: all 0.3s ease !important;
    }

    html.theme-light.page-loaded .dashboard-button:hover {
        animation: borderGlowFastLight 2s ease-in-out infinite !important;
    }
}

/* Load Manager Indicator Styles */
#loadManager-indicator {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(0, 0, 0, 0.95) !important;
    color: #00FF00 !important;
    padding: 25px 30px !important;
    border-radius: 12px !important;
    z-index: 10000 !important;
    font-family: 'JetBrains Mono', 'Courier New', Courier, monospace !important;
    text-align: center !important;
    border: 2px solid #00FF00 !important;
    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.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
}

#loadManager-indicator > div:first-child {
    font-size: 1.1em !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.5) !important;
}

#loadManager-indicator > div:last-child {
    font-size: 0.85em !important;
    opacity: 0.8 !important;
    font-weight: 400 !important;
}

/* Pulsing animation for the loading indicator */
#loadManager-indicator {
    animation: loadManagerPulse 2s ease-in-out infinite !important;
}

@keyframes loadManagerPulse {
    0%, 100% {
        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.1);
        border-color: #00FF00;
    }
    50% {
        box-shadow: 
            0 0 30px rgba(0, 255, 0, 0.5),
            0 0 60px rgba(0, 255, 0, 0.2),
            inset 0 1px 0 rgba(0, 255, 0, 0.2);
        border-color: #00ff88;
    }
}

/* Light theme support for load manager indicator */
html.theme-light #loadManager-indicator {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #333333 !important;
    border-color: #333333 !important;
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(0, 0, 0, 0.1) !important;
}

html.theme-light #loadManager-indicator > div:first-child {
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.3) !important;
}

@keyframes loadManagerPulseLight {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(0, 0, 0, 0.3),
            0 0 40px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(0, 0, 0, 0.1);
        border-color: #333333;
    }
    50% {
        box-shadow: 
            0 0 30px rgba(31, 117, 254, 0.5),
            0 0 60px rgba(31, 117, 254, 0.2),
            inset 0 1px 0 rgba(31, 117, 254, 0.2);
        border-color: #1F75FE;
    }
}

html.theme-light #loadManager-indicator {
    animation: loadManagerPulseLight 2s ease-in-out infinite !important;
}

/* Mobile responsiveness for load manager indicator */
@media (max-width: 768px) {
    #loadManager-indicator {
        padding: 20px 25px !important;
        border-radius: 10px !important;
    }
    
    #loadManager-indicator > div:first-child {
        font-size: 1em !important;
        margin-bottom: 10px !important;
    }
    
    #loadManager-indicator > div:last-child {
        font-size: 0.8em !important;
    }
}

@media (max-width: 480px) {
    #loadManager-indicator {
        padding: 18px 22px !important;
        max-width: 85vw !important;
    }
    
    #loadManager-indicator > div:first-child {
        font-size: 0.95em !important;
    }
    
    #loadManager-indicator > div:last-child {
        font-size: 0.75em !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #loadManager-indicator {
        border-width: 3px !important;
        background: rgba(0, 0, 0, 1) !important;
    }
    
    html.theme-light #loadManager-indicator {
        background: rgba(255, 255, 255, 1) !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #loadManager-indicator {
        animation: none !important;
    }
    
    html.theme-light #loadManager-indicator {
        animation: none !important;
    }
}

/* OVERRIDE: Light theme dashboard buttons - change black to blue for all pages */
html.theme-light .dashboard-button,
body.theme-light .dashboard-button {
    background: linear-gradient(145deg, #1F75FE, #1A66E6) !important;
    border: 2px solid #000000 !important;
    color: #ffffff !important;
    box-shadow: 
        0 4px 8px rgba(31, 117, 254, 0.3),
        0 2px 4px rgba(31, 117, 254, 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;
}

/* Light theme button hover states */
html.theme-light .dashboard-button:hover,
html.theme-light .dashboard-button:focus,
body.theme-light .dashboard-button:hover,
body.theme-light .dashboard-button:focus {
    background: linear-gradient(145deg, #2A80FF, #1F75FE) !important;
    color: #ffffff !important;
}

/* Light theme button active states - BLACK when clicked (like mobile effect) */
html.theme-light .dashboard-button:active,
html.theme-light .dashboard-button:active:focus,
body.theme-light .dashboard-button:active,
body.theme-light .dashboard-button:active:focus {
    background: linear-gradient(145deg, #000000, #1a1a1a) !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.15),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05),
        inset 1px 0 0 rgba(0, 0, 0, 0.05),
        inset -1px 0 0 rgba(255, 255, 255, 0.03) !important;
    transform: translateY(1px) scale(0.98) !important;
}

