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

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

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-center h1 {
    font-size: 2.5em;
    margin-bottom: 1em;
    text-shadow: 0 0 10px #0f0;
}

.text-center p {
    font-size: 1.2em;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    text-align: center;
    padding: 2em;
    border: 2px solid #0f0;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.login-box h1 {
    margin-bottom: 1em;
    font-size: 2em;
}

.login-box p {
    margin-bottom: 1.5em;
    font-size: 1.1em;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: center;
}

#password-input {
    background-color: #000;
    border: 2px solid #0f0;
    color: #0f0;
    padding: 0.8em 1em;
    font-size: 1.1em;
    font-family: 'Courier New', monospace;
    width: 300px;
    outline: none;
}

#password-input:focus {
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

#login-form button {
    background-color: #000;
    border: 2px solid #0f0;
    color: #0f0;
    padding: 0.8em 2em;
    font-size: 1.1em;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

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

.error-message {
    color: #f00;
    margin-top: 1em;
    min-height: 1.5em;
    text-shadow: 0 0 5px #f00;
}

/* Game Page */
.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2em;
}

.game-content {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.scene-text {
    font-size: 1.3em;
    line-height: 1.8;
    text-align: center;
    min-height: 200px;
    max-height: 60vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2em;
    border: 1px solid #0f0;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    color: #0f0;
    opacity: 1;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar styling for scene-text */
.scene-text::-webkit-scrollbar {
    width: 8px;
}

.scene-text::-webkit-scrollbar-track {
    background: #000;
    border-radius: 4px;
}

.scene-text::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 4px;
}

.scene-text::-webkit-scrollbar-thumb:hover {
    background: #0ff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.scene-prompt {
    font-size: 1.2em;
    text-align: center;
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
    animation: fadeIn 0.5s ease-in;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 0.5em;
    justify-content: center;
    flex-wrap: wrap;
}

.prompt-arrow {
    font-size: 1.5em;
    color: #0f0;
}

#command-input {
    background-color: #000;
    border: none;
    border-bottom: 2px solid #0f0;
    color: #0f0;
    padding: 0.5em;
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    flex: 1;
    min-width: 200px;
    max-width: 500px;
    outline: none;
    transition: border-color 0.3s;
}

#command-input:focus {
    border-bottom-color: #0ff;
    box-shadow: 0 2px 5px rgba(0, 255, 255, 0.3);
}

.submit-button {
    background-color: #000;
    border: 2px solid #0f0;
    color: #0f0;
    padding: 0.5em 1.5em;
    font-size: 1.2em;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

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

.submit-button:active:not(:disabled) {
    transform: scale(0.95);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
    color: #555;
}

.error-text {
    color: #f00;
    text-align: center;
    min-height: 1.5em;
    text-shadow: 0 0 5px #f00;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing animation for text */
.typing {
    overflow: hidden;
    border-right: 2px solid #0f0;
    white-space: nowrap;
    animation: typing 2s steps(40, end), blink-caret 0.75s step-end infinite;
}

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #0f0; }
}

/* Responsive */
@media (max-width: 768px) {
    .scene-text {
        font-size: 1em;
        padding: 1.5em;
        max-height: 50vh;
    }
    
    .scene-prompt {
        font-size: 1em;
    }
    
    #command-input {
        font-size: 1em;
        min-width: 150px;
        max-width: 100%;
    }
    
    .submit-button {
        font-size: 1em;
        padding: 0.5em 1em;
    }
    
    .input-container {
        flex-direction: column;
        gap: 0.8em;
    }
    
    .input-container .prompt-arrow {
        display: none;
    }
    
    .help-button {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.3em;
    }
    
    .help-content {
        padding: 1.5em;
        max-width: 95%;
    }
    
    .help-content h2 {
        font-size: 1.5em;
    }
    
    .help-content h3 {
        font-size: 1.1em;
    }
}

/* Help Button */
.help-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #000;
    border: 2px solid #0f0;
    color: #0f0;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 1000;
    font-family: 'Courier New', monospace;
}

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

/* Help Modal */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-in;
}

.help-content {
    background-color: #000;
    border: 2px solid #0f0;
    border-radius: 5px;
    padding: 2em;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.help-content h2 {
    color: #0f0;
    margin-bottom: 1em;
    font-size: 1.8em;
    text-shadow: 0 0 10px #0f0;
}

.help-content h3 {
    color: #0ff;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 1.3em;
}

.help-content p {
    color: #0f0;
    line-height: 1.6;
    margin-bottom: 1em;
}

.help-content ul {
    color: #0f0;
    line-height: 1.8;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.help-content li {
    margin-bottom: 0.5em;
}

.help-content strong {
    color: #0ff;
    text-shadow: 0 0 5px #0ff;
}

.close-help {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #0f0;
    font-size: 2em;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.close-help:hover {
    color: #f00;
    text-shadow: 0 0 10px #f00;
    transform: scale(1.2);
}

/* Custom scrollbar for help modal */
.help-content::-webkit-scrollbar {
    width: 8px;
}

.help-content::-webkit-scrollbar-track {
    background: #000;
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb:hover {
    background: #0ff;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

