/* bbs.homes — CRT terminal aesthetic */

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

html, body {
    width: 100%;
    height: 100%;
    background: #111;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
}

/* Desktop: border to simulate old monitor bezel */
@media (min-width: 768px) {
    #terminal {
        position: absolute;
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: 20px;
        border: 2px solid #333;
        border-radius: 6px;
        background: #0a0a0a;
        box-shadow:
            0 0 20px rgba(0, 0, 0, 0.8),
            inset 0 0 40px rgba(0, 0, 0, 0.3);
        overflow: hidden;
    }

    /* Inner area where xterm.js actually renders */
    #terminal-inner {
        position: absolute;
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
        overflow: hidden;
    }

    /* CRT scanline effect */
    #terminal::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        border-radius: 6px;
        background: repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 0, 0, 0.1) 1px,
            rgba(0, 0, 0, 0.1) 2px
        );
        z-index: 1000;
    }

    /* Subtle vignette */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        background: radial-gradient(
            ellipse at center,
            transparent 50%,
            rgba(0, 0, 0, 0.4) 100%
        );
        z-index: 999;
    }
}

/* Mobile: no border, fill entire screen */
@media (max-width: 767px) {
    #terminal {
        width: 100%;
        height: 100%;
        background: #0a0a0a;
    }

    #terminal-inner {
        width: 100%;
        height: 100%;
        padding: 4px;
    }
}

/* Make xterm.js fill its inner container exactly */
#terminal-inner .xterm {
    height: 100%;
    width: 100%;
}

#terminal-inner .xterm-viewport {
    overflow-y: hidden !important;
}
