/* Custom CSS for Request Access Form Page */

/* Make main content area scrollable — applies to all screens */
.terminal-main {
    overflow-y: auto !important;
    pointer-events: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Vertically center the progress section globally on all screen sizes */
.progress-section {
    flex: none !important;
    height: auto !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
    transform: translateY(65px); /* balanced offset for desktop screens */
}

/* Desktop success screen vertical offset (doesn't affect input screen) */
.terminal-main.success-active .progress-section {
    transform: translateY(25px) !important;
}

/* Parent frame wrapping top HUD elements */
.hud-frame {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(clamp(36px, 17svh, 140px) + 20px) !important;
    padding-bottom: 5px !important;
    z-index: 9 !important; /* behind side rails (z-index 10) but above scroll content (z-index 3) */
    pointer-events: none !important;
    box-sizing: content-box !important;
    background-color: #000000 !important; /* solid black mask to act as the hard cut-off */
}
.hud-frame .info-panel {
    pointer-events: auto !important;
}

/* Mobile and Tablet: vertically center with larger offsets to clear top HUD rails */
@media (max-width: 1024px) {
    :root {
        /* Ends at the bottom padding of the .hud-frame container (height + padding) */
        --hud-cut-offset: calc(clamp(36px, 17svh, 140px) + 25px);
    }
    .hud-frame .info-panel {
        gap: 6px !important;
    }
    .terminal-main {
        top: 0 !important;
        height: 100% !important;
        padding-top: var(--hud-cut-offset) !important;
        padding-bottom: 30px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    .terminal-main::before,
    .terminal-main::after {
        content: "" !important;
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }
    .terminal-main::before {
        flex-grow: 1.3 !important; /* pushes group down slightly for balanced centering */
    }
    .progress-section {
        flex: none !important;
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
    }
    /* Shift success screen up a bit on mobile/tablet (doesn't affect input screens) */
    .terminal-main.success-active .progress-section {
        transform: translateY(-20px) !important;
    }
    
    /* Centered SEE WORKS button alignment on mobile/tablet */
    .see-works-link {
        display: flex !important;
        position: relative !important;
        justify-content: center !important;
    }
    .see-works-label {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    .see-works-arrow {
        position: absolute !important;
        top: 50% !important;
        left: calc(50% + 38px) !important;
        transform: translateY(-50%) !important;
    }
    .see-works-link:hover .see-works-arrow {
        transform: translateY(-50%) translateX(4px) !important;
    }
}

/* Custom scrollbar for terminal-main to match dark hacker theme */
.terminal-main::-webkit-scrollbar {
    width: 6px;
}
.terminal-main::-webkit-scrollbar-track {
    background: transparent;
}
.terminal-main::-webkit-scrollbar-thumb {
    background: rgba(122, 44, 239, 0.3);
    border-radius: 3px;
    border: 1px solid rgba(122, 44, 239, 0.1);
}
.terminal-main::-webkit-scrollbar-thumb:hover {
    background: rgba(122, 44, 239, 0.6);
}

/* Form section layout */
.form-section {
    gap: clamp(8px, 1.8svh, 16px) !important;
    margin-top: 15px !important;
}

/* Dropdown Select Styles */
.select-group {
    position: relative;
    width: 100%;
}
.select-field {
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #ffffff;
    width: 100%;
    height: 100%;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    font-size: 11px;
    padding: 0 16% 0 9% !important;
    text-transform: uppercase;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.select-field:focus,
.select-field:active {
    opacity: 1 !important;
}
/* Style the select options for dark theme consistency */
.select-field option {
    background-color: #07020d !important;
    color: #ffffff !important;
    font-family: 'Chakra Petch', sans-serif !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
}
.select-field option:disabled {
    color: rgba(255, 255, 255, 0.3) !important;
}
/* custom arrow SVG indicator */
.select-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 9%;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.select-group:hover .select-arrow,
.select-group:focus-within .select-arrow {
    opacity: 0.9;
    transform: translateY(-50%) translateY(1px);
}

/* Custom Textarea & Multi-Input Group Frame Styles */
.inputs-frame {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    aspect-ratio: 450 / 142 !important; /* defines total frame height for both slides */
}
@media (max-width: 600px) {
    .inputs-frame {
        aspect-ratio: 450 / 172 !important;
    }
}
.inputs-frame > .input-group {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    /* Keep the normal aspect-ratio so each input has the same height as siblings */
}
.inputs-frame > .input-group .union-bg {
    object-fit: fill !important;
}
.textarea-group {
    position: relative;
    width: 100%;
    height: 100% !important;
    aspect-ratio: auto !important;
}
.textarea-group .union-bg {
    content: url("assets/union-textarea.svg") !important;
    object-fit: fill !important;
}
.textarea-group.rect-input .union-bg {
    content: url("assets/union-textarea-rect.svg") !important;
    object-fit: fill !important;
}
@media (max-width: 600px) {
    .textarea-group .union-bg {
        content: url("assets/union-textarea-mobile.svg") !important;
        object-fit: fill !important;
    }
}
.textarea-field {
    resize: none;
    position: absolute;
    top: 28px !important; /* shifted down to completely box scrollable text away from active label */
    bottom: 36px !important; /* leaves 36px of space at the bottom for the character count */
    left: 9% !important;
    right: 9% !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important; /* clear padding since position bounds handle spacing */
    line-height: 1.5 !important;
    text-transform: none !important; /* permit standard text casing */
}
.char-count {
    position: absolute;
    bottom: 12px;
    right: 9%;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    font-size: clamp(8px, 1.2vw, 10px);
    color: #ffffff;
    opacity: 0.25;
    pointer-events: none;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease, color 0.2s ease;
}
.textarea-group:focus-within .char-count {
    opacity: 0.55;
}
.textarea-field::placeholder {
    text-transform: uppercase !important; /* placeholder remains sci-fi uppercase */
}
.textarea-field::-webkit-scrollbar {
    width: 4px;
}
.textarea-field::-webkit-scrollbar-track {
    background: transparent;
}
.textarea-field::-webkit-scrollbar-thumb {
    background: rgba(122, 44, 239, 0.3);
    border-radius: 2px;
}
.textarea-field::-webkit-scrollbar-thumb:hover {
    background: rgba(122, 44, 239, 0.6);
}

/* Info Terms below submit button */
.form-instructions {
    margin-top: 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 10px;
    line-height: 1.3;
    letter-spacing: 0.03em;
    color: #ffffff;
    opacity: 0.45;
}

/* Lore Block */
.lore-block {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 10px;
    letter-spacing: 0.05em;
    opacity: 0.7;
    background: rgba(122, 44, 239, 0.05);
    border: 1px dashed rgba(122, 44, 239, 0.2);
    padding: 6px 12px;
    border-radius: 2px;
}
.lore-label {
    color: rgba(255, 255, 255, 0.4);
}
.status-badge {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.status-badge.pending {
    color: #CAA9FB;
    text-shadow: 0 0 8px rgba(202, 169, 251, 0.6);
    animation: textPulse 2s infinite ease-in-out;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; filter: brightness(1.2); }
}

/* Success State Screen */
.success-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 0 0 0;
}
.success-badge-container {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-badge {
    width: 48px;
    height: 48px;
}
.success-title {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    color: #ffffff;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.success-message {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.success-message .success-sub-2 {
    max-width: 75% !important;
}
.success-message p {
    margin: 0;
}
.success-message .highlight-text {
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-top: 8px;
    text-transform: uppercase;
}

@keyframes badgeScaleIn {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(202, 169, 251, 0.8)); }
}

/* See Works Link - Desktop offset override for See Works arrow due to shorter text "SEE WORKS" */
.see-works-link .request-arrow {
    left: calc(50% + 42px) !important;
}

/* Invalid styling for input borders */
.input-group.is-invalid .union-bg {
    content: url("data:image/svg+xml;utf8,<svg width='450' height='61' viewBox='0 0 450 61' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M419.048 0.5L433.902 14.8594L449.25 30.7021V60.5H0.5V30.7021L15.8477 14.8594L30.7021 0.5H419.048Z' stroke='rgba(255,90,90,0.85)'/></svg>") !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0 0 6px rgba(255, 90, 90, 0.55)) !important;
}
@media (max-width: 600px) {
    .input-group.is-invalid .union-bg {
        content: url("data:image/svg+xml;utf8,<svg width='450' height='76' viewBox='0 0 450 76' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M419.048 0.5L433.902 14.8594L449.25 30.7021V75.5H0.5V30.7021L15.8477 14.8594L30.7021 0.5H419.048Z' stroke='rgba(255,90,90,0.85)'/></svg>") !important;
    }
}
.textarea-group.is-invalid .union-bg {
    content: url("data:image/svg+xml;utf8,<svg width='450' height='120' viewBox='0 0 450 120' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M419.048 0.5L433.902 14.8594L449.25 30.7021V119.5H0.5V30.7021L15.8477 14.8594L30.7021 0.5H419.048Z' stroke='rgba(255,90,90,0.85)' stroke-width='1'/></svg>") !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0 0 6px rgba(255, 90, 90, 0.55)) !important;
}
@media (max-width: 600px) {
    .textarea-group.is-invalid .union-bg {
        content: url("data:image/svg+xml;utf8,<svg width='450' height='150' viewBox='0 0 450 150' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M419.048 0.5L433.902 14.8594L449.25 30.7021V149.5H0.5V30.7021L15.8477 14.8594L30.7021 0.5H419.048Z' stroke='rgba(255,90,90,0.85)' stroke-width='1'/></svg>") !important;
    }
}

