@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;700;800&family=Share+Tech+Mono&family=Black+Ops+One&family=VT323&display=swap');

:root {
    --duke-yellow: #facc15;
    --duke-gold: #eab308;
    --duke-red: #ef4444;
    --duke-dark-red: #991b1b;
    --duke-blood: #dc2626;
    --duke-cyan: #06b6d4;
    --duke-green: #22c55e;
    --duke-toxic: #39ff14;
    --duke-steel-dark: #12151c;
    --duke-steel: #1e2530;
    --duke-steel-light: #334155;
    --hud-border-outer: #475569;
    --hud-border-inner: #0f172a;
    --led-red: #ff2a2a;
    --led-amber: #ffaa00;
    --led-green: #00ff66;
    --led-blue: #00bfff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #050608;
    font-family: 'Chakra Petch', sans-serif;
    color: #f1f5f9;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: crosshair;
}

/* ========================================================
   RETRO CRT SCANLINES & SCREEN FILTER
   ======================================================== */
.crt-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.28) 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, 6px 100%;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.7);
}

.crt-scanlines.off {
    display: none;
}

/* Screen Damage & Pickup Flash Overlay */
#flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.08s ease-out;
}

#flash-overlay.damage {
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, rgba(185, 28, 28, 0.8) 100%);
    opacity: 1;
}

#flash-overlay.toxic {
    background: radial-gradient(circle, rgba(57, 255, 20, 0.25) 0%, rgba(34, 197, 94, 0.7) 100%);
    opacity: 1;
}

#flash-overlay.item {
    background: radial-gradient(circle, rgba(250, 204, 21, 0.2) 0%, rgba(234, 179, 8, 0.5) 100%);
    opacity: 1;
}

#flash-overlay.atomic {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.6) 100%);
    opacity: 1;
}

/* ========================================================
   MIGHTY FOOT KICK OVERLAY
   ======================================================== */
#mighty-foot {
    position: absolute;
    bottom: 80px;
    right: 20%;
    width: 380px;
    height: 380px;
    pointer-events: none;
    z-index: 10;
    transform-origin: bottom center;
    transform: translateY(120%) rotate(-15deg);
    transition: transform 0.12s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

#mighty-foot.kicking {
    transform: translateY(0%) scale(1.15) rotate(0deg);
}

.foot-graphic {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.9));
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'><defs><linearGradient id='denim' x1='0%' y1='0%' x2='100%' y2='0%'><stop offset='0%' stop-color='%231e3a8a'/><stop offset='50%' stop-color='%232563eb'/><stop offset='100%' stop-color='%231e40af'/></linearGradient><linearGradient id='leather' x1='0%' y1='0%' x2='100%' y2='100%'><stop offset='0%' stop-color='%2327272a'/><stop offset='60%' stop-color='%2318181b'/><stop offset='100%' stop-color='%2309090b'/></linearGradient><linearGradient id='sole' x1='0%' y1='0%' x2='0%' y2='100%'><stop offset='0%' stop-color='%233f3f46'/><stop offset='100%' stop-color='%2318181b'/></linearGradient><linearGradient id='steel' x1='0%' y1='0%' x2='100%' y2='50%'><stop offset='0%' stop-color='%2371717a'/><stop offset='50%' stop-color='%23d4d4d8'/><stop offset='100%' stop-color='%2352525b'/></linearGradient></defs><!-- Blue Denim Trouser Leg --><path d='M75 10 L165 10 L160 75 L80 75 Z' fill='url(%23denim)' stroke='%23172554' stroke-width='3'/><path d='M76 68 L164 68 L162 76 L78 76 Z' fill='%2360a5fa' opacity='0.7'/><!-- Leather Boot Upper Shaft --><path d='M80 75 L160 75 L158 135 L82 135 Z' fill='url(%23leather)' stroke='%23000' stroke-width='3'/><!-- Boot Tongue & Crossed Laces --><path d='M105 75 L135 75 L133 135 L107 135 Z' fill='%2318181b'/><line x1='105' y1='85' x2='135' y2='95' stroke='%23fbbf24' stroke-width='3'/><line x1='135' y1='85' x2='105' y2='95' stroke='%23fbbf24' stroke-width='3'/><line x1='106' y1='105' x2='134' y2='115' stroke='%23fbbf24' stroke-width='3'/><line x1='134' y1='105' x2='106' y2='115' stroke='%23fbbf24' stroke-width='3'/><line x1='107' y1='125' x2='133' y2='133' stroke='%23fbbf24' stroke-width='3'/><line x1='133' y1='125' x2='107' y2='133' stroke='%23fbbf24' stroke-width='3'/><!-- Boot Main Foot Body --><path d='M70 135 Q60 160 55 185 L185 185 Q180 160 170 135 Z' fill='url(%23leather)' stroke='%23000' stroke-width='3'/><!-- Steel Toe Cap --><path d='M65 160 Q120 145 175 160 L185 185 L55 185 Z' fill='url(%23steel)' stroke='%23000' stroke-width='2'/><!-- Heavy Lugged Sole --><path d='M45 185 L195 185 L190 220 L50 220 Z' fill='url(%23sole)' stroke='%23000' stroke-width='3'/><!-- Deep Sole Lugs --><rect x='52' y='210' width='14' height='18' fill='%2309090b'/><rect x='74' y='210' width='16' height='18' fill='%2309090b'/><rect x='98' y='210' width='16' height='18' fill='%2309090b'/><rect x='122' y='210' width='16' height='18' fill='%2309090b'/><rect x='146' y='210' width='16' height='18' fill='%2309090b'/><rect x='170' y='210' width='14' height='18' fill='%2309090b'/></svg>");
}

