/* Reset and base styles */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    touch-action: none;
}

/* CRT Canvas */
canvas#crt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;  /* behind everything */
}

/* Fallback navigation (hidden by default) */
#navFallback {
    display: none;
    pointer-events: auto;
    user-select: text;
    z-index: 9999;
}

/* Welcome text container */
#welcomeText {
    font-family: 'Courier New', Courier, monospace;
    position: absolute !important;
    top: 10%; 
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none !important;
}

/* Glow layer */
#welcomeTextGlow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    color: #0f0;
    pointer-events: none;
    filter: blur(0px); /* controlled by JS */
    z-index: 1;
}

/* Actual black text on top */
#welcomeTextContent {
    position: relative;
    z-index: 2;
    color: #000;
}

/* Individual lines inside text content */
#welcomeTextContent .line {
    display: block;
}

#welcomeTextLine1, #welcomeTextLine2, #welcomeTextLine3 {
    margin: 0.3em 0 0 0;
    font-weight: bold;
}

#welcomeTextLine1 {
    font-size: 2em;
}

#welcomeTextLine2 {
    font-size: 2.5em;
}

#welcomeTextLine3 {
    font-size: 1.2em;
}

/* Terminal button */
#terminalButton {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #000;
    color: var(--term-fg, #060);
    border: 2px solid var(--term-fg, #060);
    cursor: pointer;
    visibility: hidden;
    z-index: 20;
}

/* Terminal overlay */
#terminalOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    --term-fg: #0f0;
    --term-bg: rgba(0,0,0,0);
    color: var(--term-fg);
    background: var(--term-bg);
    font-family: monospace;
    display: none;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    z-index: 20;
}

/* Terminal output */
#terminalOutput {
    overflow-y: auto;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 4px;
    box-sizing: border-box;
    pointer-events: auto;
    overscroll-behavior: contain;
}

/* Terminal input wrapper */
#terminalInputWrapper {
    position: relative;
    display: flex;
    align-items: center;
    font-size: inherit !important;
    width: 100%;
}

/* Terminal prompt */
#terminalPrompt {
    margin-right: 4px;
    color: var(--term-fg);
    flex-shrink: 0;
}

/* Terminal input field */
#terminalInput {
    border: none;
    background: #000;
    color: inherit;
    font-family: inherit !important;
    font-size: inherit !important;
    outline: none;
    flex: 1;
    caret-color: var(--term-fg);
}

/* Custom scrollbar for terminal output */
#terminalOutput::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#terminalOutput::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

#terminalOutput::-webkit-scrollbar-thumb {
    background: rgba(0,255,0,0.6);
    border-radius: 8px;
    border: 2px solid rgba(0,0,0,0.3);
}

#terminalOutput::-webkit-scrollbar-thumb:hover {
    background: rgba(0,255,0,0.9);
}

/* Firefox scrollbar */
#terminalOutput {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,0,0.6) rgba(0,0,0,0.3);
}
