/* ==========================================================================
   CONTAINMENT LOSS - OFFICIAL STYLE GUIDE IMPLEMENTATION
   ========================================================================== */

:root {
    /* The Palette */
    --obsidian: #0A0A0A;
    /* The void between jump points. */
    --slate: #2B2B2B;
    /* Cold-rolled steel & ship hulls. */
    --hazard: #FFD300;
    /* Warning: Active Reactor. */
    --caution: #F57C00;
    /* Mechanical override engaged. */
    --breach: #C62828;
    /* Atmospheric seal failed. */

    --text-primary: #D4D4D8;
    /* zinc-300 */
    --text-muted: #71717A;
    /* zinc-500 */

    /* Typography */
    --font-header: 'Space Grotesk', sans-serif;
    --font-stencil: 'Chakra Petch', sans-serif;
    --font-terminal: 'Inconsolata', monospace;
}

/* ==========================================================================
   RESET & GLOBAL RULES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--obsidian);
    color: var(--text-primary);
    font-family: var(--font-header);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--obsidian);
}

::-webkit-scrollbar-thumb {
    background: var(--slate);
    border-radius: 4px;
}

/* ==========================================================================
   GLOBAL VISUAL EFFECTS (DRAKE INDUSTRIAL)
   ========================================================================== */

/* CRT Scanline Overlay Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Industrial Texture Overlay */
.industrial-grit {
    background-image: url('Ironclad.webp');
    opacity: 0.6;
    position: fixed;
    inset: -5%;
    width: 110vw;
    height: 110vh;
    pointer-events: none;
    z-index: 0;
    background-size: cover;
    background-position: center;
}

.breach-theme .industrial-grit {
    background-image: url('kraken.webp');
    opacity: 0.4;
    /* Slightly more transparent to let the text pop against the detailed background */
}

/* Atmospheric Dust Animation */
.dust-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
    /* Above asphalt, below content */
    overflow: hidden;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.15;
    mix-blend-mode: overlay;
    animation: shift-silt 20s ease-in-out infinite alternate;
}

.dust-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.12;
    mix-blend-mode: screen;
    animation: drift-dust 45s linear infinite;
    transform-origin: center;
}

@keyframes drift-dust {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1.2);
    }

    50% {
        transform: translate3d(-10vw, 5vh, 0) rotate(5deg) scale(1.4);
    }

    100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(1.2);
    }
}

@keyframes shift-silt {
    0% {
        opacity: 0.1;
        background-position: 0% 0%;
    }

    50% {
        opacity: 0.2;
        background-position: 100% 50%;
    }

    100% {
        opacity: 0.1;
        background-position: 0% 100%;
    }
}

/* Animated VHS Video Filter Overlay (Main Page Only) */
.vhs-filter {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    /* Display above background and grit, below dust (z-index: 5) */
    background: repeating-linear-gradient(transparent,
            transparent 10vh,
            rgba(0, 0, 0, 0.2) 10.1vh,
            rgba(255, 255, 255, 0.04) 10.4vh,
            transparent 10.6vh);
    background-size: 100% 200vh;
    animation: tracking-roll 120s linear infinite;
    mix-blend-mode: overlay;
    opacity: 0.7;
}

.vhs-filter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.55) 100%);
    animation: vignette-pulse 50s ease-in-out infinite alternate;
}

@keyframes tracking-roll {
    0% {
        background-position: 0 200vh;
    }

    100% {
        background-position: 0 0;
    }
}

@keyframes vignette-pulse {
    0% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Animated Static Interference Filter (Breach Page Only) */
.static-filter {
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110vw;
    height: 110vh;
    pointer-events: none;
    z-index: 2;
    /* Display above background, below content */
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E'),
        repeating-linear-gradient(transparent,
            transparent 10vh,
            rgba(0, 0, 0, 0.4) 10.1vh,
            rgba(255, 100, 100, 0.05) 10.4vh,
            transparent 10.6vh);
    background-size: 200px 200px, 100% 200vh;
    opacity: 0.4;
    mix-blend-mode: overlay;
    /* Combine slow roll with a much slower glitch (0.66s is ~70% slower than 0.2s) */
    animation: breach-tracking 120s linear infinite, breach-glitch 3.3s steps(2) infinite;
}

.static-filter::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(198, 40, 40, 0.25) 100%);
    pointer-events: none;
}

@keyframes breach-tracking {
    0% {
        background-position: 0 0, 0 200vh;
    }

    100% {
        background-position: 0 0, 0 0;
    }
}