/* ========================================================
   HUD OVERLAYS
   ======================================================== */
#hud-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top Bar */
.hud-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(180deg, rgba(10, 14, 20, 0.85) 0%, rgba(10, 14, 20, 0) 100%);
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-title {
    font-family: 'Black Ops One', cursive;
    font-size: 26px;
    letter-spacing: 2px;
    color: var(--duke-yellow);
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.6), 2px 2px 0px #000;
}

.brand-sub {
    font-size: 13px;
    font-weight: 800;
    background: var(--duke-red);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 #000;
}

.brand-depth {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: #94a3b8;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1.5px;
}

.hud-top-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

#tactical-readout {
    position: absolute;
    top: 58px;
    left: 20px;
    min-width: 250px;
    padding: 7px 10px;
    background: rgba(7, 19, 27, 0.9);
    border-left: 3px solid #67e8f9;
    border-top: 1px solid #334155;
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    border-radius: 0 4px 4px 0;
    color: #a5f3fc;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.4px;
    text-shadow: 1px 1px 0 #000;
    pointer-events: none;
}

.tactical-row {
    display: flex;
    align-items: baseline;
    gap: 9px;
    white-space: nowrap;
}

.tactical-label {
    width: 64px;
    color: #94a3b8;
    font-size: 10px;
}

#hud-objective {
    color: #67e8f9;
}

#hud-hostiles {
    color: var(--duke-yellow);
}

#hud-hostiles.threat-near {
    color: #fb7185;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
}

#elevator-waypoint {
    position: absolute;
    top: 135px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    justify-items: center;
    gap: 3px;
    min-width: 150px;
    padding: 8px 14px;
    border: 1px solid rgba(103, 232, 249, 0.7);
    border-radius: 5px;
    background: rgba(3, 15, 23, 0.82);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.25), inset 0 0 16px rgba(34, 211, 238, 0.08);
    color: #a5f3fc;
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
    pointer-events: none;
    animation: waypointPulse 1.5s ease-in-out infinite;
}

.waypoint-ring {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid #67e8f9;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(103, 232, 249, 0.75);
}

#elevator-waypoint-arrow {
    display: block;
    color: #67e8f9;
    font-size: 25px;
    line-height: 1;
    transform-origin: center;
}

#elevator-waypoint-label {
    font-size: 13px;
    letter-spacing: 1.2px;
}

#elevator-waypoint-distance {
    color: #fff;
    font-size: 12px;
}

#elevator-waypoint.waypoint-close {
    border-color: var(--duke-yellow);
    color: var(--duke-yellow);
    animation-duration: 0.55s;
}

@keyframes waypointPulse {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}

.hud-stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(18, 24, 38, 0.85);
    border: 1px solid #334155;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
}

.pill-label {
    color: #94a3b8;
    font-weight: 700;
}

