/* --- Global Box Sizing Reset --- */
*, *:before, *:after {
    box-sizing: border-box;
}

/* --- Core Terminal Styles --- */
body {
    background-color: #000b00;
    color: #00ff41;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 10px; 
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.6);
    /* overflow-x: hidden; <-- Kept, but it shouldn't be forced to work as hard now */
    overflow-x: hidden; 
}

.terminal-container {
    border: 1px solid #00ff41;
    padding: 15px;
    min-height: 95vh;
    width: 100%; /* Ensures it respects the body padding */
    box-shadow: inset 0 0 15px rgba(0, 255, 65, 0.2);
    /* Allows inner content to dictate height on mobile if necessary */
    display: flex; 
    flex-direction: column;
}

/* --- Responsive ASCII Header --- */
.ascii-header {
    font-size: 1.5vw;
    line-height: 1.1;
    margin-bottom: 20px;
    display: block;
    overflow-x: hidden;
    text-align: center;
}

/* --- Mobile-Friendly Navigation --- */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

nav a {
    color: #00ff41;
    text-decoration: none;
    border: 1px solid #00ff41;
    padding: 5px 10px;
    font-size: 0.9em;
    display: inline-block;
}

nav a:hover {
    background: #00ff41;
    color: #000;
}

/* --- MEDIA QUERIES FOR MOBILE --- */
@media (max-width: 768px) {
    .ascii-header {
        font-size: 2.2vw;
    }

    body {
        padding: 5px; /* Tighter margins for mobile screens */
    }

    .terminal-container {
        padding: 10px;
        min-height: calc(100vh - 10px); /* accounts for the body padding */
    }

    @media (max-width: 480px) {
        .ascii-header {
            font-size: 3.5vw; 
        }
        nav {
            flex-direction: column;
            align-items: stretch;
        }
        nav a {
            text-align: center;
        }
    }
}