@keyframes breach-glitch {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0.4;
        filter: blur(0px);
    }

    20% {
        transform: translate3d(-4px, 2px, 0);
        opacity: 0.5;
        filter: blur(0px);
    }

    40% {
        transform: translate3d(5px, -3px, 0);
        opacity: 0.3;
        filter: blur(0.5px);
    }

    60% {
        transform: translate3d(-3px, 4px, 0);
        opacity: 0.6;
        filter: blur(0px);
    }

    80% {
        transform: translate3d(4px, -5px, 0);
        opacity: 0.3;
        filter: blur(1px);
    }

    100% {
        transform: translate3d(0, 0, 0);
        opacity: 0.4;
        filter: blur(0px);
    }
}

/* Flicker Animation for the whole container / elements */
@keyframes flicker {
    0% {
        opacity: 0.98;
    }

    5% {
        opacity: 0.95;
    }

    10% {
        opacity: 0.99;
    }

    15% {
        opacity: 0.94;
    }

    20% {
        opacity: 0.98;
    }

    100% {
        opacity: 1;
    }
}

.flicker-anim {
    animation: flicker 0.15s infinite;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.terminal-container {
    position: relative;
    z-index: 10;
    max-width: 1024px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ==========================================================================
   TERMINAL HEADER
   ========================================================================== */
.terminal-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--slate);
}

@media (min-width: 768px) {
    .terminal-header {
        flex-direction: row;
        align-items: flex-end;
    }
}

.terminal-header {
    background: linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.9)), url('Golem.webp');
    background-size: cover;
    background-position: center;
    padding: 2rem;
    border: 1px solid rgba(255, 211, 0, 0.2);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
}

.breach-theme .terminal-header {
    background: linear-gradient(rgba(10, 10, 10, 0.75), rgba(10, 10, 10, 0.85)), url('Corsair.webp');
    background-size: cover;
    background-position: center;
    padding: 2rem;
    border: 1px solid rgba(198, 40, 40, 0.3);
    /* Add subtle red border for pirate theme */
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    margin-top: 1rem;
}

.access-badge {
    display: inline-block;
    background-color: var(--hazard);
    color: var(--obsidian);
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.main-title {
    font-family: var(--font-stencil);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    /* Subtle Distressed Clean Look */
    color: transparent;
    background: linear-gradient(rgba(255, 211, 0, 0.85), rgba(255, 211, 0, 0.85)), url('hull_font_mask.png');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;

    /* Clean 3D Extrusion */
    filter: drop-shadow(2px 2px 0px #050505) drop-shadow(4px 4px 0px #050505) drop-shadow(6px 6px 0px #0A0A0A) drop-shadow(0px 0px 15px rgba(0, 0, 0, 0.9));
    -webkit-text-stroke: 1px #050505;

    line-height: 1.1;
    opacity: 1;
}

@media (min-width: 768px) {
    .main-title {
        font-size: 4.5rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.25rem;
    }
}

.accent-hazard {
    color: var(--hazard);
}

.file-ref {
    font-family: var(--font-terminal);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.main-logo {
    width: 8rem;
    height: 8rem;
    transition: all 0.5s ease;

    /* Strong radiation glow matching the Apply button exactly */
    filter: drop-shadow(0 0 30px rgba(255, 211, 0, 0.6));
    opacity: 1;
}

.main-logo:hover {
    filter: drop-shadow(0 0 40px rgba(255, 211, 0, 0.8)) brightness(1.2);
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .main-logo {
        width: 10rem;
        height: 10rem;
    }
}

@media (max-width: 480px) {
    .main-logo {
        width: 5rem;
        height: 5rem;
    }
}

/* ==========================================================================
   CONTENT SECTIONS & DRAKE UI CARDS
   ========================================================================== */
.content-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--slate);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.25rem;
    }
}

.philosophy-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .philosophy-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.philosophy-card {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--slate);
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Add a weathered top border to cards indicating their function */
.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--hazard);
    opacity: 0.8;
}

.card-subtitle {
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.hazard-text {
    color: var(--hazard);
}

.philosophy-card p {
    color: #A1A1AA;
    /* zinc-400 */
}

/* ==========================================================================
   BUTTONS (INDUSTRIAL OVERRIDES)
   ========================================================================== */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .button-group {
        flex-direction: row;
    }
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem;
    font-family: var(--font-terminal);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.1em;
    border: 2px solid;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
    background: var(--obsidian);
    color: #fff;
    cursor: crosshair;
}