.pill-val {
    color: var(--duke-yellow);
    font-weight: 800;
}

.retro-btn {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    border: 1px solid #475569;
    border-top-color: #64748b;
    border-bottom-color: #0f172a;
    color: #f8fafc;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.1s ease;
}

.retro-btn:hover {
    background: linear-gradient(180deg, #475569 0%, #334155 100%);
    color: var(--duke-yellow);
}

.retro-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}

/* Crosshair & Interaction */
#crosshair-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#crosshair {
    width: 22px;
    height: 22px;
    position: relative;
}

#crosshair::before, #crosshair::after {
    content: '';
    position: absolute;
    background-color: rgba(250, 204, 21, 0.85);
    box-shadow: 0 0 4px rgba(0,0,0,0.8);
}

#crosshair::before {
    top: 10px;
    left: 0;
    width: 22px;
    height: 2px;
}

#crosshair::after {
    top: 0;
    left: 10px;
    width: 2px;
    height: 22px;
}

#hit-marker {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 42px;
    height: 42px;
    border: 2px solid var(--duke-red);
    transform: rotate(45deg);
    opacity: 0.9;
    animation: hitPulse 0.15s ease-out forwards;
}

@keyframes hitPulse {
    0% { transform: scale(1.3) rotate(45deg); opacity: 1; }
    100% { transform: scale(1) rotate(45deg); opacity: 0; }
}

#interaction-prompt {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--duke-yellow);
    padding: 6px 14px;
    border-radius: 4px;
    color: #f8fafc;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7), 0 0 10px rgba(250, 204, 21, 0.3);
    animation: promptPulse 1.2s infinite alternate;
}

.key-prompt {
    color: var(--duke-yellow);
    font-weight: 800;
}

@keyframes promptPulse {
    from { transform: translateX(-50%) scale(1); }
    to { transform: translateX(-50%) scale(1.05); }
}

/* Duke Quip Banner */
#duke-quip-banner {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 12, 16, 0.92);
    border: 2px solid var(--duke-yellow);
    padding: 8px 20px;
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.4), 0 10px 20px rgba(0,0,0,0.8);
    transition: opacity 0.3s ease;
}

.duke-avatar-mini {
    width: 32px;
    height: 32px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" fill="%23dc2626"/><rect x="6" y="4" width="20" height="7" fill="%23facc15"/><rect x="7" y="11" width="18" height="12" fill="%23fed7aa"/><rect x="8" y="13" width="16" height="4" fill="%230f172a"/><rect x="11" y="21" width="10" height="2" fill="%23991b1b"/></svg>') center/contain no-repeat;
    border: 1px solid #475569;
}

.duke-speech-text {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 800;
    font-size: 17px;
    color: var(--duke-yellow);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #000;
}

/* Boss Health Bar */
#boss-bar-container {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid var(--duke-red);
    padding: 8px;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.boss-label {
    font-family: 'Black Ops One', cursive;
    font-size: 14px;
    color: var(--duke-red);
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 4px;
    text-shadow: 1px 1px 0 #000;
}

.boss-bar-frame {
    height: 16px;
    background: #1e1b2e;
    border: 1px solid #475569;
    position: relative;
    overflow: hidden;
}

.boss-bar-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #dc2626, #f97316);
    box-shadow: 0 0 10px #ef4444;
    transition: width 0.15s ease-out;
}

/* Item Toast */
#item-toast {
    position: absolute;
    bottom: 110px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.95);
    border-left: 5px solid var(--duke-yellow);
    border-top: 1px solid #334155;
    border-right: 1px solid #334155;
    border-bottom: 1px solid #334155;
    padding: 10px 16px;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.8);
    transition: all 0.25s ease;
}

.toast-icon {
    font-size: 24px;
    color: var(--duke-yellow);
}

.toast-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--duke-yellow);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.toast-desc {
    font-size: 12px;
    color: #cbd5e1;
    font-family: 'Share Tech Mono', monospace;
}

/* ========================================================
   DUKE NUKEM 3D CLASSIC BOTTOM STATUS BAR
   ======================================================== */
