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

body {
    background: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
    cursor: crosshair;
}

/* Scanline effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 255, 0, 0) 50%,
        rgba(0, 255, 0, 0.05) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1000;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* CRT flicker */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 0, 0.02);
    pointer-events: none;
    z-index: 999;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(ellipse at center, #001a33 0%, #000000 100%);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* HUD Container */
.hud {
    position: fixed;
    z-index: 10;
    padding: 15px;
    border: 2px solid #00ff00;
    background: rgba(0, 20, 0, 0.85);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    font-size: 11px;
    line-height: 1.4;
    text-shadow: 0 0 5px #00ff00;
}

.hud-top-left {
    top: 20px;
    left: 20px;
    min-width: 250px;
}

.hud-top-right {
    top: 20px;
    right: 20px;
    min-width: 220px;
}

.hud-bottom-left {
    bottom: 20px;
    left: 20px;
    min-width: 300px;
}

.hud-bottom-right {
    bottom: 20px;
    right: 20px;
    min-width: 220px;
}

.hud-center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 250px;
    max-width: 250px;
    max-height: 400px;
    border: none;
    box-shadow: none;
}

.console-title {
    color: #00ffff;
    font-size: 13px;
    margin-bottom: 5px;
    text-shadow: 0 0 5px #00ffff;
    font-family: 'Courier New', monospace;
}

.console-divider {
    height: 1px;
    background: rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
    box-shadow: 0 0 3px rgba(0, 255, 255, 0.5);
}

.console-output {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    line-height: 1.4;
    color: #00ff00;
    height: 300px;
    overflow-y: hidden;
    overflow-x: hidden;
    padding: 5px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    margin-top: 8px;
    text-shadow: 0 0 3px #00ff00;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    word-break: break-all;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, transparent 100%);
}

.console-line {
    margin: 2px 0;
    opacity: 0;
    animation: fadeInLine 0.3s forwards;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
}

@keyframes fadeInLine {
    to { opacity: 1; }
}

.console-timestamp {
    color: #00ffff;
    opacity: 0.7;
    margin-right: 5px;
}

.console-warning {
    color: #ffff00;
}

.console-alert {
    color: #ff0000;
}

.console-data {
    color: #00ffff;
}

.hud h3 {
    color: #00ffff;
    margin-bottom: 8px;
    font-size: 13px;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 3px;
}

.hud-line {
    margin: 3px 0;
}

.status-ok {
    color: #00ff00;
}

.status-warn {
    color: #ffff00;
}

.status-alert {
    color: #ff0000;
    animation: blink 1s infinite;
}

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

.data-value {
    color: #00ffff;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #003300;
    margin: 5px 0;
    border: 1px solid #00ff00;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #00ff00;
    box-shadow: 0 0 5px #00ff00;
    transition: width 0.3s;
}

.trace-bar {
    background: #330000;
    border-color: #ff0000;
}

.trace-fill {
    background: #ff0000;
    box-shadow: 0 0 5px #ff0000;
}

/* Crosshair */
.crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 100;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: rgba(0, 255, 0, 0.5);
}

.crosshair::before {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.crosshair::after {
    height: 2px;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.crosshair.locked::before,
.crosshair.locked::after {
    background: rgba(255, 0, 0, 0.8);
    box-shadow: 0 0 10px #ff0000;
}

/* Connection Loading Screen - Matrix Style */
.connection-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    overflow: hidden;
}

.connection-screen.hidden {
    display: none;
}

/* Matrix code rain canvas */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
}

/* Animated corner frames */
.corner-frame {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8),
                inset 0 0 20px rgba(0, 255, 0, 0.3);
}

.corner-tl {
    top: 30px;
    left: 30px;
    border-right: none;
    border-bottom: none;
    animation: cornerPulse 2s ease-in-out infinite, cornerExpand 3s ease-out forwards;
}

.corner-tr {
    top: 30px;
    right: 30px;
    border-left: none;
    border-bottom: none;
    animation: cornerPulse 2s ease-in-out infinite 0.5s, cornerExpand 3s ease-out forwards 0.5s;
}

.corner-bl {
    bottom: 30px;
    left: 30px;
    border-right: none;
    border-top: none;
    animation: cornerPulse 2s ease-in-out infinite 1s, cornerExpand 3s ease-out forwards 1s;
}

