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

html, body {
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* TV
   Native frame is ~730x530. The screen cutout location is expressed
   as percentages of the frame so the image behind scales with it.
   Adjust --screen-* values to align with the actual transparent area
   in tv.png. */
.tv-container {
    position: relative;
    width: min(90vw, 730px);
    aspect-ratio: 730 / 530;

    --screen-top: 10%;
    --screen-left: 9%;
    --screen-width: 70%;
    --screen-height: 70%;
}

.tv-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.screen-image {
    position: absolute;
    top: var(--screen-top);
    left: var(--screen-left);
    width: var(--screen-width);
    height: var(--screen-height);
    object-fit: fill;
    z-index: 1;
    display: block;
}

.screen-hitbox {
    position: absolute;
    top: var(--screen-top);
    left: var(--screen-left);
    width: var(--screen-width);
    height: var(--screen-height);
    z-index: 3;
    cursor: default;
}

.screen-hitbox.clickable {
    cursor: pointer;
}

/* Remote
   --button-* positions the clickable hotspot over the red button on
   remote.png. Tweak to match your asset. */
.remote-container {
    position: absolute;
    bottom: 2vh;
    right: 2vw;
    width: min(30vw, 180px);
    aspect-ratio: 1167 / 1144;

    --button-top: 24%;
    --button-left: 41%;
    --button-width: 20%;
    --button-height: 18%;
}

.remote {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.remote-button {
    position: absolute;
    top: var(--button-top);
    left: var(--button-left);
    width: var(--button-width);
    height: var(--button-height);
    cursor: pointer;
    border-radius: 50%;
}

@media (max-width: 600px) {
    .tv-container {
        width: 95vw;
    }
    .remote-container {
        width: 25vw;
    }
}

.fun-back {
    position: fixed;
    top: 14px;
    left: 16px;
    z-index: 10;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font: 12px/1 -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.04em;
    padding: 6px 8px;
}
.fun-back:hover {
    color: rgba(255, 255, 255, 0.9);
}