.duke-status-bar {
    width: 100%;
    height: 84px;
    background: linear-gradient(180deg, #2b3544 0%, #151b24 18%, #0f131a 100%);
    border-top: 3px solid #64748b;
    border-bottom: 2px solid #000;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 6px 12px;
    pointer-events: auto;
    position: relative;
    z-index: 30;
}

.duke-status-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
}

.status-panel {
    background: linear-gradient(180deg, #10141c 0%, #1b222d 100%);
    border: 2px solid #334155;
    border-top-color: #0f172a;
    border-left-color: #0f172a;
    border-right-color: #475569;
    border-bottom-color: #475569;
    border-radius: 4px;
    padding: 4px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: inset 1px 1px 5px rgba(0,0,0,0.8);
}

.panel-header {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.digital-display {
    font-family: 'VT323', monospace;
    font-size: 40px;
    line-height: 34px;
    color: var(--led-amber);
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.7);
    letter-spacing: 2px;
}

.panel-ammo {
    min-width: 140px;
}

.weapon-name {
    font-size: 10px;
    font-weight: 800;
    color: #cbd5e1;
    letter-spacing: 1px;
    margin-top: 2px;
}

.panel-health {
    min-width: 150px;
}

.ego-display {
    color: var(--led-red);
    text-shadow: 0 0 8px rgba(255, 42, 42, 0.7);
}

.health-bar-track, .armor-bar-track {
    width: 100%;
    height: 6px;
    background: #090c10;
    border: 1px solid #334155;
    margin-top: 2px;
    position: relative;
}

.health-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #991b1b, #ef4444);
    box-shadow: 0 0 6px #ef4444;
}

.panel-portrait {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

.portrait-frame {
    width: 52px;
    height: 52px;
    background: #090d14;
    border: 2px solid #64748b;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 8px #000;
}

.duke-face {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.portrait-label {
    font-family: 'Black Ops One', cursive;
    font-size: 10px;
    color: var(--duke-yellow);
    letter-spacing: 1px;
    margin-top: 2px;
}

.panel-armor {
    min-width: 140px;
}

.armor-display {
    color: var(--led-blue);
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.7);
}

.armor-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
    box-shadow: 0 0 6px #38bdf8;
}

.panel-rack {
    flex: 1;
    max-width: 320px;
}

.weapons-grid {
    display: flex;
    gap: 4px;
    margin-top: 3px;
}

.weapon-slot {
    flex: 1;
    background: #0c1017;
    border: 1px solid #334155;
    padding: 3px 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.weapon-slot .w-key {
    color: #94a3b8;
    margin-right: 2px;
}

.weapon-slot.unlocked {
    color: #cbd5e1;
    border-color: #475569;
}

.weapon-slot.active {
    background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
    border-color: var(--duke-yellow);
    color: var(--duke-yellow);
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.4);
}

.keys-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.keycard-tag {
    flex: 1;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    font-weight: 800;
    text-align: center;
    padding: 2px;
    border-radius: 2px;
    opacity: 0.25;
    border: 1px solid currentColor;
}

#key-blue {
    color: #38bdf8;
}

#key-yellow {
    color: #facc15;
}

#key-red {
    color: #ef4444;
}

.keycard-tag.has-key {
    opacity: 1;
    box-shadow: 0 0 8px currentColor;
    background: currentColor;
    color: #000 !important;
}

/* ========================================================
   MODALS: TITLE, PAUSE, DEATH, VICTORY
   ======================================================== */
#title-screen, #pause-screen, #death-screen, #victory-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 6, 10, 0.85);
    backdrop-filter: blur(8px);
}

