#tv-body {
    position: relative;
    background-color: #000;
    font-size: 1rem;
    font-family: IRANSansX;
    color: #ccc;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 100dvh; /* Ensure the body takes up the full viewport height */
}

#tv-body::before {
    position: fixed;
    z-index: -999;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: url('./images/new-back.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    opacity: 1;
    content: '';
}

img {
    display: block;
    width: 100%;
    height: auto;
}

.section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}
.gutter {
    padding-right: 2rem;
    padding-left: 2rem;
}
.wrapper {
    max-width: 100%;
    height: 100dvh !important;
    margin: auto;
}

@media (min-width: 320px) and (max-width: 387px) {

    body::before {
        background-image: url('./images/s-back.jpg');
    }
    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -38%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: -120%;
            right: 0;
            color: whitesmoke;
            font-size: 14px;
        }
        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -5%;
            top: -140%;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 55px;
        max-height: 65px;
        left: 35%;
        top: 85%;
    }

}

@media (min-width: 388px) and (max-width: 500px) {

    body::before {
        background-image: url('./images/480-back.jpg');
    }
    .wrapper {
        max-width: 97%;
    }
    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -44%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: -120%;
            right: 0;
            color: whitesmoke;
            font-size: 1.2rem;
        }
        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -5%;
            top: -150%;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 57px;
        max-height: 67px;
        left: 35%;
        top: 89%;
    }
}

@media (min-width: 501px) and (max-width: 660px) and (orientation: portrait) {
    body::before {
        background-image: url('./images/660-b.jpg');
    }

    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -35%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: -50%;
            right: 0;
            color: whitesmoke;
            font-size: 1.2rem;
        }
        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -5%;
            top: -60%;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 50px;
        max-height: 60px;
        left: 35%;
        top: 85%;
    }
}

/*@media (min-width: 501px) and (max-width: 660px) and (orientation: landscape) {*/
/*    body::before {*/
/*        background-image: url('./images/660-b.jpg');*/
/*    }*/
/*    .wrapper{*/
/*        max-width: 60%;*/
/*    }*/
/*    .gif-tv {*/
/*        position: relative;*/
/*        margin-right: 1rem;*/
/*        margin-left: 1rem;*/
/*        bottom: -8%;*/
/*        object-fit: cover;*/

/*        .cta {*/
/*            position: absolute;*/
/*            top: 20%;*/
/*            right: -35%;*/
/*            color: whitesmoke;*/
/*            font-size: 0.8rem;*/
/*        }*/
/*        .controller{*/
/*            position: fixed;*/
/*            width: 70px;*/
/*            height: 120px;*/
/*            left: -5%;*/
/*            top: -60%;*/
/*            object-fit: cover;*/
/*        }*/
/*    }*/
/*    .desk-controller{*/
/*        max-width: 40px;*/
/*        max-height: 50px;*/
/*        left: 45%;*/
/*        top: 83%;*/
/*    }*/
/*}*/

@media (min-width: 661px) and (max-width: 950px) and (orientation: portrait) {
    body::before {
        background-image: url('./images/768-b.jpg');
    }
    .wrapper {
        max-width: 88%;
    }
    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -35%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: -50%;
            right: 0;
            color: whitesmoke;
            font-size: 1.2rem;
        }

        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -10%;
            top: -85%;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 80px;
        max-height: 90px;
        left: 42%;
        top: 85%;
    }
}

/*@media (min-width: 661px) and (max-width: 950px) and (orientation: landscape) {*/
/*    body::before {*/
/*        background-image: url('./images/915-back.jpg');*/
/*    }*/
/*    .wrapper {*/
/*        max-width: 50%;*/
/*    }*/
/*    .gif-tv {*/
/*        position: relative;*/
/*        margin-right: 1rem;*/
/*        margin-left: 1rem;*/
/*        bottom: -8%;*/
/*        object-fit: cover;*/


