:root {
    --dark-bg: #111;
    --dark-text: #00ff00;
    --light-bg: #ffffff;
    --light-text: #000000;
    --mobile-help-dark-bg: #00ff00;
    --mobile-help-dark-text: #111;
    --mobile-help-light-bg: #007700;
    --mobile-help-light-text: #fff;
}

body {
    background-color: var(--dark-bg);
    font-family: "Courier New", monospace;
    color: var(--dark-text);
}

#banner {
    text-align: center;
    font-weight: bold;
    padding: 0.5em;
    border-bottom: 1px solid rgba(0,255,0,0.3);
}

body.theme-light #banner {
    border-bottom: 1px solid rgba(0,0,0,0.2);
}

#terminal {
    white-space: pre-wrap;
    height: 95vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

#terminal::-webkit-scrollbar {
    width: 8px;
}
#terminal::-webkit-scrollbar-thumb {
    background-color: #00ff00;
}
body.theme-light #terminal::-webkit-scrollbar-thumb {
    background-color: #333;
}

.prompt {
    display: flex;
    align-items: center;
}

.prompt span {
    white-space: nowrap;
}

.prompt input {
    background-color: transparent;
    border: none;
    color: var(--dark-text);
    font: inherit;
    outline: none;
    flex: 1;
    min-width: 0;
    caret-color: var(--dark-text);
}

@keyframes blink-caret {
    from, to { caret-color: transparent }
    50% { caret-color: var(--dark-text); }
}

.prompt input:focus {
    animation: blink-caret 0.75s step-end infinite;
}

body.theme-light {
    background-color: var(--light-bg);
    color: var(--light-text);
}

body.theme-light .prompt input {
    color: var(--light-text);
    caret-color: var(--light-text);
}

@keyframes blink-caret-light {
    from, to { caret-color: transparent }
    50% { caret-color: var(--light-text); }
}

body.theme-light .prompt input:focus {
    animation: blink-caret-light 0.75s step-end infinite;
}

#mobile-help {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--mobile-help-dark-bg);
    color: var(--mobile-help-dark-text);
    font-size: 14px;
    font-weight: bold;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 100;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#mobile-help:focus-visible {
    outline: 2px dashed #00ff00;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    #mobile-help {
        display: block;
    }

    #terminal {
        padding-bottom: 70px;
    }
}

#mobile-help:active {
    background-color: #008800;
}

body.theme-light #mobile-help {
    background-color: var(--mobile-help-light-bg);
    color: var(--mobile-help-light-text);
}

::selection {
    background-color: rgba(0, 255, 0, 0.3);
    color: var(--dark-bg);
}

body.theme-light ::selection {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--light-bg);
}