/* Adjustments for progress-section layout to prevent overflow overlap */
.progress-section {
    justify-content: flex-start !important;
    height: auto !important;
    min-height: auto !important;
}

/* Mobile swaps for straight rectangle inputs */
@media (max-width: 600px) {
    .rect-input .union-bg {
        content: url("assets/union-rect-mobile.svg") !important;
    }
    .textarea-group.rect-input .union-bg {
        content: url("assets/union-textarea-rect-mobile.svg") !important;
    }
}

/* Invalid states for straight rectangle inputs */
.rect-input.is-invalid .union-bg {
    content: url("data:image/svg+xml;utf8,<svg width='450' height='61' viewBox='0 0 450 61' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='449' height='60' stroke='rgba(255,90,90,0.85)' stroke-width='1'/></svg>") !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0 0 6px rgba(255, 90, 90, 0.55)) !important;
}
@media (max-width: 600px) {
    .rect-input.is-invalid .union-bg {
        content: url("data:image/svg+xml;utf8,<svg width='450' height='76' viewBox='0 0 450 76' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='449' height='75' stroke='rgba(255,90,90,0.85)' stroke-width='1'/></svg>") !important;
    }
}

.textarea-group.rect-input.is-invalid .union-bg {
    content: url("data:image/svg+xml;utf8,<svg width='450' height='120' viewBox='0 0 450 120' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='449' height='119' stroke='rgba(255,90,90,0.85)' stroke-width='1'/></svg>") !important;
    opacity: 0.95 !important;
    filter: drop-shadow(0 0 6px rgba(255, 90, 90, 0.55)) !important;
}
@media (max-width: 600px) {
    .textarea-group.rect-input.is-invalid .union-bg {
        content: url("data:image/svg+xml;utf8,<svg width='450' height='150' viewBox='0 0 450 150' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='449' height='149' stroke='rgba(255,90,90,0.85)' stroke-width='1'/></svg>") !important;
    }
}