.title-modal, .pause-modal, .death-modal, .victory-modal {
    max-width: 650px;
    width: 90%;
    background: linear-gradient(180deg, #1a2230 0%, #0d121c 100%);
    border: 3px solid #475569;
    border-top: 3px solid #64748b;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 30px rgba(250, 204, 21, 0.15);
    border-radius: 8px;
    padding: 28px;
    text-align: center;
    position: relative;
}

.title-logo {
    margin-bottom: 20px;
}

.title-top {
    font-family: 'Black Ops One', cursive;
    font-size: 58px;
    line-height: 52px;
    letter-spacing: 4px;
    color: var(--duke-yellow);
    text-shadow: 
        0 0 20px rgba(250, 204, 21, 0.7),
        3px 3px 0 #b45309,
        5px 5px 0 #78350f,
        7px 7px 0 #000;
}

.title-bottom {
    font-family: 'Black Ops One', cursive;
    font-size: 40px;
    line-height: 38px;
    letter-spacing: 3px;
    color: var(--duke-red);
    text-shadow: 
        0 0 20px rgba(239, 68, 68, 0.7),
        2px 2px 0 #991b1b,
        4px 4px 0 #450a0a,
        6px 6px 0 #000;
}

.title-tagline {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: #94a3b8;
    margin-top: 8px;
    letter-spacing: 2px;
}

.briefing-box {
    background: rgba(10, 15, 22, 0.8);
    border: 1px solid #334155;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: left;
}

.briefing-text {
    font-size: 14px;
    line-height: 1.5;
    color: #cbd5e1;
}

.briefing-text strong {
    color: var(--duke-yellow);
}

.difficulty-select {
    margin-bottom: 24px;
}

.diff-header {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #94a3b8;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.diff-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.diff-btn {
    background: #111827;
    border: 1px solid #374151;
    color: #9ca3af;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: 11px;
    padding: 8px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.diff-btn:hover {
    border-color: #6b7280;
    color: #fff;
}

.diff-btn.selected {
    background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
    border-color: var(--duke-yellow);
    color: #fff;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.start-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(180deg, #eab308 0%, #ca8a04 50%, #a16207 100%);
    border: 2px solid #fef08a;
    border-radius: 6px;
    color: #000;
    font-family: 'Black Ops One', cursive;
    font-size: 20px;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(234, 179, 8, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    transition: all 0.15s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(234, 179, 8, 0.7), inset 0 2px 6px rgba(255, 255, 255, 0.8);
}

.start-btn:active {
    transform: translateY(1px);
}

.controls-guide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 18px;
    font-size: 12px;
    color: #94a3b8;
    text-align: left;
}

.controls-guide .key {
    display: inline-block;
    background: #1e293b;
    border: 1px solid #475569;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 700;
    color: var(--duke-yellow);
    margin-right: 4px;
}

/* Death Screen */
.death-title {
    font-family: 'Black Ops One', cursive;
    font-size: 46px;
    color: var(--duke-red);
    text-shadow: 0 0 25px rgba(220, 38, 38, 0.8), 3px 3px 0 #450a0a;
    margin-bottom: 12px;
}

.death-quote {
    font-size: 16px;
    font-style: italic;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.death-stats {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 24px;
}

/* Victory Screen */
.victory-title {
    font-family: 'Black Ops One', cursive;
    font-size: 46px;
    color: var(--duke-yellow);
    text-shadow: 0 0 25px rgba(250, 204, 21, 0.8), 3px 3px 0 #78350f;
    margin-bottom: 8px;
}

.deck-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: #38bdf8;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.victory-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    padding: 10px 4px;
    border-radius: 4px;
}

.stat-num {
    display: block;
    font-family: 'VT323', monospace;
    font-size: 32px;
    color: var(--duke-yellow);
}

.stat-txt {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: #94a3b8;
    letter-spacing: 1px;
}

.victory-quote {
    font-size: 15px;
    font-style: italic;
    color: #cbd5e1;
    margin-bottom: 24px;
}

/* ========================================================
   MOBILE VIRTUAL CONTROLS
   ======================================================== */
#mobile-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25;
    pointer-events: none;
}

.stick-zone {
    position: absolute;
    bottom: 96px;
    left: 20px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.45);
    border: 2px solid rgba(56, 189, 248, 0.4);
    pointer-events: auto;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stick-knob {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, #38bdf8 0%, #0284c7 100%);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
    pointer-events: none;
    transform: translate(0px, 0px);
}

.mobile-action-buttons {
    position: absolute;
    bottom: 96px;
    right: 20px;
    display: grid;
    grid-template-columns: repeat(2, 64px);
    grid-template-rows: repeat(3, 56px);
    gap: 8px;
    pointer-events: auto;
}

.m-btn {
    border-radius: 8px;
    border: 2px solid #64748b;
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.m-btn:active {
    transform: scale(0.95);
}

.btn-fire {
    grid-column: 2;
    grid-row: 2 / span 2;
    background: linear-gradient(180deg, #ef4444 0%, #991b1b 100%);
    border-color: #f87171;
    font-size: 16px;
}

.btn-kick {
    background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
    border-color: #fbbf24;
}

.btn-use {
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #60a5fa;
}

.btn-jump {
    background: linear-gradient(180deg, #10b981 0%, #047857 100%);
    border-color: #34d399;
}

.btn-wep {
    background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%);
    border-color: #818cf8;
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* ========================================================
   RESPONSIVE LAYOUT ADJUSTMENTS
   ======================================================== */
@media (max-width: 900px) {
    .duke-status-bar {
        height: 72px;
        padding: 4px 8px;
    }
    .digital-display {
        font-size: 30px;
        line-height: 26px;
    }
    .panel-ammo, .panel-health, .panel-armor {
        min-width: 95px;
    }
    .panel-portrait {
        width: 60px;
    }
    .portrait-frame {
        width: 42px;
        height: 42px;
    }
    .weapon-slot {
        font-size: 8px;
        padding: 2px;
    }
}

@media (max-width: 650px) {
    .brand-depth {
        display: none;
    }
    .hud-stat-pill {
        display: none;
    }
    .panel-armor {
        display: none;
    }
    .weapons-grid {
        display: none;
    }
    .diff-options {
        grid-template-columns: repeat(2, 1fr);
    }
    .controls-guide {
        grid-template-columns: 1fr;
    }
    #tactical-readout {
        top: 54px;
        left: 8px;
        min-width: 0;
        max-width: calc(100vw - 16px);
        padding: 5px 8px;
        font-size: 11px;
    }
    .tactical-label {
        width: 58px;
        font-size: 9px;
    }
    #elevator-waypoint {
        top: 140px;
        min-width: 128px;
        padding: 6px 10px;
    }
    .waypoint-ring {
        width: 32px;
        height: 32px;
    }
    #elevator-waypoint-arrow {
        font-size: 21px;
    }
}

/* ========================================================
   DUKE SPECIAL GEAR BAR & OVERLAYS
   ======================================================== */
.duke-gear-bar {
    position: absolute;
    bottom: 88px;
    left: 14px;
    display: flex;
    gap: 8px;
    pointer-events: auto;
    z-index: 25;
}

.gear-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 3px 8px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: #94a3b8;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    transition: all 0.15s ease;
}