.corner-br {
    bottom: 30px;
    right: 30px;
    border-left: none;
    border-top: none;
    animation: cornerPulse 2s ease-in-out infinite 1.5s, cornerExpand 3s ease-out forwards 1.5s;
}

@keyframes cornerPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.8),
                    inset 0 0 20px rgba(0, 255, 0, 0.3);
        border-color: #00ff00;
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 0, 1),
                    inset 0 0 40px rgba(0, 255, 0, 0.5);
        border-color: #00ffff;
    }
}

@keyframes cornerExpand {
    0% {
        width: 100px;
        height: 100px;
    }
    100% {
        width: 200px;
        height: 200px;
    }
}

/* Orbiting loading circles */
.loading-circles {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-circle {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 255, 0, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 0, 1),
                0 0 40px rgba(0, 255, 0, 0.5);
}

.circle-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: orbitCircle1 3s linear infinite;
}

.circle-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation: orbitCircle2 3s linear infinite;
}

.circle-3 {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: orbitCircle3 3s linear infinite;
}

.circle-4 {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    animation: orbitCircle4 3s linear infinite;
}

@keyframes orbitCircle1 {
    0% { top: 0; left: 50%; transform: translate(-50%, 0); }
    25% { top: 50%; right: 0; left: auto; transform: translate(0, -50%); }
    50% { bottom: 0; top: auto; left: 50%; right: auto; transform: translate(-50%, 0); }
    75% { top: 50%; left: 0; bottom: auto; transform: translate(0, -50%); }
    100% { top: 0; left: 50%; transform: translate(-50%, 0); }
}

@keyframes orbitCircle2 {
    0% { top: 50%; right: 0; transform: translate(0, -50%); }
    25% { bottom: 0; top: auto; left: 50%; right: auto; transform: translate(-50%, 0); }
    50% { top: 50%; left: 0; bottom: auto; right: auto; transform: translate(0, -50%); }
    75% { top: 0; left: 50%; transform: translate(-50%, 0); }
    100% { top: 50%; right: 0; left: auto; top: 50%; transform: translate(0, -50%); }
}

@keyframes orbitCircle3 {
    0% { bottom: 0; left: 50%; transform: translate(-50%, 0); }
    25% { top: 50%; left: 0; bottom: auto; transform: translate(0, -50%); }
    50% { top: 0; left: 50%; transform: translate(-50%, 0); }
    75% { top: 50%; right: 0; left: auto; transform: translate(0, -50%); }
    100% { bottom: 0; top: auto; left: 50%; right: auto; transform: translate(-50%, 0); }
}

@keyframes orbitCircle4 {
    0% { top: 50%; left: 0; transform: translate(0, -50%); }
    25% { top: 0; left: 50%; transform: translate(-50%, 0); }
    50% { top: 50%; right: 0; left: auto; transform: translate(0, -50%); }
    75% { bottom: 0; top: auto; left: 50%; right: auto; transform: translate(-50%, 0); }
    100% { top: 50%; left: 0; bottom: auto; transform: translate(0, -50%); }
}

/* Connection content - Matrix style */
.connection-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 800px;
    gap: 40px;
}

/* Bright green progress bar */
.progress-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.progress-bar-loading {
    height: 100%;
    background: #00ff00;
    width: 0%;
    box-shadow: 0 0 20px #00ff00,
                0 0 40px #00ff00,
                inset 0 0 10px rgba(255, 255, 255, 0.3);
    transition: width 0.05s linear;
}

/* Large Matrix-style console text with green banding */
.matrix-console-text {
    font-size: 48px;
    font-weight: bold;
    color: #00ff00;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 8px;
    text-shadow: 
        0 0 10px #00ff00,
        0 0 20px #00ff00,
        0 0 30px #00ff00,
        0 0 40px #00ff00;
    position: relative;
    z-index: 10;
    animation: matrixTextFlicker 0.15s infinite;
    padding: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Green screen banding effect overlay */
.matrix-console-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.05) 0px,
        rgba(0, 255, 0, 0.05) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    animation: bandingScroll 0.5s linear infinite;
    z-index: 1;
}

@keyframes matrixTextFlicker {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    25% {
        opacity: 0.98;
        filter: brightness(1.1);
    }
    50% {
        opacity: 0.95;
        filter: brightness(1.2);
    }
    75% {
        opacity: 0.98;
        filter: brightness(1.1);
    }
}

