@font-face {
        font-family: 'Share Tech Mono';
        src: url('../fonts/ShareTechMono-Regular.ttf') format('truetype');
        font-weight: normal;
        font-style: normal;
        font-display: swap;
    }
  
  @font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  
  @font-face {
    font-family: 'Orbitron';
    src: url('../fonts/Orbitron-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }

#netmap {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--terminal-bg);
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    box-shadow: 0 0 15px var(--glow-shadow), inset 0 0 10px rgba(0, 255, 150, 0.1);
}

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

#netmap-title {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 5;
    background-color: rgba(10, 20, 30, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: var(--text-shadow);
    font-size: var(--font-size-medium);
    font-family: var(--game-font);
}

#netmap-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(10, 20, 30, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--secondary-color);
}

#netmap-zoom {
    display: flex;
    gap: 5px;
}

#netmap-zoom button {
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    font-size: var(--font-size-large);
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#netmap-zoom button:hover {
    background-color: rgba(0, 100, 50, 0.3);
}

#netmap-threats {
    color: var(--primary-color);
    font-size: var(--font-size-medium);
    display: flex;
    align-items: center;
}

#threat-count {
    color: var(--warning-color);
    margin-left: 5px;
    font-weight: bold;
}

.map-boundary {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.map-boundary.top, .map-boundary.bottom {
    height: 5px;
    width: 100%;
    left: 0;
}

.map-boundary.left, .map-boundary.right {
    width: 5px;
    height: 100%;
    top: 0;
}

.map-boundary.top {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 50, 50, 0.8), transparent);
}

.map-boundary.bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 50, 50, 0.8), transparent);
}

.map-boundary.left {
    left: 0;
    background: linear-gradient(to right, rgba(255, 50, 50, 0.8), transparent);
}

.map-boundary.right {
    right: 0;
    background: linear-gradient(to left, rgba(255, 50, 50, 0.8), transparent);
}

#netmap-terminal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 500px;
    background-color: rgba(10, 20, 30, 0.95);
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 255, 150, 0.3);
    padding: 15px;
    z-index: 10;
    display: none;
    max-height: 80%;
    overflow-y: auto;
}

#netmap-terminal.active {
    display: block;
}

#netmap-terminal.success {
    background-color: rgba(0, 20, 10, 0.97);
    box-shadow: 0 0 30px rgba(0, 255, 100, 0.5);
    border-color: var(--secondary-color);
}

.success-animation {
    text-align: center;
    margin: 20px 0;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
    stroke-width: 3;
    stroke: var(--secondary-color);
    stroke-miterlimit: 10;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 1s ease-in-out forwards;
}

.checkmark-circle {
    stroke-width: 3;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-miterlimit: 10;
    stroke: var(--secondary-color);
    fill: none;
    animation: dash 0.8s ease-in-out forwards;
}

.checkmark-check {
    stroke-width: 4;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: dash 0.8s ease-in-out 0.3s forwards;
}

@keyframes dash {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

#netmap-terminal-output {
    margin-bottom: 15px;
    font-family: 'Share Tech Mono', monospace;
    color: var(--primary-color);
}

.terminal-header {
    color: var(--secondary-color);
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 5px;
    text-shadow: 0 0 5px var(--secondary-color);
}

.terminal-message {
    margin-bottom: 5px;
    color: var(--accent-color);
}

.terminal-hint {
    margin-bottom: 15px;
    color: var(--warning-color);
    font-style: italic;
    font-size: 1.05em;
    line-height: 1.4;
}

.terminal-success {
    color: var(--secondary-color);
    margin-top: 5px;
}

.terminal-error {
    color: var(--error-color);
    margin-top: 5px;
}

.terminal-reward {
    color: var(--warning-color);
    margin-top: 5px;
    font-weight: bold;
}

#netmap-terminal-input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-color);
    padding: 8px;
    color: var(--primary-color);
    font-family: 'Share Tech Mono', monospace;
    outline: none;
    display: none;
}



#command-display {
    position: relative;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border-left: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

#command-display:hover {
    background-color: rgba(0, 0, 0, 0.3);
    border-left-color: var(--warning-color);
}

#node-tooltip {
    position: absolute;
    background-color: rgba(10, 20, 30, 0.9);
    border: 1px solid var(--secondary-color);
    border-radius: 3px;
    padding: 10px;
    max-width: 250px;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0, 255, 150, 0.2);
    pointer-events: none;
}

