/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

/* Overall page styling */
body {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Page title */
h1 {
    color: #4ec9b0;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
}

    h1:focus {
        outline: none;
    }

/* Game menu (when not playing) */
.game-menu {
    text-align: center;
    margin-top: 50px;
}

    .game-menu p {
        margin-bottom: 20px;
        font-size: 1.2em;
    }

/* Start button */
.start-button {
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Consolas', monospace;
    background-color: #2d2d30;
    color: #4ec9b0;
    border: 2px solid #4ec9b0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .start-button:hover {
        background-color: #4ec9b0;
        color: #1e1e1e;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(78, 201, 176, 0.4);
    }

/* Console window (the terminal-like box) */
.console-window {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 20px;
    outline: none;
}

    .console-window:focus {
        outline: none;
    }

/* The actual console pre/code block */
pre.console {
    white-space: pre; /* Don't wrap text - terminal has fixed width */
    line-height: 1.1em; /* Tight line spacing like a real terminal */
    overflow: hidden; /* No scrollbar - terminal scrolls by shifting rows */
    margin: 0;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 16px;
}

/* Wrapper for inline-block console display */
.padding-0 {
    padding: 0 !important;
}

/* Remove focus outline on all elements */
:focus {
    outline: none;
}

/* Cursor styles - matches dotnet-console-games */
.cursor {
    display: inline-block;
}

.cursor-light::after {
    content: "";
    width: 1ch;
    height: 0.5ch;
    animation: blinking 1s step-start infinite;
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    display: flex;
    transform: translateY(-0.5ch);
}

.cursor-dark::after {
    content: "";
    width: 1ch;
    height: 0.5ch;
    animation: blinking 1s step-start infinite;
    background-color: rgba(0, 0, 0, 0.8);
    position: absolute;
    display: flex;
    transform: translateY(-0.5ch);
}

@keyframes blinking {
    50% {
        opacity: 0;
    }
}

/* Alert boxes */
.alert {
    width: fit-content;
    margin-top: 1rem;
}

/* Background and text colors for inline-block console wrapper */
.bg-dark {
    background-color: #0c0c0c !important;
}

.text-light {
    color: #d4d4d4 !important;
}

.text-start {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.border {
    border: 2px solid #4ec9b0 !important;
}

.p-2 {
    padding: 1rem !important;
}

.shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.my-3 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

.d-inline-block {
    display: inline-block !important;
}

/* Alert styling */
.alert-secondary {
    background-color: #2d2d30;
    border: 1px solid #4ec9b0;
    border-radius: 5px;
    padding: 1rem;
    color: #d4d4d4;
}

/* Center the console window */
.text-center {
    text-align: center !important;
}

/* Container for alert boxes */
.alert-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Make alerts display inline */
.alert-secondary {
    background-color: #2d2d30;
    border: 1px solid #4ec9b0;
    border-radius: 5px;
    padding: 1rem;
    color: #d4d4d4;
    flex: 0 1 auto; /* Don't grow, can shrink */
    max-width: 400px; /* Limit width */
}