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

body {
    overflow: hidden;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000;
}

.background-container {
    position: relative;
    width: 100vw;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1299px;
    max-height: 768px;
}

.background-image {
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
}

/* TV Screen Overlay - positioned over the black screen area */
.tv-screen {
    position: absolute;
    top: 25%;
    width: 35%;
    height: 50%;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    background-color: #000;
    display: flex;
    justify-content: center;
}

.tv-screen-hit {
    position: absolute;
    top: 25%;
    width: 35%;
    height: 50%;
    cursor: pointer;
    z-index: 4;
    /* above background and screen, below dial */
    pointer-events: none;
    /* enabled in JS when poster shows */
    background: transparent;
}

#staticCanvas {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    inset: 0;
}

#posterImage {
    inset: 0;
    width: auto;
    height: 100%;
    object-fit: contain;
    display: none;
    animation: posterPulse 3s ease-in-out infinite;
    transition: filter 0.25s ease, outline 0.2s ease, outline-offset 0.2s ease;
}

#trailerContainer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
}

#trailerContainer iframe,
#trailerContainer video {
    width: 100%;
    height: 100%;
    border: none;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes posterPulse {
    0% {
        transform: scale(1);
        filter: saturate(1);
    }

    50% {
        transform: scale(1.03);
        filter: saturate(1.12);
    }

    100% {
        transform: scale(1);
        filter: saturate(1);
    }
}

.poster-glow {
    filter: saturate(1.2);
    outline: 5px solid rgba(0, 200, 255, 0.9);

}

/* TV Dial - positioned over the dial on the right side */
.tv-dial {
    position: absolute;
    /* Approximate position - adjust as needed */
    top: 30%;
    right: 21.75%;
    width: 6.5%;
    height: 11.5%;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(150, 150, 150, 0.3);
    border: 2px solid rgba(200, 200, 200, 0.5);
    z-index: 3;
    box-shadow:
        0 0 12px rgba(0, 200, 255, 0.4),
        0 0 24px rgba(0, 200, 255, 0.25),
        0 0 36px rgba(0, 200, 255, 0.15);
    transition: box-shadow 0.2s ease, background 0.2s ease;
    animation: dialPulse 1.8s ease-in-out infinite;
}

.tv-dial:hover {
    background: rgba(150, 150, 150, 0.5);
    box-shadow:
        0 0 20px rgba(0, 200, 255, 0.7),
        0 0 40px rgba(0, 200, 255, 0.5),
        0 0 60px rgba(0, 200, 255, 0.3);
}

@keyframes dialPulse {
    0% {
        background: rgba(150, 150, 150, 0.30);
        box-shadow:
            0 0 12px rgba(0, 200, 255, 0.35),
            0 0 24px rgba(0, 200, 255, 0.20),
            0 0 36px rgba(0, 200, 255, 0.10);
    }

    50% {
        background: rgba(150, 150, 150, 0.45);
        box-shadow:
            0 0 28px rgba(0, 200, 255, 0.75),
            0 0 48px rgba(0, 200, 255, 0.55),
            0 0 72px rgba(0, 200, 255, 0.35);
    }

    100% {
        background: rgba(150, 150, 150, 0.30);
        box-shadow:
            0 0 12px rgba(0, 200, 255, 0.35),
            0 0 24px rgba(0, 200, 255, 0.20),
            0 0 36px rgba(0, 200, 255, 0.10);
    }
}

.overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.overlay.show {
    display: flex;
}

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.overlay-content {
    position: relative;
    z-index: 11;
    background: rgba(10, 10, 10, 0.9);
    color: #f2f2f2;
    padding: 24px 28px 28px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    max-width: 420px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #f2f2f2;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}

.overlay-close:hover {
    color: #fff;
}

.overlay-text {
    font-size: 16px;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
    color: #dcdcdc;
}

.overlay-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    text-decoration: none;
}

.overlay-title:hover {
    text-decoration: underline;
}

.overlay-year {
    display: block;
    font-size: 16px;
    margin-bottom: 14px;
    color: #b6b6b6;
    text-decoration: none;
}

.overlay-year:hover {
    text-decoration: underline;
}

.overlay-poster-link {
    display: block;
    text-decoration: none;
}

.overlay-poster {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.overlay-sources-label {
    margin-top: 14px;
    font-size: 14px;
    color: #dcdcdc;
    letter-spacing: 0.2px;
    display: none;
}

.overlay-sources {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.overlay-source-link {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px;
}

.overlay-source-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.overlay-source-icon {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.overlay-source-price {
    font-size: 11px;
    color: #dcdcdc;
    line-height: 1.2;
}