/* ── Reset & Base ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Courier New', 'Lucida Console', 'Monaco', monospace;
    font-size: 15px;
    overflow: hidden;
}

/* ── Terminal Container ── */
#terminal {
    height: 100%;
    padding: 12px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ── Output ── */
#output {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.45;
}

/* ── Input Line ── */
#input-line {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.prompt {
    color: #00ff88;
    white-space: nowrap;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff8844;
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: inherit;
    font-size: inherit;
    caret-color: #00ff88;
    padding: 0;
    margin: 0;
    margin-left: 4px;
}

/* ── Mobile Keyboard Button ── */
#mobile-keyboard-btn {
    display: none;
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1a1a2e;
    border: 2px solid #00ff88;
    font-size: 24px;
    text-align: center;
    line-height: 46px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 0 15px #00ff8844;
}

/* ── Color Classes ── */
.c-red     { color: #ff5555; }
.c-green   { color: #50fa7b; }
.c-yellow  { color: #f1fa8c; }
.c-blue    { color: #6272a4; }
.c-magenta { color: #ff79c6; }
.c-cyan    { color: #8be9fd; }
.c-orange  { color: #ffb86c; }
.c-white   { color: #f8f8f2; }
.c-gray    { color: #6272a4; }
.c-pink    { color: #ff79c6; }
.c-lime    { color: #00ff88; }
.c-gold    { color: #ffd700; }
.c-purple  { color: #bd93f9; }

.bold { font-weight: bold; }
.dim  { opacity: 0.6; }

/* ── ASCII Art / Banner ── */
.banner {
    color: #00ff88;
    text-shadow: 0 0 10px #00ff8855;
    font-weight: bold;
}

/* ── Scanline effect (subtle) ── */
#terminal::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 136, 0.015) 2px,
        rgba(0, 255, 136, 0.015) 4px
    );
    pointer-events: none;
    z-index: 10;
}

/* ── Selection ── */
::selection {
    background: #44475a;
    color: #f8f8f2;
}

/* ── Scrollbar ── */
#terminal::-webkit-scrollbar { width: 8px; }
#terminal::-webkit-scrollbar-track { background: #0a0a0a; }
#terminal::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
#terminal::-webkit-scrollbar-thumb:hover { background: #555; }

/* ── Game Styles ── */
.game-board {
    display: inline-block;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 2px;
}

/* ── Matrix Rain ── */
#matrix-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1000;
    pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    html, body { font-size: 13px; }
    #terminal { padding: 8px; }
    #mobile-keyboard-btn { display: block; }
}

@media (max-width: 400px) {
    html, body { font-size: 12px; }
}