/*        .cta {*/
/*            position: absolute;*/
/*            top: 30%;*/
/*            right: -42%;*/
/*            color: whitesmoke;*/
/*            font-size: 0.9rem;*/
/*        }*/
/*        .controller{*/
/*            position: fixed;*/
/*            width: 70px;*/
/*            height: 120px;*/
/*            left: -25%;*/
/*            top: -8%;*/
/*            object-fit: cover;*/
/*        }*/
/*    }*/
/*    .desk-controller{*/
/*        max-width: 40px;*/
/*        max-height: 50px;*/
/*        left: 45%;*/
/*        top: 87%;*/
/*    }*/
/*}*/

@media (min-width: 951px) and (max-width: 1199px)
and (orientation: landscape)  {
    body::before {
        background-image: url('./images/915-back.jpg');
    }
    .wrapper {
        max-width: 56%;
    }

    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -20%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: 35%;
            right: -30%;
            color: whitesmoke;
            font-size: 1rem;
        }

        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -20%;
            top: 0;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 65px;
        max-height: 75px;
        left: 44%;
        top: 83%;
    }
}

@media (min-width: 951px) and (max-width: 1199px)
and (orientation: portrait) {
    body::before {
        background-image: url('./images/1024.jpg');

    }
    .wrapper {
        max-width: 85%;
    }

    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -38%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: -35%;
            right: 0;
            color: whitesmoke;
            font-size: 1.2rem;
        }
        .cta.hidden {
            opacity: 0;
            transform: translateX(-50%) translateY(10px);
        }

        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -5%;
            top: -30%;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 100px;
        max-height: 110px;
        left: 37%;
        top: 81%;
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    body::before {
        background-image: url('./images/1024.jpg');
    }
    .wrapper {
        max-width: 58%;
    }

    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -19%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: 45%;
            right: -20%;
            color: whitesmoke;
            font-size: 1rem;
        }
        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -15%;
            top: 0;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 70px;
        max-height: 80px;
        left: 43%;
        top: 86%;
    }
}

@media (min-width: 1440px) and (max-width: 1919px) {
    body::before {
        background-image: url('./images/new-back.jpg');
    }
    .wrapper {
        max-width: 50%;
    }

    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -22%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: 55%;
            right: -27%;
            color: whitesmoke;
            font-size: 14px;
        }
        .controller{
            position: fixed;
            width: 70px;
            height: 120px;
            left: -15%;
            top: 0;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 70px;
        max-height: 80px;
        left: 45%;
        top: 84%;
    }
}

@media (min-width: 1920px) {
    body::before {
        background-image: url('./images/new-back.jpg');
    }
    .wrapper {
        max-width: 50%;
    }
    .gif-tv {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
        bottom: -22%;
        object-fit: cover;

        .cta {
            position: absolute;
            top: 45%;
            right: -42%;
            color: whitesmoke;
            font-size: 1.2rem;
        }
        .controller{
            position: fixed;
            width: 150px;
            height: 255px;
            left: -23%;
            top: 0;
            object-fit: cover;
        }
    }
    .desk-controller{
        max-width: 110px;
        max-height: 8px;
        left: 44%;
        top: 83%;
    }
}

.viewport {
    position: absolute;
    bottom: 40%;
    right: 20.6%;
    height: 58.5%;
    width: 59.8%;
    z-index: -1;
    overflow: hidden;
    background: black;

    .video {
        z-index: 0;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .pixels {
        z-index: 1;
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        content: '';
    }

    .meta-left,
    .meta-right {
        display: flex;
        flex-flow: column;
        position: absolute;
        z-index: 2;
        top: 0;
        bottom: 0;
        width: 50%;
        padding: 4% 6%;
    }
    .meta-left {
        align-items: flex-start;
        left: 0;
        right: unset;
    }
    .meta-right {
        align-items: flex-end;
        left: unset;
        right: 0;
    }

    .sp {
        text-shadow: 0 0 3px #888;
        font-size: 4rem;
        font-family: IRANSansX;
    }
    .sp:not(.active) {
        display: none;
    }
    .sp.active {
        display: block;
    }
}

.cta{
    transform: translateY(5%);
    text-shadow: 0 2px 8px #999;
    background-color: #5b5b5bb8;
    padding: 5px;
    border-radius: 10%;
    letter-spacing: 1px;
    z-index: 200;
    opacity: 1;
    color: whitesmoke;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;

    .guide {
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: whitesmoke;
        margin: 2% 0;
        font-size: clamp(0.5rem, 1.2vw, 0.9rem);
    }

    .guide ul {
        padding: 0;
        margin: 0.5rem 0;
        list-style: none;
        font-size: clamp(0.5rem, 1vw, 0.8rem);
    }
    .guide img {
        max-width: 18px;
        height: auto;
        vertical-align: middle;
    }
}
.cta.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}
.controller img{
    position: fixed;
    top: 0;
    left: 0;
    object-fit: cover;
}
.controller,
button.dial,
button.dial1,
button.switch,
button.full {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.8);
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
}