/* Internal weathering layer */
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 45%, transparent 50%);
    background-size: 200% 200%;
    transition: background-position 0.5s ease;
    z-index: 1;
}

.btn:hover::before {
    background-position: 100% 100%;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-decorator {
    width: 12px;
    height: 12px;
    background-color: currentColor;
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease;
}

.btn:hover .btn-decorator {
    transform: rotate(45deg) scale(1.2);
}

.btn-primary {
    background-color: var(--hazard);
    border-color: var(--hazard);
    color: var(--obsidian);
    opacity: 1 !important;
    /* Force fully opaque */
    font-weight: bold;
}

.btn-primary:hover {
    background-color: var(--hazard);
    color: var(--obsidian);
    /* For standard page this is yellow, for breach this becomes red */
    box-shadow: 0 0 30px 8px color-mix(in srgb, var(--hazard) 60%, transparent);
    filter: brightness(1.1);
    opacity: 1 !important;
}

.btn-secondary {
    border-color: var(--caution);
    color: var(--caution);
}

.btn-secondary:hover {
    background-color: var(--caution);
    color: var(--obsidian);
    box-shadow: 0 0 20px rgba(245, 124, 0, 0.3);
}

/* ==========================================================================
   CAUTION STRIPING
   ========================================================================== */
.caution-stripe {
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(45deg,
            rgba(255, 211, 0, 0.15),
            rgba(255, 211, 0, 0.15) 15px,
            rgba(10, 10, 10, 0.2) 15px,
            rgba(10, 10, 10, 0.2) 30px);
    margin: 2rem 0;
    opacity: 0.6;
    border-top: 1px solid rgba(255, 211, 0, 0.05);
    border-bottom: 1px solid rgba(255, 211, 0, 0.05);
}

.breach-theme .caution-stripe {
    background: repeating-linear-gradient(45deg,
            rgba(198, 40, 40, 0.25),
            rgba(198, 40, 40, 0.25) 15px,
            rgba(10, 10, 10, 0.2) 15px,
            rgba(10, 10, 10, 0.2) 30px);
    border-top: 1px solid rgba(198, 40, 40, 0.15);
    border-bottom: 1px solid rgba(198, 40, 40, 0.15);
}

/* ==========================================================================
   KONAMI OVERRIDE INTERFACE
   ========================================================================== */
.secret-trigger-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    position: relative;
    opacity: 0.2;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.secret-trigger-btn::before,
.secret-trigger-btn::after {
    content: '';
    position: absolute;
    background: var(--slate);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.secret-trigger-btn::before {
    width: 2px;
    height: 16px;
}

.secret-trigger-btn::after {
    width: 16px;
    height: 2px;
}

.secret-trigger-btn:hover {
    opacity: 1;
}

.secret-trigger-btn:hover::before,
.secret-trigger-btn:hover::after {
    background: var(--hazard);
    transform: translate(-50%, -50%) rotate(45deg);
}

.breach-theme .secret-trigger-btn:hover::before,
.breach-theme .secret-trigger-btn:hover::after {
    background: var(--breach);
}

.konami-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 450px;
    background: linear-gradient(rgba(26, 26, 26, 0.7), rgba(20, 20, 20, 0.95)), url('Ironclad.webp');
    background-size: cover;
    background-blend-mode: overlay;
    border: 4px solid #2a2a2a;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.8);
    border-image: repeating-linear-gradient(45deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.3) 10px, rgba(17, 17, 17, 0.8) 10px, rgba(17, 17, 17, 0.8) 20px) 4;
}

/* Close button for Konami Modal */
.konami-close-btn {
    position: absolute;
    top: 0px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}

.konami-close-btn:hover {
    color: var(--hazard);
}

/* Simulated open cover hinge */
.modal-cover-top {
    position: absolute;
    top: -40px;
    left: -4px;
    right: -4px;
    height: 40px;
    background: #222;
    border: 4px solid #111;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    transform-origin: bottom;
    transform: perspective(500px) rotateX(45deg);
    box-shadow: inset 0 5px 10px rgba(255, 255, 255, 0.05);
}

.modal-cover-top::after {
    content: 'MAINT_SYS_OVERRIDE_AUTH_REQ // DND';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    font-family: var(--font-terminal);
    color: #444;
    font-size: 0.6rem;
    white-space: nowrap;
}