@keyframes bandingScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* White flash effect */
.white-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-out;
}

.white-flash.active {
    opacity: 1;
    animation: whiteFlash 0.3s ease-out;
}

@keyframes whiteFlash {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.connection-console {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    padding: 15px;
    font-size: 12px;
    line-height: 1.6;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.connection-line {
    margin: 3px 0;
    opacity: 0;
    animation: fadeInConsole 0.3s forwards;
}

@keyframes fadeInConsole {
    to { opacity: 1; }
}

.connection-line.success {
    color: #00ff00;
}

.connection-line.warning {
    color: #ffff00;
}

.connection-line.info {
    color: #00ffff;
}

.connection-line.error {
    color: #ff0000;
}

/* Welcome Terminal Screen */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    overflow: hidden;
}

.intro-screen.hidden {
    display: none;
}

.ascii-container {
    font-size: 16px;
    line-height: 1;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 2px;
    white-space: pre;
    margin-bottom: 60px;
    animation: glitchPulse 3s ease-in-out infinite;
}

@keyframes glitchPulse {
    0%, 100% { 
        text-shadow: 0 0 10px #00ff00;
        opacity: 1;
    }
    50% { 
        text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00;
        opacity: 0.95;
    }
}

.jack-in-button {
    padding: 15px 40px;
    background: rgba(0, 20, 0, 0.8);
    border: 2px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    cursor: pointer;
    text-shadow: 0 0 10px #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3),
                inset 0 0 20px rgba(0, 255, 0, 0.1);
    transition: all 0.3s;
    animation: buttonPulse 2s ease-in-out infinite;
    margin-bottom: 40px;
    display: none;
    opacity: 0;
}

.jack-in-button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.6),
                inset 0 0 30px rgba(0, 255, 0, 0.2);
    transform: scale(1.05);
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3),
                    inset 0 0 20px rgba(0, 255, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.5),
                    inset 0 0 30px rgba(0, 255, 0, 0.15);
    }
}

.intro-disclaimer {
    position: absolute;
    bottom: 30px;
    font-size: 11px;
    color: #00ff00;
    opacity: 0.6;
    text-align: center;
    padding: 0 20px;
}

/* About link styling */
.about-link {
    color: #00ff00;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.about-link:hover {
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff;
    transform: scale(1.05);
    opacity: 1;
}

/* About Modal */
.about-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
}

.about-modal.hidden {
    display: none;
}

.about-modal-content {
    background: rgba(0, 20, 0, 0.95);
    border: 3px solid #00ff00;
    box-shadow: 
        0 0 40px rgba(0, 255, 0, 0.8),
        inset 0 0 40px rgba(0, 255, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.about-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #00ff00;
    padding-bottom: 15px;
}

.about-modal-header h2 {
    color: #00ffff;
    font-size: 24px;
    text-shadow: 0 0 20px #00ffff;
    letter-spacing: 4px;
    margin: 0;
}

.about-modal-close {
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    font-size: 28px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    text-shadow: 0 0 10px #00ff00;
}

.about-modal-close:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
    transform: scale(1.1);
}

.about-modal-body {
    color: #00ff00;
    font-size: 14px;
    line-height: 1.8;
    text-shadow: 0 0 5px #00ff00;
}

.about-modal-body p {
    margin-bottom: 20px;
}

.about-modal-body em {
    color: #00ffff;
    font-style: italic;
    text-shadow: 0 0 10px #00ffff;
}

.about-modal-body strong {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 10px #00ffff;
}

.about-book-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline;
}

.about-modal-body em .about-book-link,
.about-modal-body strong .about-book-link {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.about-book-link:hover {
    text-shadow: 
        0 0 15px #00ffff,
        0 0 25px #00ffff,
        0 0 35px #00ffff;
    transform: scale(1.05);
    display: inline-block;
}

.about-signature {
    text-align: right;
    margin-top: 30px;
    font-style: italic;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

/* Welcome Terminal Screen */
.welcome-terminal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    padding: 40px;
    box-sizing: border-box;
    overflow: hidden;
}

.welcome-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
}

.welcome-terminal.hidden {
    display: none;
}

.terminal-content {
    max-width: 900px;
    width: 100%;
    font-size: 16px;
    line-height: 2;
    text-shadow: 0 0 8px #00ff00;
    z-index: 1;
}

