/* ── font ── */
@font-face {
    font-family: 'VCR';
    src: url('assets/VCR_OSD_MONO_1.001.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ── reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'VCR', monospace;
    background: #000;
    color: #fff;
    height: 100%;
    overflow: hidden;
}

/* ── fullscreen background layers (crossfade) ── */
.bg-layer {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 2s ease;
}

#bg-a { z-index: 0; opacity: 1; }
#bg-b { z-index: 0; opacity: 0; }

/* dark overlay on whichever is on top */
.bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

/* ── page layout ── */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh;
    height: 100dvh;
    padding: 12px 20px;
}

/* ── top bar ── */
.top-bar {
    text-align: center;
    flex-shrink: 0;
}

.ca-link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 1px;
    word-break: break-all;
    transition: color 0.3s;
}

.ca-link:hover {
    color: #00ff41;
}

.links {
    margin-top: 6px;
    font-size: 16px;
}

.links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.links a:hover {
    color: #00ff41;
}

.sep {
    margin: 0 10px;
    opacity: 0.5;
}

/* ── tv area ── */
.tv-area {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tv-anchor {
    position: relative;
    display: inline-flex;
}

.tv-frame {
    display: block;
    height: 70vh;
    width: auto;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.tv-screen {
    position: absolute;
    z-index: 1;
    overflow: hidden;
    top: 20%;
    left: 20%;
    width: 61%;
    height: 47%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.tv-gif {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* ── mobile ── */
@media (max-width: 600px) {
    .ca-link {
        font-size: 11px;
    }

    .links {
        font-size: 12px;
    }

    .tv-frame {
        height: auto;
        width: 95vw;
    }
}
