


@import url('https://fonts.googleapis.com/css2?family=VT323&family=Share+Tech+Mono&display=swap');

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

body {
    background-color: #000;
    color: #0f0;
    font-family: 'Share Tech Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-container {
    width: 800px;
    height: 600px;
    background-color: #111;
    position: relative;
    border: 2px solid #0f0;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    overflow: hidden;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.screen.active {
    display: flex;
}

.terminal {
    width: 90%;
    height: 80%;
    background-color: #000;
    border: 2px solid #0f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.shop-terminal {
    height: 90%;
}

.terminal-header {
    background-color: #0f0;
    color: #000;
    padding: 5px 10px;
    text-align: left;
    font-weight: bold;
}

.terminal-content {
    flex-grow: 1;
    padding: 15px;
    text-align: left;
    overflow-y: auto;
    line-height: 1.5;
}

.shop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.shop-content h2, .shop-content h3 {
    margin-bottom: 15px;
    color: #0f0;
}

#upgrade-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.upgrade-button {
    background-color: #111;
    color: #0f0;
    border: 2px solid #0f0;
    padding: 10px 15px;
    font-size: 1rem;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    width: 150px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upgrade-button:not(.purchased):hover {
    background-color: #0f0;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

.upgrade-button span {
    display: block;
}

.upgrade-button .name {
    font-weight: bold;
    margin-bottom: 5px;
}

.upgrade-button .cost {
    font-size: 0.9rem;
}

.upgrade-button.purchased {
    background-color: #050;
    border-color: #0a0;
    color: #0a0;
    cursor: default;
    box-shadow: none;
    text-decoration: line-through;
}

.terminal-content p {
    margin-bottom: 10px;
    animation: typewriter 0.5s steps(40, end);
}

.shop-content p {
    animation: none;
}

button {
    background-color: #000;
    color: #0f0;
    border: 2px solid #0f0;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s;
    letter-spacing: 2px;
}

button:hover {
    background-color: #0f0;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.8);
}

#shop-screen button {
    margin-top: auto;
}

.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid #0f0;
    z-index: 10;
}

.health-bar {
    width: 200px;
    height: 20px;
    border: 1px solid #0f0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.health-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: #0f0;
    transition: width 0.3s;
}

.health-bar span {
    position: relative;
    z-index: 1;
    text-shadow: 0 0 2px #000;
    font-size: 0.8rem;
}

#game-world {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #111;
    background-image: 
        radial-gradient(circle, rgba(20, 20, 20, 0.9) 1px, transparent 1px),
        radial-gradient(circle, rgba(20, 20, 20, 0.9) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
}

#game-world.mission-style-1 {
    background-color: #111;
    background-image: 
        radial-gradient(circle, rgba(20, 20, 20, 0.9) 1px, transparent 1px),
        radial-gradient(circle, rgba(20, 20, 20, 0.9) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
}

#game-world.mission-style-1 .wall {
    background-color: #333;
}

#game-world.mission-style-2 {
    background-color: #151510; 
    background-image: 
        linear-gradient(0deg, transparent 1px, rgba(30, 30, 30, 0.8) 1px),
        linear-gradient(90deg, transparent 1px, rgba(30, 30, 30, 0.8) 1px);
    background-size: 40px 40px, 40px 40px;
}

#game-world.mission-style-2 .wall {
     background-color: #503030; 
     box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

#game-world.mission-style-3 {
     background-color: #081015; 
     background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 50, 50, 0.7) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(0, 50, 50, 0.7) 1px, transparent 1px);
    background-size: 25px 25px;
}

#game-world.mission-style-3 .wall {
     background-color: #204050; 
     box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

#player {
    width: 30px;
    height: 30px;
    background-color: #0f0;
    position: absolute;
    border-radius: 50%;
    transition: transform 0.1s linear;
    box-shadow: 0 0 10px #0f0;
    z-index: 5;
}

.player .grabber {
    position: absolute;
    width: 15px;
    height: 50px;
    background-color: rgba(0, 255, 0, 0.5);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    z-index: 4;
    pointer-events: none;
}

.item {
    position: absolute;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 3;
    transition: box-shadow 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
}

.item span {
    pointer-events: none;
}

.item:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.entity {
    position: absolute;
    width: 35px;
    height: 35px;
    background-color: #f00;
    border-radius: 10%;
    box-shadow: 0 0 10px #f00;
    z-index: 2;
    transition: left 0.1s linear, top 0.1s linear;
}

#extraction-point {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px dashed #0f0;
    border-radius: 5px;
    animation: pulse 2s infinite;
    z-index: 1;
    background-color: transparent;
    transition: border-color 0.3s, background-color 0.3s;
}

.wall {
    position: absolute;
    background-color: #333; 
    z-index: 2;
}

.controls-info {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(0, 255, 0, 0.7);
}

.push-effect {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(0, 255, 0, 0.2);
    border: 2px solid rgba(0, 255, 0, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 6;
    opacity: 0;
}

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

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes pulse-effect {
    0% {
        transform: translate(-50%, -50%) scale(0.1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

.game-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.05;
}