/* =========================================================
   CRT TELEVISION / RETRO WEB
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
:root {
    --blue: color(display-p3 0.033 0.051 0.694);
    --lavender: color(display-p3 0.826 0.741 0.851);
    --black: #050505;
    --bezel-dark: #181818;
    --bezel: #3d3d3d;
    --bezel-light: #686868;
    --text-glow:
        0 0 1px var(--lavender),
        0 0 3px
        color(display-p3 0.826 0.741 0.851 / 0.8),
        0 0 8px
        color(display-p3 0.826 0.741 0.851 / 0.25);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--black);
    /* font-family: "Courier New", monospace; */
    font-family: "VT323", monospace;
    color: var(--lavender);
}

.menu,
.footer {
    font-family: "VT323", monospace;
    font-size: 21px;
}

.machine {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--bezel-dark);
    padding: 10px;
    box-shadow:
        /* bezel depth, replaces the old outer drop shadow */
        inset 0 0 12px #000,
        inset 0 0 40px rgba(0, 0, 0, 0.85);
}

.content {
    position: relative;
    flex: 1 1 auto;
    height: calc(100% - 62px);
    display: grid;
    /* padding: clamp(20px, 4vw, 48px); */
    padding: 25px;
    grid-template-columns: 60fr 40fr;
    overflow: hidden;
    background: var(--blue);
    color: var(--lavender);
    border-radius: 18px;
    box-shadow:
        /* very dark edge */
        inset 0 0 18px rgba(0, 0, 0, 0.9),
        /* edge falloff */
        inset 0 0 90px rgba(0, 0, 0, 0.55),
        /* blue phosphor glow */
        inset 0 0 160px
        color(display-p3 0.033 0.051 0.694 / 0.35),
        /* center brightness */
        inset 0 0 260px
        color(display-p3 0.826 0.741 0.851 / 0.06);
}

.main-content {
    min-width: 0;

    padding-right: 30px;

    overflow-y: auto;
}

.sidebar {
    min-width: 0;

    border-left: 1px solid
        color(display-p3 0.826 0.741 0.851 / 0.35);

    padding-left: 15px;

    overflow-y: auto;
}

/* sidebox  */
.side-box {
    margin-bottom: 18px;

    padding-bottom: 12px;

    border-bottom: 1px dashed
        color(display-p3 0.826 0.741 0.851 / 0.35);
}

.side-box h3 {
    margin: 0 0 6px;

    font-family: "VT323", monospace;

    font-size: 18px;

    color: var(--lavender);

    text-shadow: var(--text-glow);
}

.side-box p {
    margin: 3px 0;

    font-family: "VT323", monospace;

    font-size: 17px;

    color: var(--lavender);

    text-shadow: var(--text-glow);
}

.music-row {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 4px;
}

.cd-gif {
    flex: 0 0 auto;

    width: 40px;
    height: 40px;
}

.music-player {
    flex: 1 1 auto;

    min-width: 0;
    width: 130px;

    filter: sepia(1) hue-rotate(200deg) saturate(2.5) brightness(0.9);
}

.guestbook-badge {
    display: block;

    margin-top: 6px;

    width: 80%;
    height: auto;

    image-rendering: pixelated;

    filter: drop-shadow(0 0 2px color(display-p3 0.826 0.741 0.851 / 0.3));

    transition: filter 0.15s ease;
}

.guestbook-badge:hover {
    filter: drop-shadow(0 0 5px color(display-p3 0.826 0.741 0.851 / 0.7));
}

.button-wall {
    display: flex;

    flex-wrap: wrap;

    gap: 4px;

    align-items: flex-start;

    padding: 8px 0;
}

.button-wall img {
    display: block;

    width: 88px;
    height: 31px;

    image-rendering: pixelated;
}
/* sidebox finish */
.machine::before {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    z-index: 2100;
    background:
        radial-gradient(
            ellipse at center,
            transparent 35%,
            rgba(255, 255, 255, 0.015) 55%,
            rgba(0, 0, 0, 0.1) 85%,
            rgba(0, 0, 0, 0.22) 100%
        ),
        radial-gradient(
            ellipse at center,
            rgba(255, 255, 255, 0.045) 0%,
            rgba(255, 255, 255, 0.018) 30%,
            transparent 52%,
            rgba(0, 0, 0, 0.12) 75%,
            rgba(0, 0, 0, 0.42) 100%
        );
    box-shadow:
        inset 0 0 35px rgba(0, 0, 0, 0.4),
        inset 0 0 90px rgba(0, 0, 0, 0.25);
}

.machine::after {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    z-index: 2200;
    background:
        repeating-linear-gradient(
            to bottom,
            color(display-p3 0.826 0.741 0.851 / 0.065)
            0px,
            color(display-p3 0.826 0.741 0.851 / 0.065)
            1px,
            transparent 1px,
            transparent 4px
        );
    opacity: 0.85;
}

.crt-line {
    position: absolute;
    left: 0;
    top: -20px;
    width: 100%;
    height: 4px;
    pointer-events: none;
    z-index: 2400;
    background:
        color(display-p3 0.826 0.741 0.851 / 0.32);
    box-shadow:
        0 0 3px
        color(display-p3 0.826 0.741 0.851 / 0.85),
        0 0 8px
        color(display-p3 0.826 0.741 0.851 / 0.55),
        0 0 18px
        color(display-p3 0.826 0.741 0.851 / 0.30),
        0 0 30px
        color(display-p3 0.826 0.741 0.851 / 0.12);
}

.crt-distortion {
    position: absolute;
    left: 0;
    top: -20px;
    width: 100%;
    height: 16px;
    pointer-events: none;
    z-index: 2300;
    backdrop-filter: blur(1px);
    background:
        linear-gradient(
            to bottom,
            transparent 0%,
            color(display-p3 0.826 0.741 0.851 / 0.025) 35%,
            color(display-p3 0.826 0.741 0.851 / 0.05) 50%,
            color(display-p3 0.826 0.741 0.851 / 0.025) 65%,
            transparent 100%
        );
}

.menu {
    height: 32px;
    flex: 0 0 auto;
    position: relative;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 10px;
    background: var(--lavender);
    color: var(--blue);
    border-bottom: 2px solid var(--blue);
    white-space: nowrap;
    overflow-x: auto;
    cursor: pointer;
}

.menu span:hover {
    background: var(--blue);
    color: var(--lavender);
}

.content p {
    position: relative;
    font-family: "VT323", monospace;
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: 0.3px;
    z-index: 2;
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--lavender);
    text-shadow: var(--text-glow);
}

.footer {
    height: 30px;
    flex: 0 0 auto;
    position: relative;
    z-index: 2000;
    padding: 5px 10px;
    background: var(--lavender);
    color: var(--blue);
    border-top: 2px solid var(--blue);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.title {
    background: var(--lavender);
    color: var(--blue);
    border: 2px outset var(--lavender);
}

::selection {
    background: var(--lavender);
    color: var(--blue);
}