.terminal-content .cyan {
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
}

.terminal-content .green {
    color: #00ff00;
    text-shadow: 0 0 8px #00ff00;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 30px;
    font-size: 18px;
    z-index: 1;
}

.terminal-prompt {
    color: #00ffff;
    margin-right: 10px;
    font-size: 18px;
    text-shadow: 0 0 10px #00ffff;
    font-weight: bold;
}

.terminal-cursor {
    display: inline-block;
    width: 12px;
    height: 20px;
    background: #00ff00;
    margin-left: 5px;
    animation: blinkCursor 0.8s infinite;
    box-shadow: 0 0 10px #00ff00;
}

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

.terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    outline: none;
    flex: 1;
    text-shadow: 0 0 8px #00ff00;
    min-width: 200px;
}

.terminal-instruction {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    font-size: 18px;
    margin-top: 20px;
    font-weight: bold;
}

/* Mission briefing */
.mission-briefing {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;
    background: rgba(0, 20, 0, 0.95);
    border: 3px solid #00ff00;
    padding: 30px;
    max-width: 600px;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.5);
    text-align: center;
}

.mission-title {
    color: #00ffff;
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #00ffff;
    letter-spacing: 3px;
}

.mission-text {
    color: #00ff00;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

.mission-button {
    background: transparent;
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 10px 30px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    text-shadow: 0 0 5px #00ff00;
    transition: all 0.3s;
}

.mission-button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.briefing-button {
    background: transparent;
    border: 2px solid #00ffff;
    color: #00ffff;
    padding: 8px 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    text-shadow: 0 0 5px #00ffff;
    transition: all 0.3s;
    margin-top: 10px;
    width: 100%;
}

.briefing-button:hover {
    background: rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.abort-button {
    background: transparent;
    border: 2px solid #ff0000;
    color: #ff0000;
    padding: 12px 40px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 10px #ff0000;
    transition: all 0.3s;
    margin-top: 20px;
    letter-spacing: 2px;
}

.abort-button:hover {
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    transform: scale(1.05);
}

/* Hack interface overlay */
.hack-interface {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 400;
    display: none;
}

.hack-interface.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hack-title {
    color: #00ffff;
    font-size: 28px;
    margin-bottom: 10px;
    text-shadow: 0 0 20px #00ffff;
    letter-spacing: 4px;
}

.hack-subtitle {
    color: #00ff00;
    font-size: 14px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.memory-cell {
    width: 80px;
    height: 80px;
    background: rgba(0, 50, 50, 0.5);
    border: 2px solid #00ffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 10px #00ffff;
}

.memory-cell:hover {
    background: rgba(0, 100, 100, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.memory-cell.highlight {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
    animation: pulse 0.5s;
}

.memory-cell.correct {
    background: rgba(0, 255, 0, 0.3);
    border-color: #00ff00;
    color: #00ff00;
}

.memory-cell.wrong {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    color: #ff0000;
    animation: shake 0.3s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.hack-timer {
    color: #ffff00;
    font-size: 24px;
    margin-bottom: 20px;
}

.hack-timer.critical {
    color: #ff0000;
    animation: blink 0.5s infinite;
}

.hack-status {
    color: #00ff00;
    font-size: 16px;
    min-height: 30px;
}

/* Success/Fail messages */
.result-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 600;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 0 30px;
    animation: fadeInOut 2s forwards;
    pointer-events: none;
}

.result-message.success {
    color: #00ff00;
    text-shadow: 0 0 30px #00ff00;
}

.result-message.fail {
    color: #ff0000;
    text-shadow: 0 0 30px #ff0000;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

.hidden {
    display: none !important;
}

/* Circuit Tracing styles */
.circuit-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 600px;
    max-width: 90vw;
}

.circuit-node {
    width: 60px;
    height: 60px;
    background: rgba(0, 50, 50, 0.5);
    border: 2px solid #00ffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 10px #00ffff;
    position: relative;
}

.circuit-node:hover {
    background: rgba(0, 100, 100, 0.7);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.circuit-node.start {
    border-color: #00ff00;
    color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.circuit-node.end {
    border-color: #ff00ff;
    color: #ff00ff;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.circuit-node.selected {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.8);
}

.circuit-node.connected {
    background: rgba(0, 255, 0, 0.3);
    border-color: #00ff00;
}

.circuit-node.wrong {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    animation: shake 0.3s;
}

.circuit-connection {
    position: absolute;
    background: rgba(0, 255, 255, 0.5);
    pointer-events: none;
    z-index: -1;
}

/* ICE Dodging styles */
.ice-arena {
    position: relative;
    width: 600px;
    height: 400px;
    max-width: 90vw;
    max-height: 60vh;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    margin-bottom: 30px;
    overflow: hidden;
    cursor: crosshair;
}

.ice-barrier {
    position: absolute;
    background: rgba(255, 0, 0, 0.8);
    border: 2px solid #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    cursor: pointer;
    transition: all 0.1s;
    pointer-events: auto;
    z-index: 1000;
    user-select: none;
    -webkit-user-select: none;
}

.ice-barrier:hover {
    box-shadow: 0 0 30px rgba(255, 0, 0, 1);
}

.ice-barrier.destroyed {
    opacity: 0;
    transform: scale(1.5);
    transition: all 0.3s;
}

/* Instructions */
.instructions {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    color: #00ff00;
    font-size: 11px;
    opacity: 0.6;
    text-align: center;
}

/* Data Ticker */
.data-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.075);
    border-top: 1px solid rgba(0, 255, 0, 0.075);
    overflow: hidden;
    z-index: 5;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    color: rgba(0, 255, 0, 0.2);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    animation: scrollTicker 200s linear infinite;
    padding-left: 100%;
}

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

/* Round indicator styles */
.round-indicator.active {
    background: rgba(0, 255, 255, 0.3) !important;
    border-color: #00ffff !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8) !important;
    opacity: 1 !important;
    transform: scale(1.1);
}

.round-indicator.complete {
    background: rgba(0, 255, 0, 0.3) !important;
    border-color: #00ff00 !important;
    color: #00ff00 !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8) !important;
    opacity: 1 !important;
}

.round-indicator.complete::after {
    content: '✓';
    position: absolute;
    font-size: 32px;
    color: #00ff00;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile Widget Toggle Buttons */
.mobile-widget-toggle {
    display: none;
    position: fixed;
    z-index: 200;
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    cursor: pointer;
    text-shadow: 0 0 5px #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    transition: all 0.3s;
    min-width: 60px;
    text-align: center;
}

.mobile-widget-toggle:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.mobile-widget-toggle.active {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8);
}

/* Mobile breakpoint: screens smaller than 768px */
/* Target List Styling */
#target-list {
    font-family: 'Courier New', monospace;
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    padding: 15px;
    border-radius: 4px;
}

#target-list h3 {
    color: #00ffff;
    font-size: 14px;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px #00ffff;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 5px;
}

#target-list-content {
    max-height: 350px;
    overflow-y: auto;
}

#target-list-content::-webkit-scrollbar {
    width: 6px;
}

#target-list-content::-webkit-scrollbar-track {
    background: rgba(0, 50, 50, 0.3);
}