.active .controller,
.active button.dial,
.active button.dial1,
.active button.switch,
.active button.full,
.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.desk-controller {
    position: fixed;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    cursor: pointer;
}
.desk-controller img{
    object-fit: cover;
    height: auto;
    animation: glow 2s infinite ease-in-out;
}
.desk-controller.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
button.dial {
    display: block;
    position: fixed;
    left: 24.5%;
    top: 25%;
    padding: 0;
    width: 50%;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    line-height: 0;
    cursor: pointer;
    transition: all 0.17s ease-in-out;
    background-image: url(./images/turn.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 100;

    &:hover,
    &:focus {
        outline: none;
    }

    &:hover {
        background-color: #555564;
    }


    &::before {
        display: block;
        width: 100%;
        padding-top: 100%;
        content: '';
    }
}

button.dial1 {
    display: block;
    position: fixed;
    left: 13%;
    top: 65%;
    padding: 0;
    border-radius: 50%;
    background-color: transparent;
    width: 35%;
    cursor: pointer;
    transition: all 0.17s ease-in-out;
    background-image: url(./images/mute.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 100;

    &:hover,
    &:focus {
        outline: none;
    }

    &:hover {
        background-color: #555564;
    }


    &::before {
        display: block;
        width: 100%;
        padding-top: 100%;
        content: '';
    }
}

button.switch {
    display: block;
    position: fixed;
    padding: 0;
    border-radius: 50%;
    background-color: transparent;
    width: 35%;
    cursor: pointer;
    transition: all 0.17s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 100;

    &:hover,
    &:focus {
        outline: none;
        border: none;
    }

    &:hover {
        background-color: #555564;
    }

    &:active {
        background-color: #555564;
    }

    &::before {
        display: block;
        width: 100%;
        padding-top: 100%;
        content: '';
    }
}

button.full {
    display: block;
    position: fixed;
    left: 54%;
    top: 65%;
    padding: 0;
    border-radius: 50%;
    background-color: transparent;
    width: 35%;
    cursor: pointer;
    transition: all 0.17s ease-in-out;
    background-image: url(./images/full.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 100;

    &:hover,
    &:focus {
        outline: none;
    }

    &:hover {
        background-color: #555564;
    }


    &::before {
        display: block;
        width: 100%;
        padding-top: 100%;
        content: '';
    }
}

button#gif_tv_button_mute { top: 104%; left: 14%; background-image: url(./images/360.png);}
button#gif_tv_button_hd { top: 104%; left: 55%; background-image: url(./images/480.png);}
button#gif_tv_button_hue_shift { top: 127%; left: 14%; background-image: url(./images/720.png);}
button#gif_tv_button_bright { top: 127%; left: 55%; background-image: url(./images/1080.png);}

@keyframes rainbow_barf {
    0% {
        filter: hue-rotate(0deg);
    }
    25% {
        filter: hue-rotate(90deg);
    }
    50% {
        filter: hue-rotate(180deg);
    }
    75% {
        filter: hue-rotate(270deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}
@keyframes glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 248, 220, 0.2))
        drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(255, 248, 220, 0.6))
        drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(255, 248, 220, 0.2))
        drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
    }
}