.konami-modal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.gamepad-body {
    padding: 2rem 1rem 3rem 1rem;
    /* Extra padding on bottom for mobile spacing */
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at center, rgba(34, 34, 34, 0.85) 0%, rgba(17, 17, 17, 0.95) 100%), url('hull_font_mask.png');
    background-blend-mode: multiply;
    background-size: cover;
}

.gamepad-header {
    font-family: var(--font-terminal);
    color: var(--hazard);
    font-size: 1rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    pointer-events: none;
    border-bottom: 1px dashed var(--hazard);
    padding-bottom: 0.5rem;
    width: 100%;
    text-align: center;
}

.center-console {
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    background-image:
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0.05) 2px, transparent 2px, transparent 6px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 5px),
        radial-gradient(ellipse at 70% 30%, rgba(20, 20, 20, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(0, 0, 0, 0.6) 0%, transparent 70%),
        linear-gradient(135deg, #707070 0%, #444444 40%, #2b2b2b 100%),
        url('hull_font_mask.png');
    background-blend-mode: normal, normal, multiply, multiply, normal, overlay;
    background-size: auto, auto, 100% 100%, 100% 100%, auto, cover;
    border-radius: 8px;
    border: 2px solid #1a1a1a;
    border-top: 2px solid #666;
    border-left: 2px solid #505050;
    box-shadow:
        inset 0 10px 20px rgba(0, 0, 0, 0.8),
        inset -5px -5px 15px rgba(0, 0, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.95);
}

.gamepad-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    width: 100%;
    padding: 1rem 0;
}

/* D-PAD CSS */
.d-pad {
    position: relative;
    width: 120px;
    height: 120px;
}