.node-name {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 0 5px var(--secondary-color);
}

.node-description {
    color: var(--primary-color);
    font-size: 0.9em;
    margin-bottom: 5px;
}

.node-status {
    color: var(--warning-color);
    font-size: 0.8em;
    margin-top: 5px;
}

#netmap .corner {
    position: absolute;
    width: 15px;
    height: 15px;
    z-index: 2;
}

#netmap .corner-tl {
    top: 0;
    left: 0;
    border-top: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

#netmap .corner-tr {
    top: 0;
    right: 0;
    border-top: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
}

#netmap .corner-bl {
    bottom: 0;
    left: 0;
    border-bottom: 2px solid var(--accent-color);
    border-left: 2px solid var(--accent-color);
}

#netmap .corner-br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid var(--accent-color);
    border-right: 2px solid var(--accent-color);
}

#netmap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        var(--scan-line-color),
        var(--scan-line-color) 2px,
        transparent 2px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0.4;
}

.netmap-game-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--terminal-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 150, 0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.netmap-game-window.port-defender {
    width: 900px;
    height: 700px;
    max-width: 95vw;
    max-height: 90vh;
}

.netmap-game-window.data-encryption {
    width: 800px;
    height: 750px;
    max-width: 90vw;
    max-height: 90vh;
}

.netmap-game-window.bot-hunter {
    width: 900px;
    height: 700px;
    max-width: 90vw;
    max-height: 85vh;
}

.netmap-game-window .window-header {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--secondary-color);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--secondary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    text-shadow: var(--text-shadow);
    cursor: move;
}

.netmap-game-content {
    height: calc(100% - 60px); 
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.game-header {
    padding: 15px 0;
    border-bottom: 1px solid var(--secondary-color);
    margin-bottom: 15px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 150, 0.3);
    min-width: 70px;
    transition: all 0.3s ease;
}

.stat-icon {
    font-size: var(--font-size-base);
    opacity: 0.8;
}

.stat-label {
    font-size: calc(10px * var(--font-scale));
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-value {
    font-size: var(--font-size-medium);
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 255, 150, 0.5);
}

.missed-stat.safe {
    border-color: rgba(0, 255, 150, 0.5);
    background: rgba(0, 50, 25, 0.4);
}

.missed-stat.safe .stat-value {
    color: #00ff96;
}

.missed-stat.warning {
    border-color: rgba(255, 170, 0, 0.5);
    background: rgba(50, 35, 0, 0.4);
}

.missed-stat.warning .stat-value {
    color: #ffaa00;
}

.missed-stat.danger {
    border-color: rgba(255, 50, 50, 0.5);
    background: rgba(50, 10, 10, 0.4);
    animation: dangerPulse 1s infinite alternate;
}

.missed-stat.danger .stat-value {
    color: #ff3333;
}

.game-result-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 400px;
}

.game-success, .game-failure {
    background: rgba(10, 20, 30, 0.95);
    border: 2px solid var(--secondary-color);
    border-radius: 15px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.game-success {
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.1), rgba(0, 200, 80, 0.05));
    box-shadow: 0 0 30px rgba(0, 255, 100, 0.3);
}

.game-failure {
    background: linear-gradient(135deg, rgba(255, 50, 50, 0.1), rgba(200, 0, 0, 0.05));
    border-color: #ff3333;
    box-shadow: 0 0 30px rgba(255, 50, 50, 0.3);
}