/* Add line-height spacing to subtitle */
.auth-subtitle {
    line-height: 1.5 !important;
}

/* Info panels floating z-index override */
.info-panel {
    z-index: 99 !important;
}

/* Back Button HUD styling */
.back-btn {
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}
.back-arrow {
    transform: scaleX(-1);
    filter: brightness(0) invert(1); /* converts the purple SVG arrow to white to match the text color */
    width: 5px;
    height: 10px;
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.back-btn .panel-label {
    transition: color 0.3s ease, opacity 0.3s ease;
}
.back-btn:hover .back-arrow {
    opacity: 1 !important;
    transform: scaleX(-1) translateX(6px) !important;
}
.back-btn:hover .panel-label {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Reduce bottom margin of header section to pull decorative bars closer to subtitle */
.auth-section {
    margin-bottom: 0px !important;
}

/* Collapse the auto gap that progress-section adds between auth and form sections */
.progress-section {
    gap: 0 !important;
}

/* Remove the form-section's own top margin and gap so margins control all spacing */
.form-section {
    margin-top: 0 !important;
    gap: 0 !important;
}

/* Progress Bar V2 styling above the form frame */
.progress-section {
    gap: 0 !important;
}
.progress-bar-v2 {
    width: 85%;
    display: flex;
    gap: 12px;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}
.progress-step-v2 {
    height: 3px; /* increased weight to 3px */
    border-radius: 1.5px; /* smooth rounded edges */
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.progress-step-v2--main {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.75); /* slightly darker white by default */
}
.progress-step-v2--main:hover {
    background-color: #ffffff; /* whiter on hover */
}
.progress-step-v2--sub {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.35); /* inactive */
}
.progress-step-v2--sub:hover {
    background-color: rgba(255, 255, 255, 0.55); /* slightly whiter on hover when inactive */
}

/* ── Floating Labels ── */

/* Resting: sits centered vertically inside the input rectangle */
.floating-label {
    position: absolute;
    left: 9%;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: top 0.2s ease, font-size 0.2s ease, color 0.2s ease, transform 0.2s ease, letter-spacing 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 82%;
}

/* Textarea label anchors to top, not middle */
.floating-label--textarea {
    top: 14px;
    transform: none;
}

/* Floated state — on focus OR when the input has a value */
input.input-field:focus ~ .floating-label,
input.input-field:not(:placeholder-shown) ~ .floating-label {
    top: clamp(5px, 1.4vw, 9px) !important; /* responsive top positioning */
    transform: none !important;
    font-size: clamp(6px, 1.4vw, 7.5px); /* responsive font size scale */
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.85);
}