.d-pad-btn {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image:
        radial-gradient(ellipse at 80% 80%, rgba(10, 10, 10, 0.7) 0%, transparent 60%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        linear-gradient(135deg, #4d4d4d 0%, #1a1a1a 100%),
        url('hull_font_mask.png');
    background-blend-mode: multiply, normal, normal, soft-light;
    background-size: 150% 150%, auto, auto, cover;
    border: 1px solid #111;
    border-top: 1px solid #5a5a5a;
    border-left: 1px solid #4a4a4a;
    cursor: pointer;
    box-shadow:
        inset 1px 1px 3px rgba(255, 255, 255, 0.15),
        inset -3px -3px 6px rgba(0, 0, 0, 0.9),
        2px 3px 6px rgba(0, 0, 0, 0.9);
    transition: all 0.1s;
    touch-action: manipulation;
}

.d-pad-btn:active,
.d-pad-btn.active {
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #333 0%, #111 100%),
        url('hull_font_mask.png');
    background-blend-mode: normal, normal, soft-light;
    background-size: auto, auto, cover;
    box-shadow:
        inset 0 4px 6px rgba(0, 0, 0, 0.9),
        inset -1px -1px 2px rgba(255, 255, 255, 0.05),
        0 1px 1px rgba(255, 255, 255, 0.1);
}

@media (max-width: 450px) {
    .konami-modal.active {
        transform: translate(-50%, -50%) scale(0.75);
    }
}

.d-pad-btn.up {
    top: 0;
    left: 40px;
    border-radius: 5px 5px 0 0;
}

.d-pad-btn.right {
    top: 40px;
    right: 0;
    border-radius: 0 5px 5px 0;
}

.d-pad-btn.down {
    bottom: 0;
    left: 40px;
    border-radius: 0 0 5px 5px;
}

.d-pad-btn.left {
    top: 40px;
    left: 0;
    border-radius: 5px 0 0 5px;
}

.d-pad-center {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 40px;
    height: 40px;
    background-image:
        linear-gradient(135deg, #333 0%, #1a1a1a 100%),
        url('hull_font_mask.png');
    background-blend-mode: normal, soft-light;
    background-size: auto, cover;
    pointer-events: none;
    z-index: 1;
}

.d-pad-center::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1a1a1a;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 1px 1px rgba(255, 255, 255, 0.05);
}

/* A/B Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.btn-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-image:
        radial-gradient(circle at 85% 85%, rgba(40, 0, 0, 0.8) 0%, transparent 60%),
        radial-gradient(circle at 20% 20%, rgba(255, 150, 150, 0.4) 0%, transparent 50%),
        linear-gradient(135deg, #d32f2f 0%, #7f0000 100%),
        url('hull_font_mask.png');
    background-blend-mode: multiply, normal, normal, soft-light;
    background-size: auto, auto, auto, cover;
    border: 1px solid #4d0000;
    border-top: 2px solid #ff6666;
    border-left: 1px solid #cc3333;
    cursor: pointer;
    box-shadow:
        inset 2px 2px 5px rgba(255, 200, 200, 0.5),
        inset -4px -4px 10px rgba(50, 0, 0, 0.9),
        4px 6px 12px rgba(0, 0, 0, 0.9),
        0 2px 4px rgba(0, 0, 0, 0.7);
    transition: all 0.1s;
    font-family: var(--font-terminal);
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(50, 0, 0, 0.9);
}

.action-btn:active,
.action-btn.active {
    transform: translateY(4px);
    box-shadow:
        inset 2px 2px 8px rgba(10, 0, 0, 0.8),
        inset -1px -1px 3px rgba(255, 100, 100, 0.1),
        0 1px 2px rgba(255, 255, 255, 0.05);
    background-image:
        radial-gradient(circle at 35% 25%, rgba(200, 100, 100, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.6) 0%, transparent 50%),
        linear-gradient(135deg, #aa0000 0%, #660000 100%),
        url('hull_font_mask.png');
    background-blend-mode: normal, normal, normal, soft-light;
    background-size: auto, auto, auto, cover;
}

/* Submit Section (Central Big Button) */
.override-submit-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-image:
        radial-gradient(circle at 85% 85%, rgba(60, 40, 0, 0.7) 0%, transparent 60%),
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
        linear-gradient(135deg, #ffca28 0%, #f57f17 100%),
        url('hull_font_mask.png');
    background-blend-mode: multiply, normal, normal, soft-light;
    background-size: auto, auto, auto, cover;
    border: 2px solid #5a4000;
    border-top: 2px solid #ffe57f;
    border-left: 2px solid #ffd54f;
    color: transparent;
    font-family: var(--font-terminal);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    outline: none;
    box-shadow:
        inset 5px 5px 10px rgba(255, 255, 255, 0.6),
        inset -8px -8px 20px rgba(80, 50, 0, 0.9),
        10px 15px 25px rgba(0, 0, 0, 0.95),
        0 5px 10px rgba(0, 0, 0, 0.7);
    position: relative;
}

/* Active "Lit up" State */
.override-submit-btn.ready {
    background-image:
        radial-gradient(circle at 35% 25%, rgba(255, 100, 100, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.5) 0%, transparent 50%),
        linear-gradient(135deg, var(--breach) 0%, #8b1c1c 100%),
        url('hull_font_mask.png');
    background-blend-mode: normal, normal, normal, soft-light;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    box-shadow:
        inset 4px 4px 8px rgba(255, 150, 150, 0.4),
        inset -6px -6px 15px rgba(80, 0, 0, 0.9),
        0 0 30px rgba(198, 40, 40, 0.6),
        8px 12px 20px rgba(0, 0, 0, 0.8);
    border-color: #5a0d0d;
    text-shadow: 0 0 10px rgba(255, 150, 150, 0.8);
    animation: breach-pulse-ready 1.5s infinite alternate;
}

.override-submit-btn.ready:active {
    transform: translateY(6px);
    box-shadow:
        inset 3px 3px 15px rgba(0, 0, 0, 0.9),
        inset -2px -2px 5px rgba(255, 100, 100, 0.2),
        0 0 20px rgba(255, 50, 50, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes breach-pulse-ready {
    0% {
        box-shadow:
            inset 4px 4px 8px rgba(255, 150, 150, 0.4),
            inset -6px -6px 15px rgba(80, 0, 0, 0.9),
            0 0 20px rgba(198, 40, 40, 0.4),
            8px 12px 20px rgba(0, 0, 0, 0.8);
        filter: brightness(1);
    }

    100% {
        box-shadow:
            inset 4px 4px 12px rgba(255, 150, 150, 0.6),
            inset -6px -6px 15px rgba(80, 0, 0, 0.9),
            0 0 40px rgba(198, 40, 40, 0.8),
            8px 12px 20px rgba(0, 0, 0, 0.8);
        filter: brightness(1.2);
    }
}

.override-submit-btn.error {
    border-color: #ff3333;
    color: #ff3333;
    animation: error-shake 0.4s;
}

@keyframes error-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

/* ==========================================================================
   TERMINAL FOOTER
   ========================================================================== */
.terminal-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    text-align: center;
    border-top: 1px solid var(--slate);
}

.terminal-footer p {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(43, 43, 43, 0.5);
    /* Semi-transparent slate */
    font-family: var(--font-terminal);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ==========================================================================
   NEW CONTENT SECTIONS & COMBINED STYLES
   ========================================================================== */

.philosophy-card.full-width {
    grid-column: 1 / -1;
}

.spacer {
    margin-top: 1.5rem;
}

.spacer-sm {
    margin-top: 0.5rem;
}

.emphasis-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.font-bold {
    font-weight: 700;
}

.text-primary {
    color: var(--text-primary);
}

.flavor-quote-container {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--hazard);
}

.flavor-quote {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-muted);
}

.mb-large {
    margin-bottom: 2rem;
}

.border-hazard {
    border-color: var(--hazard);
}

.bg-hazard-subtle {
    background: rgba(255, 211, 0, 0.05);
}

.terminal-readout {
    font-family: var(--font-terminal);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px dashed var(--slate);
    color: var(--text-primary);
    border-left: 2px solid var(--danger);
}

.text-sm {
    font-size: 0.85rem;
}

/* Hero Section Updates */
.hero-section {
    position: relative;
    margin-bottom: 4rem;
}

.hero-visual {
    height: 350px;
    background-image: url('space_asphalt_bg.png');
    background-color: var(--slate);
    background-blend-mode: multiply;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid var(--slate);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.hero-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--obsidian) 0%, transparent 100%);
    pointer-events: none;
}

.hero-logo-container {
    position: relative;
    z-index: 2;
    opacity: 0.8;
}

.hero-logo {
    width: 15rem;
    height: 15rem;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.8));
}

