:root {
    --primary-color: #0ff;
    --secondary-color: #ff00ff;
    --background-color: #111;
    --text-color: #ddd;
    --border-color: #0ff;
    --error-color: #ff0033;
    --success-color: #00ff66;
    --highlight-color: #ffcc00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Source Code Pro', monospace;
    line-height: 1.6;
    overflow: hidden;
    /* the grid picture (../assets/grid-bg.png) never existed; the gradient is what has always shown (25 Oct 2026) */
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
}

#game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #000;
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
}

.screen {
    display: none;
    width: 100%;
    margin: 0 auto;
}

.screen.active {
    display: block;
}

/* Title Screen */
#title-screen {
    text-align: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 20px var(--primary-color);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 20px var(--primary-color); }
    50% { box-shadow: 0 0 40px var(--secondary-color); }
    100% { box-shadow: 0 0 20px var(--primary-color); }
}

#title-screen h1 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 4rem;
    margin-bottom: 10px;
    letter-spacing: 5px;
    color: var(--primary-color);
    text-shadow: 3px 3px 0 var(--secondary-color);
}

#title-screen h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--text-color);
}

.intro-text {
    margin-bottom: 40px;
}

.button-container {
    margin-bottom: 20px;
}

.main-btn, .secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    margin: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 5px var(--primary-color);
}

.main-btn:hover, .secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.glitch-btn {
    position: relative;
    overflow: hidden;
}

.glitch-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

.glitch-btn:hover:before {
    left: 100%;
}

.glitch-text {
    position: relative;
    display: inline-block;
    animation: glitch 1s infinite;
}

@keyframes glitch {
    0% { transform: translateX(0); }
    5% { transform: translateX(-2px); }
    10% { transform: translateX(2px); }
    15% { transform: translateX(-2px); }
    20% { transform: translateX(0); }
    100% { transform: translateX(0); }
}

#checkpoint-input {
    margin-top: 20px;
}

#checkpoint-input input {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px;
    font-family: 'Source Code Pro', monospace;
    width: 250px;
}

.hidden {
    display: none;
}

/* Game Screen */
#game-screen {
    display: flex;
    flex-direction: column;
    height: 90vh;
    border: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.85);
}

#hud {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Share Tech Mono', monospace;
    color: var(--primary-color);
}

#game-text-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 1.1rem;
}

#game-text {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    margin-bottom: 10px;
    scroll-behavior: smooth;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    white-space: pre-wrap;
    color: #00ff00;
    background-color: #000;
    border: 1px solid #00ff00;
}

#game-text p {
    margin-bottom: 15px;
}

#input-area {
    display: flex;
    align-items: center;
    padding: 5px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
}

#command-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 5px;
}

.command-prompt {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

#command-prompt {
    color: var(--primary-color);
    margin-right: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

#command-input {
    flex: 1;
    background-color: #001122;
    color: #00ccff;
    border: 2px solid #00ccff;
    padding: 8px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    outline: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

#command-input:focus {
    border-color: #00ff00;
}

#options-container {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.option-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 5px 15px;
    font-family: 'Source Code Pro', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.option-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Special Text Formatting */
.term {
    color: var(--highlight-color);
    font-weight: bold;
}

.error {
    color: var(--error-color);
}

.success {
    color: var(--success-color);
}

.command {
    color: #00ccff;
    font-weight: bold;
    margin-bottom: 10px;
}

.error {
    color: #ff0000;
    font-weight: bold;
}

.term {
    color: #ffff00;
    font-family: 'Courier New', monospace;
}

pre.term {
    background-color: #000;
    padding: 15px;
    border: 1px solid #00ff00;
    margin: 10px 0;
    white-space: pre-wrap;
}

/* Terminal Styling */
#status-bar {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    background-color: #000;
    border: 1px solid #00ff00;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

#location-display {
    font-weight: bold;
}

#access-codes {
    color: #ffff00;
}

.command-prompt {
    color: #00ff00;
    margin-right: 5px;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Terminal effects */
.startup-text {
    animation: typing 0.1s steps(1) infinite;
    color: #00ff00;
}

@keyframes typing {
    50% { color: transparent; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    background-color: #000;
}

::-webkit-scrollbar-thumb {
    background-color: #00ff00;
    border: 1px solid #000;
}

::-webkit-scrollbar-track {
    background-color: #000;
    border: 1px solid #00ff00;
}

/* Responsive Design */
@media (max-width: 768px) {
    #title-screen h1 {
        font-size: 3rem;
    }
    
    #title-screen h2 {
        font-size: 1.2rem;
    }
    
    .main-btn, .secondary-btn {
        font-size: 1rem;
        padding: 8px 15px;
    }
    
    #game-text-container {
        font-size: 1rem;
    }
}