.success-animation, .failure-animation {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.success-icon, .failure-icon {
    font-size: 80px;
    display: inline-block;
    margin-bottom: 10px;
}

.success-icon.animated {
    color: var(--secondary-color);
    animation: successPulse 2s ease-in-out infinite;
}

.failure-icon.animated {
    color: #ff3333;
    animation: failureShake 0.5s ease-in-out;
}

.success-content, .failure-content {
    text-align: center;
}

.success-title, .failure-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.success-title {
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(0, 255, 100, 0.5);
}

.failure-title {
    color: #ff3333;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
}

.success-subtitle, .failure-subtitle {
    font-size: var(--font-size-base);
    margin-bottom: 20px;
    opacity: 0.8;
}

.success-subtitle {
    color: var(--primary-color);
}

.failure-subtitle {
    color: #ffaaaa;
}

.success-details {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    padding: 20px;
    background: rgba(0, 255, 100, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 100, 0.2);
}

.score-section, .bonus-section {
    text-align: center;
}

.score-label, .bonus-label {
    font-size: var(--font-size-medium);
    color: var(--primary-color);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-value, .bonus-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
}

.bonus-value {
    color: #00ccff;
}

.success-reward {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 255, 100, 0.08);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.reward-text {
    font-size: var(--font-size-base);
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.reward-subtext {
    font-size: var(--font-size-medium);
    color: var(--primary-color);
    opacity: 0.8;
}

.failure-message {
    font-size: var(--font-size-base);
    color: #ffaaaa;
    margin: 15px 0;
    line-height: 1.5;
}

.failure-warning {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 50, 50, 0.08);
    border-radius: 8px;
    border-left: 4px solid #ff3333;
}

.warning-text {
    font-size: var(--font-size-base);
    color: #ff3333;
    font-weight: bold;
    margin-bottom: 5px;
}

.warning-subtext {
    font-size: var(--font-size-medium);
    color: #ffaaaa;
    opacity: 0.8;
}

.success-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: float 3s linear infinite;
    opacity: 0.7;
}

.failure-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #ff333320 50%, transparent 100%);
    animation: glitchSweep 0.5s ease-in-out;
    pointer-events: none;
}

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

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

.success-score, .time-bonus {
    font-size: var(--font-size-base);
    color: var(--primary-color);
    margin: 5px 0;
}

@keyframes float {
    0% {
        transform: translateY(100%) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100%) scale(1);
        opacity: 0;
    }
}

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

.port-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 12px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.4), rgba(0, 40, 80, 0.2));
    border-radius: 12px;
    border: 1px solid rgba(0, 150, 255, 0.3);
    margin: 15px 0;
    flex-grow: 1;
    min-height: 400px;
    box-shadow: inset 0 0 20px rgba(0, 100, 200, 0.1);
}

.port-cell {
    background: linear-gradient(135deg, rgba(0, 80, 160, 0.2), rgba(0, 40, 80, 0.4));
    border: 2px solid rgba(0, 150, 255, 0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    min-height: 80px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.port-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 150, 255, 0.3);
    border-color: rgba(0, 200, 255, 0.6);
}

.port-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.port-number {
    font-size: var(--font-size-medium);
    font-weight: bold;
    color: #66ccff;
    font-family: 'Share Tech Mono', monospace;
    text-shadow: 0 0 5px rgba(102, 204, 255, 0.5);
}

.port-status {
    font-size: var(--font-size-small);
    color: #00ff88;
    transition: all 0.3s ease;
}

.port-service {
    font-size: calc(10px * var(--font-scale));
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-family: 'Share Tech Mono', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 2px 0;
}

.port-indicator {
    text-align: center;
    font-size: calc(9px * var(--font-scale));
    min-height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.port-cell.scanning-port {
    background: linear-gradient(135deg, rgba(255, 50, 50, 0.8), rgba(200, 0, 0, 0.6));
    border-color: #ff3333;
    box-shadow: 0 0 20px rgba(255, 50, 50, 0.8), inset 0 0 10px rgba(255, 100, 100, 0.3);
    animation: scanningPulse 0.8s infinite;
    transform: scale(1.05);
}

.port-cell.scanning-port .port-status {
    color: #ff3333;
    animation: dangerBlink 0.5s infinite;
}

.scan-progress {
    background: linear-gradient(90deg, #ff3333, #ff6666);
    height: 3px;
    border-radius: 2px;
    animation: scanProgressFill 3s linear;
}

.port-cell.blocked-port {
    background: linear-gradient(135deg, rgba(0, 255, 150, 0.7), rgba(0, 200, 100, 0.5));
    border-color: #00ff96;
    box-shadow: 0 0 20px rgba(0, 255, 150, 0.6);
    animation: blockSuccess 0.6s ease-out;
}

.port-cell.blocked-port .port-status {
    color: #00ff96;
    filter: drop-shadow(0 0 5px rgba(0, 255, 150, 0.8));
}

.block-success {
    color: #00ff96;
    font-weight: bold;
    text-transform: uppercase;
    animation: successPop 0.5s ease-out;
    text-shadow: 0 0 8px rgba(0, 255, 150, 0.8);
}

.port-cell.compromised-port {
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.8), rgba(200, 50, 0, 0.6));
    border-color: #ff6600;
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.8);
    animation: compromiseShake 0.8s ease-out;
}