.hero-content {
    background: rgba(10, 10, 10, 0.85);
    padding: 2rem;
    border-left: 4px solid var(--hazard);
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); */
}

.hero-blurb {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-blurb:last-child {
    margin-bottom: 0;
}

/* Recruitment Background Fix */
.recruitment-background-wrapper {
    background: rgba(10, 10, 10, 0.95);
    padding: 2rem;
    border: 1px solid var(--slate);
    border-left: 4px solid var(--hazard);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    margin-top: 1rem;
}

/* ==========================================================================
   BREACH PAGE / DIRTY AESTHETIC
   ========================================================================== */
.breach-theme {
    --hazard: var(--breach);
    /* Re-map hazard to breach red for this page */
    --caution: #B71C1C;
}

.breach-theme .main-title {
    background: linear-gradient(rgba(198, 40, 40, 0.85), rgba(198, 40, 40, 0.85)), url('hull_font_mask.png');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
}

.breach-theme .main-logo {
    filter: drop-shadow(0 0 30px rgba(198, 40, 40, 0.6));
}

.breach-theme .main-logo:hover {
    filter: drop-shadow(0 0 40px rgba(198, 40, 40, 0.8)) brightness(1.2) !important;
    transform: scale(1.05);
}

.breach-theme .hero-visual {
    background-image: url('space_asphalt_bg.png');
    /* Placeholder for Corsair */
}

.breach-theme .bg-hazard-subtle {
    background: rgba(198, 40, 40, 0.05);
    /* breach color subtle */
}

/* Datapad / Articles Styling */
.datapad-card {
    background: #0d0d0d;
    border: 1px solid var(--slate);
    padding: 2.5rem;
    position: relative;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9), 0 10px 30px rgba(0, 0, 0, 0.6);
}

/* Cracked screen overlay effect */
.datapad-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.01) 40.5%, transparent 41%),
        linear-gradient(-35deg, transparent 30%, rgba(255, 255, 255, 0.02) 30.5%, transparent 31%),
        linear-gradient(20deg, transparent 80%, rgba(255, 255, 255, 0.015) 80.5%, transparent 81%);
    opacity: 0.8;
}

.datapad-card ol {
    padding-left: 1rem;
    color: var(--text-primary);
    list-style-type: upper-roman;
}

.datapad-card li {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    padding-left: 1rem;
}

.datapad-card li::marker {
    color: var(--breach);
    font-weight: 700;
    font-family: var(--font-header);
    font-size: 1.1rem;
}

.datapad-title {
    font-family: var(--font-terminal);
    text-align: center;
    color: var(--breach);
    margin-bottom: 2rem;
    border-bottom: 1px dashed var(--slate);
    padding-bottom: 1rem;
    letter-spacing: 0.1em;
}