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

body {
    font-family: 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #111;
    color: #ddd;
    overflow: hidden;
    position: relative;
    /* ASCII city skyline background */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
        repeating-linear-gradient(
            to right,
            transparent 0px,
            transparent 30px,
            #222 30px,
            #222 60px,
            transparent 60px,
            transparent 90px,
            #333 90px,
            #333 120px,
            #222 120px,
            #222 150px,
            transparent 150px,
            transparent 180px,
            #222 180px,
            #222 210px
        ),
        linear-gradient(
            transparent 0%,
            transparent 70%,
            #222 70%,
            #222 100%
        ),
        linear-gradient(
            to right,
            transparent 0px,
            transparent 40px,
            #333 40px,
            #333 70px,
            transparent 70px,
            transparent 100px,
            #333 100px,
            #333 130px,
            transparent 130px,
            transparent 160px,
            #222 160px,
            #222 190px,
            #333 190px,
            #333 220px
        );
    /* ASCII window pattern for buildings */
    background-size: auto, 240px 100%, 100% 100%, 240px 70%;
    background-position: 0 0, 0 0, 0 0, 20px 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* ASCII building windows pattern */
    background-image: 
        repeating-linear-gradient(
            transparent 0px,
            transparent 18px,
            rgba(255, 255, 150, 0.05) 18px,
            rgba(255, 255, 150, 0.05) 20px
        ),
        repeating-linear-gradient(
            to right,
            transparent 0px,
            transparent 28px,
            rgba(255, 255, 150, 0.05) 28px,
            rgba(255, 255, 150, 0.05) 30px
        );
    opacity: 0.5;
    z-index: 1;
}

body::after {
    content: "│┌┐└┘─┬┴┤├┼   [] () // \\\\ == :: ;; ## $$ %% && ** ++ << >> ^^ || ~~";
    position: fixed;
    bottom: 5%;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(100, 100, 100, 0.15);
    font-size: 40px;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 0;
}

.game-container {
    position: relative;
    width: 95vw;
    max-width: 1000px;
    z-index: 2;
    /* ASCII-style decorative border */
    padding: 20px;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
}

/* ASCII-themed border around the game container */
.game-container::before {
    content: "";
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    border: 2px solid rgba(255, 204, 0, 0.3);
    border-radius: 8px;
    pointer-events: none;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 204, 0, 0.1) 40%, rgba(255, 204, 0, 0.1) 60%, transparent 70%);
    z-index: -1;
}

/* ASCII decorations */
.top-border, .bottom-border, .left-border, .right-border {
    position: absolute;
    color: rgba(255, 204, 0, 0.5);
    font-size: 14px;
    white-space: pre;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

.top-border {
    content: "╔═══════════════════════════════════════════════════════════╗";
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.bottom-border {
    content: "╚═══════════════════════════════════════════════════════════╝";
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.left-border {
    content: "║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║";
    left: -15px;
    top: 20px;
    line-height: 1.5;
}

.right-border {
    content: "║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║\n║";
    right: -15px;
    top: 20px;
    line-height: 1.5;
}

#game-screen {
    width: 100%;
    height: 80vh;
    background-color: #000;
    color: #bbb;
    overflow: hidden;
    white-space: pre;
    font-size: 12px;
    line-height: 1;
    position: relative;
    border: 3px solid #333;
    border-radius: 5px;
    padding: 5px;
    letter-spacing: 0;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.8);
}

.info-panel {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: #111;
    border: 3px solid #333;
    border-top: none;
    border-radius: 0 0 5px 5px;
    font-weight: bold;
    color: #ffcc00;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

.info-panel > div {
    background: rgba(30, 30, 30, 0.6);
    padding: 5px 10px;
    border-radius: 3px;
    border-bottom: 2px solid rgba(255, 204, 0, 0.3);
}

#sound-status {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

#sound-status.sound-on {
    opacity: 1;
    color: #ffcc00;
    text-shadow: 0 0 8px #ffcc00;
}

#sound-status.sound-off {
    opacity: 0.5;
    color: #999;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 10;
    text-shadow: 0 0 10px #ffcc00;
    backdrop-filter: blur(2px);
}

.hidden {
    display: none;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00;
}

pre {
    font-size: 0.7rem;
    line-height: 1.2;
    color: #ffcc00;
    text-shadow: 0 0 8px #ffcc00;
    margin-bottom: 2rem;
    letter-spacing: 0;
    white-space: pre;
    text-align: center;
    transform: scale(0.9);
    max-width: 100%;
    overflow: hidden;
}

p {
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    text-shadow: 0 0 8px #ffcc00;
}

.game-over-text {
    font-size: 0.9rem;
    line-height: 1.2;
    color: #ff6600; /* Orange-red color for game over */
    text-shadow: 0 0 8px #ff3300, 0 0 12px rgba(255, 99, 71, 0.5);
    margin-bottom: 2rem;
    letter-spacing: 0;
    white-space: pre;
    text-align: center;
    transform: scale(1);
    max-width: 100%;
    font-weight: bold;
}

@media (max-width: 1200px) {
    pre {
        font-size: 0.5rem;
        transform: scale(0.8);
    }
    
    .top-border, .bottom-border, .left-border, .right-border {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    #game-screen {
        font-size: 8px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    pre {
        font-size: 0.35rem;
        transform: scale(0.7);
    }
    
    .game-over-text {
        font-size: 0.6rem;
        transform: scale(0.8);
    }
    
    .top-border, .bottom-border, .left-border, .right-border {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    pre {
        font-size: 0.25rem;
        transform: scale(0.6);
    }
    
    .game-over-text {
        font-size: 0.45rem;
        transform: scale(0.7);
    }
    
    .top-border, .bottom-border {
        content: "════════════════";
    }
    
    .left-border, .right-border {
        display: none;
    }
} 