.port-cell.compromised-port .port-status {
    color: #ff6600;
    animation: warningFlash 0.3s infinite;
}

.compromise-warning {
    color: #ff6600;
    font-weight: bold;
    text-transform: uppercase;
    animation: warningPulse 0.5s ease-out;
    text-shadow: 0 0 8px rgba(255, 100, 0, 0.8);
}

.port-cell.bomb-port {
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.95), rgba(20, 20, 20, 0.9));
    border-color: #666666;
    box-shadow: 0 0 25px rgba(100, 100, 100, 0.8), inset 0 0 12px rgba(80, 80, 80, 0.4);
    animation: bombPulse 0.4s infinite alternate;
    transform: scale(1.08);
}

.port-cell.bomb-port .port-status {
    color: #ffffff;
    animation: bombBlink 0.3s infinite alternate;
    font-size: var(--font-size-large);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.bomb-scan-progress {
    background: linear-gradient(90deg, #666666, #999999, #666666);
    height: 4px;
    border-radius: 2px;
    animation: bombProgressFill 0.5s linear infinite;
    box-shadow: 0 0 10px rgba(150, 150, 150, 0.8);
}

.port-cell.exploded-port {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.95), rgba(150, 0, 0, 0.8));
    border-color: #ff0000;
    box-shadow: 0 0 40px rgba(255, 0, 0, 1), inset 0 0 15px rgba(255, 50, 50, 0.6);
    animation: explosionShake 0.15s infinite;
    transform: scale(1.15);
}

.port-cell.exploded-port .port-status {
    color: #ffffff;
    font-size: 22px;
    animation: explosionFlash 0.1s infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 1));
}

.explosion-effect {
    background: linear-gradient(90deg, #ff0000, #ff6600, #ff0000);
    color: #ffffff;
    font-weight: bold;
    font-size: calc(9px * var(--font-scale));
    text-transform: uppercase;
    animation: explosionText 0.2s infinite alternate;
    text-shadow: 0 0 8px rgba(255, 0, 0, 1);
    border-radius: 2px;
    padding: 1px 3px;
}

@keyframes scanningPulse {
    0%, 100% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 50, 50, 0.8);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(255, 50, 50, 1), inset 0 0 15px rgba(255, 100, 100, 0.5);
    }
}

@keyframes dangerBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

@keyframes scanProgressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes blockSuccess {
    0% { 
        transform: scale(1.2);
        box-shadow: 0 0 20px rgba(0, 255, 150, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 35px rgba(0, 255, 150, 1);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 150, 0.6);
    }
}

@keyframes successPop {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes compromiseShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

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

@keyframes warningPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes bombPulse {
    0% { 
        transform: scale(1.08);
        box-shadow: 0 0 25px rgba(100, 100, 100, 0.9);
    }
    100% { 
        transform: scale(1.15);
        box-shadow: 0 0 35px rgba(150, 150, 150, 1), inset 0 0 15px rgba(120, 120, 120, 0.6);
    }
}

@keyframes bombBlink {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(1.3); }
}

@keyframes bombProgressFill {
    0% { 
        background: linear-gradient(90deg, #666666, #999999, #666666);
        transform: translateX(-100%);
    }
    100% { 
        background: linear-gradient(90deg, #999999, #bbbbbb, #999999);
        transform: translateX(100%);
    }
}

@keyframes explosionShake {
    0% { transform: scale(1.15) translateX(0) rotate(0deg); }
    25% { transform: scale(1.18) translateX(-2px) rotate(-1deg); }
    50% { transform: scale(1.15) translateX(2px) rotate(1deg); }
    75% { transform: scale(1.18) translateX(-1px) rotate(-0.5deg); }
    100% { transform: scale(1.15) translateX(1px) rotate(0.5deg); }
}

@keyframes explosionFlash {
    0% { opacity: 1; filter: drop-shadow(0 0 10px rgba(255, 0, 0, 1)); }
    100% { opacity: 0.3; filter: drop-shadow(0 0 20px rgba(255, 0, 0, 1)); }
}

@keyframes explosionText {
    0% { 
        transform: scale(1);
        text-shadow: 0 0 8px rgba(255, 0, 0, 1);
    }
    100% { 
        transform: scale(1.1);
        text-shadow: 0 0 15px rgba(255, 0, 0, 1), 0 0 25px rgba(255, 100, 0, 0.8);
    }
}

@keyframes dangerPulse {
    0% { box-shadow: 0 0 5px rgba(255, 50, 50, 0.3); }
    100% { box-shadow: 0 0 15px rgba(255, 50, 50, 0.8); }
}

.data-repair-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    height: calc(100% - 70px);
}

.repair-instructions {
    background: rgba(0, 40, 60, 0.8);
    border: 1px solid rgba(0, 150, 255, 0.4);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    flex-shrink: 0;
}

.instruction-text {
    color: var(--primary-color);
    font-size: calc(13px * var(--font-scale));
    font-weight: 500;
    letter-spacing: 0.5px;
}

.corrupted-files-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background-color: rgba(50, 20, 20, 0.4);
    border-radius: 6px;
    border: 1px dashed rgba(255, 100, 100, 0.4);
    min-height: 120px;
}