/* Textarea floated state */
.textarea-field:focus ~ .floating-label--textarea,
.textarea-field:not(:placeholder-shown) ~ .floating-label--textarea {
    top: 14px !important; /* shifted down for textarea */
    transform: none !important;
    font-size: clamp(6px, 1.4vw, 7.5px);
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.85);
}

/* Shift typed text down so it doesn't clash with the floated label */
input.input-field:focus,
input.input-field:not(:placeholder-shown) {
    padding-top: clamp(12px, 3.4vw, 16px) !important; /* scales text baseline below active label */
    padding-bottom: clamp(4px, 1.2vw, 8px) !important; /* scales bottom text spacing */
}

/* Textarea typed text shift — within its absolute bounding box */
.textarea-field:focus,
.textarea-field:not(:placeholder-shown) {
    padding-top: 0 !important;
}

/* ── Multi-Step Sliding Form Layout ── */
.form-slides-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-slide {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px; /* reduced by 30% (from 20px) */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active slide stretches container height naturally */
.form-slide.active-slide {
    position: relative;
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Inactive slide floats out of document flow */
.form-slide:not(.active-slide) {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

/* Slide 1 starts on left when inactive */
#slide-1:not(.active-slide) {
    transform: translateX(-100%);
}

/* Slide 2 starts on right when inactive */
#slide-2:not(.active-slide) {
    transform: translateX(100%);
}

/* Progress bar step active indicator */
.progress-step-v2--sub.is-active {
    background-color: rgba(255, 255, 255, 0.75) !important;
}
.progress-step-v2--sub.is-active:hover {
    background-color: #ffffff !important;
}

/* Ensure consistent vertical spacing matching input group gaps */
.btn-group {
    margin-top: 14px !important; /* reduced by 30% (from 20px) */
}
.form-instructions {
    margin-top: 14px !important; /* reduced by 30% (from 20px) */
}

.auth-subtitle {
    width: 85% !important;
    max-width: 85% !important;
    margin: 0 auto !important;
    line-height: 1.5 !important;
}

/* Vertical centering for success screen on desktop only */
@media (min-width: 1025px) {
    .terminal-main.success-active {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        justify-content: center !important;
    }
    .terminal-main.success-active .progress-section {
        flex: none !important;
        height: auto !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* Desktop short heights (1025px+ width, max 600px height): prevent title from being cut by HUD hard-cut */
@media (min-width: 1025px) and (max-height: 600px) {
    .terminal-main {
        /* Allow scroll if content is taller than available space */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        /* HUD panels sit at clamp(20px,13svh,120px) top + ~20px panel height + 2px clearance */
        padding-top: calc(clamp(20px, 13svh, 120px) + 22px) !important;
        padding-bottom: clamp(40px, 8svh, 100px) !important;
    }
    /* Reduce the fixed downward push so the group isn't forced up into the HUD cut */
    .progress-section {
        transform: translateY(30px) !important;
    }
    .terminal-main.success-active {
        padding-top: calc(clamp(20px, 13svh, 120px) + 22px) !important;
        padding-bottom: clamp(40px, 8svh, 100px) !important;
        justify-content: flex-start !important;
    }
    .terminal-main.success-active .progress-section {
        transform: none !important;
        margin-top: auto !important;
        margin-bottom: auto !important;
    }
}

/* ── Step 1 Button: white accent mode (COMMENTED OUT) ──
.btn-group.step-1-mode .union-bg {
    content: url("data:image/svg+xml;utf8,<svg width='450' height='61' viewBox='0 0 450 61' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M419.048 60.5L433.902 46.1406L449.25 30.2979V0.5H0.5V30.2979L15.8477 46.1406L30.7021 60.5H419.048Z' fill='none' stroke='rgba(255,255,255,0.75)' stroke-width='1'/></svg>");
}
@media (max-width: 600px) {
    .btn-group.step-1-mode .union-bg {
        content: url("data:image/svg+xml;utf8,<svg width='450' height='76' viewBox='0 0 450 76' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M419.048 75.5L433.902 61.1406L449.25 45.2979V0.5H0.5V45.2979L15.8477 61.1406L30.7021 75.5H419.048Z' fill='none' stroke='rgba(255,255,255,0.75)' stroke-width='1'/></svg>") !important;
    }
}
.btn-group.step-1-mode .shiny-cta-container {
    --shiny-cta-bg: rgba(255, 255, 255, 0.08);
    --shiny-cta-bg-subtle: transparent;
    --shiny-cta-highlight: rgba(255, 255, 255, 0.9);
    --shiny-cta-highlight-subtle: rgba(255, 255, 255, 0.6);
    --shiny-cta-fg: #ffffff;
    --gradient-shine: rgba(255, 255, 255, 0.45);
    background: linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)) padding-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.btn-group.step-1-mode .shiny-cta-container,
.btn-group.step-1-mode .shiny-cta-container::before,
.btn-group.step-1-mode .shiny-cta-container::after,
.btn-group.step-1-mode .shiny-cta-glow {
    animation: none !important;
}
.btn-group.step-1-mode .shiny-cta-container::after {
    opacity: 0 !important;
}
.btn-group.step-1-mode .shiny-cta-glow {
    background: radial-gradient(ellipse at 50% 175%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.25) 45%, transparent 75%);
    box-shadow: inset 0 -10px 24px -2px rgba(255, 255, 255, 0.9);
}
.btn-group.step-1-mode:is(:hover, :focus-visible) .shiny-cta-container {
    --gradient-shine: rgba(255, 255, 255, 0.6);
    background:
        linear-gradient(#000000, #000000) padding-box,
        conic-gradient(
            from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
            transparent 0%,
            rgba(255, 255, 255, 0.9) calc(var(--gradient-percent) * 0.8),
            rgba(255, 255, 255, 0.6) calc(var(--gradient-percent) * 2),
            rgba(255, 255, 255, 0.9) calc(var(--gradient-percent) * 3.2),
            transparent calc(var(--gradient-percent) * 4.5)
        ) border-box;
    animation: gradient-angle 15s linear infinite !important;
}
.btn-group.step-1-mode:is(:hover, :focus-visible) .shiny-cta-container::before {
    animation: gradient-angle 15s linear infinite !important;
}
.btn-group.step-1-mode:is(:hover, :focus-visible) .shiny-cta-container::after {
    opacity: 0.6 !important;
    background: linear-gradient(
        -50deg,
        transparent,
        rgba(255, 255, 255, 0.9),
        transparent
    );
    animation: shimmer 15s linear infinite !important;
}
.btn-group.step-1-mode:is(:hover, :focus-visible) .shiny-cta-glow {
    animation: breathe 10.5s linear infinite !important;
}
/* ── end step 1 white mode ── */

/* Mobile landscape success screen scaling and shifting (doesn't affect input screens) */
@media (max-height: 550px) and (max-width: 950px) and (orientation: landscape) {
    @media (min-width: 601px) {
        :root {
            /* clamp(12px, 10svh, 55px): matches tablet's 10svh top at 550px — no jump, gradual drift */
            --hud-cut-offset: calc(clamp(12px, 10svh, 55px) + 25px) !important;
        }
        .hud-frame {
            height: calc(clamp(12px, 10svh, 55px) + 20px) !important;
        }
        .hud-frame .info-panel--signal {
            top: clamp(12px, 10svh, 55px) !important;
            left: calc(6% + 4px) !important;
            right: auto !important;
        }
        .hud-frame .info-panel--close {
            top: clamp(12px, 10svh, 55px) !important;
            right: calc(6% + 4px) !important;
            left: auto !important;
        }
    }
    .terminal-main.success-active .progress-section {
        transform: scale(0.9) !important;
    }
    .success-title {
        white-space: nowrap !important;
    }
}

/* Tablet (601px to 1024px) HUD elements positioning alignment fixes inside .hud-frame container */
@media (min-width: 601px) and (max-width: 1024px) {
    :root {
        --hud-cut-offset: calc(8svh + 25px) !important;
    }
    .hud-frame {
        height: calc(8svh + 20px) !important;
    }
    .hud-frame .info-panel--signal {
        top: 8svh !important;
    }
    .hud-frame .info-panel--close {
        top: 8svh !important;
    }
    /* Scale down HUD labels and button sizes on tablet relative to titles */
    .hud-frame .panel-label {
        font-size: 11px !important;
    }
    .hud-frame .close-btn {
        width: 12px !important;
        height: 12px !important;
    }
    .hud-frame .bracket-slashes svg {
        width: 5px !important;
        height: 9px !important;
    }
}

/* Prevent step-indicator HUD bars from shifting horizontally when text width changes */
#step-indicator {
    display: inline-block !important;
    width: 42px !important;
    text-align: left !important;
}

/* ── Short-screen safety: redistribute padding so the back button gap increases
   without adding extra scroll height. We take from padding-bottom and give to
   padding-top — total container height stays identical, gap just shifts upward. */

@media (max-width: 1024px) and (max-height: 750px) {
    .terminal-main {
        padding-top: calc(var(--hud-cut-offset) + 18px) !important;
        padding-bottom: 12px !important; /* reduced from 30px — 18px moved to top */
    }
    .terminal-main::before {
        flex-grow: 1 !important;
    }
}

@media (max-width: 1024px) and (max-height: 600px) {
    .terminal-main {
        padding-top: calc(var(--hud-cut-offset) + 18px) !important;
        padding-bottom: 10px !important;
    }
    .terminal-main::before {
        flex-grow: 0.6 !important;
    }
}

@media (max-width: 1024px) and (max-height: 500px) {
    .terminal-main {
        padding-top: calc(var(--hud-cut-offset) + 18px) !important;
        padding-bottom: 8px !important;
    }
    .terminal-main::before {
        flex-grow: 0.3 !important;
    }
}

@media (max-width: 1024px) and (max-height: 400px) {
    .terminal-main {
        padding-top: calc(var(--hud-cut-offset) + 18px) !important;
        padding-bottom: 6px !important;
    }
    .terminal-main::before {
        flex-grow: 0 !important;
    }
}