#target-list-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.5);
    border-radius: 3px;
}

#target-list-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.8);
}

@media screen and (max-width: 768px) {
    /* Connection screen mobile adjustments - Matrix style */
    .connection-content {
        width: 95%;
        gap: 30px;
    }
    
    .progress-container {
        height: 6px;
    }
    
    .matrix-console-text {
        font-size: 28px;
        letter-spacing: 4px;
        padding: 15px;
        min-height: 80px;
    }
    
    /* Intro screen mobile adjustments */
    .ascii-container {
        font-size: 8px;
        letter-spacing: 1px;
        margin-bottom: 40px;
        max-width: 90vw;
        overflow: hidden;
    }
    
    .jack-in-button {
        font-size: 14px;
        padding: 12px 30px;
    }
    
    .intro-disclaimer {
        font-size: 9px;
        bottom: 20px;
    }
    
    .about-modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .about-modal-header h2 {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .about-modal-body {
        font-size: 12px;
    }
    
    /* Show mobile toggle buttons */
    .mobile-widget-toggle {
        display: block;
    }

    /* Make all HUD widgets very small by default on mobile */
    .hud {
        padding: 5px;
        font-size: 7px;
        line-height: 1.2;
        border-width: 1px;
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.2),
                    inset 0 0 10px rgba(0, 255, 0, 0.05);
    }

    .hud-top-left {
        top: 5px;
        left: 5px;
        min-width: 120px;
        max-width: 150px;
        transform: scale(0.6);
        transform-origin: top left;
    }

    .hud-top-right {
        top: 5px;
        right: 5px;
        min-width: 120px;
        max-width: 150px;
        transform: scale(0.6);
        transform-origin: top right;
    }

    .hud-bottom-left {
        bottom: 5px;
        left: 5px;
        min-width: 150px;
        max-width: 180px;
        transform: scale(0.6);
        transform-origin: bottom left;
    }

    .hud-bottom-right {
        bottom: 5px;
        right: 5px;
        min-width: 120px;
        max-width: 150px;
        transform: scale(0.6);
        transform-origin: bottom right;
    }

    .hud-center-left {
        top: 50%;
        left: 5px;
        transform: translateY(-50%) scale(0.6);
        transform-origin: left center;
        width: 140px;
        max-width: 140px;
        max-height: 220px;
    }

    /* Hide console by default on mobile, show when toggled */
    .hud-center-left {
        display: none;
    }

    .hud-center-left.mobile-visible {
        display: block;
    }

    /* Make HUD headings smaller */
    .hud h3 {
        font-size: 8px;
        margin-bottom: 3px;
        padding-bottom: 2px;
    }

    .hud-line {
        margin: 1px 0;
        font-size: 7px;
    }

    .console-title {
        font-size: 8px;
    }

    .console-output {
        font-size: 8px;
        height: 180px;
        padding: 5px;
    }

    .console-line {
        margin: 1px 0;
    }

    /* Progress bars smaller */
    .progress-bar {
        height: 3px;
        margin: 2px 0;
    }

    /* Instructions smaller and repositioned */
    .instructions {
        bottom: 35px;
        font-size: 8px;
        padding: 0 10px;
    }

    /* Hide data ticker by default on mobile, show when toggled */
    .data-ticker {
        height: 25px;
        display: none;
    }

    .ticker-content {
        font-size: 10px;
    }

    .data-ticker.mobile-visible {
        display: flex;
    }

    /* Mobile toggle button positions */
    .mobile-toggle-console {
        top: 5px;
        left: 50%;
        transform: translateX(-50%);
    }

    .mobile-toggle-ticker {
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Mission briefing adjustments */
    .mission-briefing {
        max-width: 95vw;
        padding: 20px;
    }

    .mission-title {
        font-size: 18px;
    }

    .mission-text {
        font-size: 11px;
    }

    /* Hack interface adjustments */
    .hack-title {
        font-size: 20px;
    }

    .hack-subtitle {
        font-size: 12px;
    }

    .memory-grid {
        gap: 8px;
    }

    .memory-cell {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .circuit-grid {
        gap: 10px;
    }

    .circuit-node {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .ice-arena {
        width: 95vw;
        height: 50vh;
    }
    
    /* Hide target list on mobile (or make it smaller/toggleable) */
    #target-list {
        display: none !important; /* Hide on mobile to save space */
    }
}

/* Extra small mobile devices (phones in portrait) */
@media screen and (max-width: 480px) {
    /* Connection screen - extra small */
    .matrix-console-text {
        font-size: 20px;
        letter-spacing: 2px;
        padding: 10px;
        min-height: 60px;
    }
    
    .progress-container {
        height: 5px;
    }
    
    /* Intro screen adjustments */
    .ascii-container {
        font-size: 6px;
        letter-spacing: 0.5px;
        margin-bottom: 30px;
    }
    
    .jack-in-button {
        font-size: 12px;
        padding: 10px 25px;
    }
    
    .intro-disclaimer {
        font-size: 8px;
    }
    
    .about-modal-content {
        padding: 15px;
    }
    
    .about-modal-header h2 {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .about-modal-body {
        font-size: 11px;
    }
    
    /* Scale down slightly for very small screens but still visible */
    .hud-top-left,
    .hud-top-right,
    .hud-bottom-left,
    .hud-bottom-right {
        transform: scale(0.5);
    }

    .hud-center-left {
        transform: translateY(-50%) scale(0.5);
    }

    /* Smaller toggle buttons */
    .mobile-widget-toggle {
        padding: 6px 10px;
        font-size: 9px;
        min-width: 50px;
    }
}