.corrupted-file {
    background: linear-gradient(135deg, rgba(60, 20, 20, 0.8), rgba(80, 10, 10, 0.6));
    border: 1px solid rgba(255, 80, 80, 0.6);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 90px;
    max-width: 90px;
    text-align: center;
    position: relative;
    animation: corruptionFlicker 2s infinite alternate;
}

.corrupted-file:hover {
    background: linear-gradient(135deg, rgba(80, 30, 30, 0.9), rgba(100, 20, 20, 0.7));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 80, 80, 0.4);
}

.corrupted-file:active {
    transform: translateY(0px) scale(0.98);
    transition: transform 0.1s ease;
}



.corrupted-file.selected {
    border-color: rgba(0, 255, 150, 0.8);
    box-shadow: 0 0 15px rgba(0, 255, 150, 0.5);
    background: linear-gradient(135deg, rgba(0, 60, 30, 0.8), rgba(0, 80, 40, 0.6));
}

.file-corruption {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: var(--font-size-small);
    animation: corruptionBounce 1s infinite;
}

.file-icon {
    font-size: var(--font-size-large);
    margin-bottom: 5px;
}

.file-name {
    font-size: calc(11px * var(--font-scale));
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 3px;
    font-family: 'Share Tech Mono', monospace;
}

.file-size {
    font-size: calc(9px * var(--font-scale));
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
}

.corruption-level {
    margin-top: 5px;
}

.corruption-bar {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

.corruption-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffaa00, #ff3333);
    transition: width 0.3s ease;
    animation: corruptionPulse 1.5s infinite alternate;
}

.repair-slots-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
    background-color: rgba(0, 30, 20, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 150, 0.3);
    flex: 1;
    min-height: 240px;
}

.repair-slot {
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.6), rgba(0, 40, 60, 0.4));
    border: 2px dashed rgba(0, 255, 150, 0.4);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    height: 110px;
    display: flex;
    flex-direction: column;
}

.repair-slot:hover {
    background: linear-gradient(135deg, rgba(0, 40, 80, 0.7), rgba(0, 60, 100, 0.5));
    border-color: var(--primary-color);
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 255, 150, 0.4);
}

.repair-slot:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.repair-slot.correct {
    background: linear-gradient(135deg, rgba(0, 60, 30, 0.8), rgba(0, 80, 40, 0.6));
    border-color: #00ff88;
    animation: correctPulse 0.6s ease;
}

.repair-slot.incorrect {
    background: linear-gradient(135deg, rgba(60, 20, 20, 0.8), rgba(80, 10, 10, 0.6));
    border-color: #ff4444;
    animation: incorrectShake 0.6s ease;
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.slot-number {
    font-size: calc(10px * var(--font-scale));
    font-weight: bold;
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 255, 150, 0.3);
}

.slot-status {
    font-size: var(--font-size-small);
}

.slot-label {
    font-size: calc(11px * var(--font-scale));
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 2px;
    font-family: 'Share Tech Mono', monospace;
}