.gear-pill:hover {
    border-color: var(--duke-yellow);
    color: #fff;
}

.gear-pill.active {
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.gear-meter {
    font-weight: 800;
    color: var(--duke-yellow);
}

/* Night Vision Green Phosphor Screen Overlay */
#nightvision-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 18;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.28) 0%, rgba(5, 46, 22, 0.75) 100%);
    box-shadow: inset 0 0 80px rgba(16, 185, 129, 0.6);
    mix-blend-mode: screen;
}

/* Steroids Adrenaline Pulse Overlay */
#steroids-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 17;
    border: 8px solid rgba(239, 68, 68, 0.8);
    box-shadow: inset 0 0 100px rgba(220, 38, 38, 0.5);
    animation: steroidPulse 0.4s infinite alternate;
}

@keyframes steroidPulse {
    from { opacity: 0.4; }
    to { opacity: 1.0; }
}


/* Diegetic descent readout; gameplay remains visible throughout the lift ride. */
#depth-readout { position:fixed; top:55px; right:20px; z-index:20; color:#67e8f9; font:14px monospace; pointer-events:none; }
#lift-prompt { position:fixed; bottom:180px; left:50%; transform:translateX(-50%); z-index:30; padding:12px 18px; background:#07131bee; border:1px solid #67e8f9; color:#a5f3fc; font:14px monospace; text-align:center; }
#lift-status { position:fixed; left:50%; top:15%; transform:translateX(-50%); z-index:40; width:min(420px,85vw); padding:22px; border:1px solid #67e8f9; background:#07131be8; color:#a5f3fc; font:14px monospace; text-align:center; pointer-events:none; }
#lift-depth { display:block; font-size:42px; margin:16px 0; font-variant-numeric:tabular-nums; }
#lift-destination { line-height:1.5; }

@media (max-width: 650px) {
    #depth-readout {
        top: 104px;
        right: 8px;
        font-size: 12px;
    }
}