.slot-description {
    font-size: calc(8px * var(--font-scale));
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.slot-drop-zone {
    flex: 1;
    border: 1px dashed rgba(0, 255, 150, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slot-drop-zone .corrupted-file {
    cursor: pointer;
    position: relative;
}

.slot-drop-zone .corrupted-file:hover::after {
    content: "Double-click to remove";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: calc(8px * var(--font-scale));
    white-space: nowrap;
    z-index: 1000;
}

.drop-hint {
    font-size: calc(9px * var(--font-scale));
    color: rgba(255, 255, 255, 0.5);
}

@keyframes corruptionFlicker {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

@keyframes corruptionBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes corruptionPulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

.memory-forensics-area {
    display: flex;
    gap: 15px;
    padding: 10px;
    height: calc(100% - 70px);
}

.game-instructions {
    background: linear-gradient(135deg, #1a472a, #2d5a3d);
    border: 2px solid #4ade80;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.instruction-title {
    color: #4ade80;
    font-weight: bold;
    font-size: var(--font-size-base);
    margin-bottom: 8px;
    text-align: center;
}

.instruction-text {
    color: #86efac;
    font-size: var(--font-size-small);
    line-height: 1.4;
    text-align: left;
}

.hex-editor {
    flex: 2;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 150, 0.3);
    border-radius: 8px;
    overflow: hidden;
    font-family: 'Share Tech Mono', monospace;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hex-header {
    display: flex;
    background: rgba(0, 255, 150, 0.1);
    border-bottom: 1px solid rgba(0, 255, 150, 0.3);
    font-weight: bold;
    font-size: calc(11px * var(--font-scale));
    color: var(--primary-color);
}

.offset-column {
    width: 100px;
    padding: 8px 10px;
    text-align: center;
    border-right: 1px solid rgba(0, 255, 150, 0.2);
}

.hex-column {
    flex: 1;
    padding: 8px 10px;
    text-align: center;
    border-right: 1px solid rgba(0, 255, 150, 0.2);
}

.ascii-column {
    width: 150px;
    padding: 8px 10px;
    text-align: center;
}

.hex-content {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.hex-row {
    display: flex;
    align-items: center;
    font-size: calc(12px * var(--font-scale));
    line-height: 20px;
    border-bottom: 1px solid rgba(0, 255, 150, 0.1);
}

.hex-row:hover {
    background: rgba(0, 255, 150, 0.05);
}

.offset {
    width: 100px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 2px 10px;
    border-right: 1px solid rgba(0, 255, 150, 0.1);
}

.hex-data {
    flex: 1;
    display: flex;
    gap: 2px;
    padding: 2px 10px;
    border-right: 1px solid rgba(0, 255, 150, 0.1);
    flex-wrap: wrap;
}

.hex-byte {
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    color: #ffffff;
    user-select: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: calc(13px * var(--font-scale));
}

.hex-byte:hover {
    background: rgba(0, 255, 150, 0.2);
    color: var(--primary-color);
}

.hex-byte.selected {
    background: rgba(255, 200, 0, 0.8);
    color: #000;
    font-weight: bold;
}

.ascii-data {
    width: 150px;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Share Tech Mono', monospace;
    padding: 4px 12px;
    text-align: left;
    font-size: calc(12px * var(--font-scale));
}

.signatures-panel {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 150, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.panel-title {
    background: rgba(0, 255, 150, 0.1);
    padding: 10px 15px;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(0, 255, 150, 0.3);
    text-align: center;
}

.signatures-list {
    padding: 10px;
    height: calc(100% - 50px);
    overflow-y: auto;
}

.signature-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 150, 0.2);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.signature-item:hover {
    border-color: rgba(0, 255, 150, 0.4);
    background: rgba(0, 255, 150, 0.05);
}

.signature-item.found {
    border-color: rgba(0, 255, 100, 0.6);
    background: rgba(0, 255, 100, 0.1);
}

.sig-name {
    font-weight: bold;
    color: var(--primary-color);
    font-size: calc(13px * var(--font-scale));
    margin-bottom: 6px;
}

.sig-pattern-label {
    font-size: calc(10px * var(--font-scale));
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3px;
    font-weight: bold;
}

.sig-pattern {
    font-family: 'Share Tech Mono', monospace;
    font-size: calc(16px * var(--font-scale));
    color: #ffff00;
    font-weight: 700;
    word-break: break-all;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 0, 0.35);
}

.sig-description {
    font-size: calc(10px * var(--font-scale));
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.sig-status {
    font-size: calc(10px * var(--font-scale));
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    text-align: center;
}

.signature-item .sig-status {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

.signature-item.found .sig-status {
    background: rgba(0, 255, 100, 0.2);
    color: #00ff66;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}