@font-face {
    font-family: Rodin Pro;
    src: url(../fonts/FOT-Rodin\ Pro\ DB.otf);
    font-weight: 600;
}

@font-face {
    font-family: Rodin Pro;
    font-weight: 700;
    src: url(../fonts/FOT-Rodin\ Pro\ B.otf);
}

@font-face {
    font-family: clock;
    src: url('../fonts/DSEG7Classic-Bold.ttf');
}

html,
body {
    cursor: url('../wiicursor.png') 16 16, auto !important;
}

body {
    margin: 0;
    background: linear-gradient(#f1f1f1 30%, #E3E3E3 40%);
    background-size: 56.57px 0.85vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

body::after {
    content: '';
    aspect-ratio: 16 / 9;
    height: 100vh;
    background: linear-gradient(to right, #f3f3f300, #F3F3F3 40% 60%, #f3f3f300);
}

.container {
    display: flex;
    justify-content: center;
    background: rgba(255, 0, 0, 0);
    width: 1600px;
    height: 900px;
    aspect-ratio: 16 / 9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.grid {
    margin-top: 75px;
    width: 1330px;
    height: 555px;
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    transition: opacity 0.5s ease-in-out;
}

.itemcontainer {
    position: relative;
}

.itemcontainer::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url(../channel-select.svg);
    opacity: 0;
    scale: 0.93;
    transition: scale 0.3s linear, opacity 0.3s linear;
}

#main iframe {
    position: absolute;
    border: unset;
    z-index: 7;
    pointer-events: auto;
    scale: 1.05;
    transition: opacity 0.2s ease-in-out;
}

iframe {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    border: unset;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

#overlay {
    position: absolute;
    width: 10000%;
    height: 10000%;
    top: 50%;
    translate: 0 -50%;
    background: black;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

#container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition-property: transform;
    transition-timing-function: cubic-bezier(.8, 0, .8, 1);
}

/* channel name popup */

.itemcontainer::before {
    z-index: 3;
    content: 'Placeholder';
    position: absolute;
    padding: 14px;
    min-width: 115%;
    height: 1em;
    bottom: -1.9em;
    background-color: #ffffff;
    text-align: center;
    color: #595959;
    font-family: Rodin Pro;
    letter-spacing: -0.5pt;
    line-height: 1;
    border: 2px solid #CACACA;
    box-shadow: 3px 4px 8px rgba(0, 0, 0, 0.3);
    font-size: 35pt;
    border-radius: 1em;
    pointer-events: none;
    opacity: 0;
    scale: 0.93;
    transition: opacity 0.1s ease-in-out, scale 0.1s ease-in-out;
}

.itemcontainer:hover::before {
    opacity: 1;
    scale: 1;
    transition-delay: 0.4s;
}

.itemcontainer:hover::after {
    scale: 1;
    opacity: 1;
    transition: scale 0.03s linear, opacity 0.03s linear;
}

.itemcontainer:nth-child(4n)::before {
    translate: 0;
    right: -10px;
}

.itemcontainer:nth-child(4n - 1)::before,
.itemcontainer:nth-child(4n - 2)::before {
    translate: -50% 0;
    left: 50%;
}

.itemcontainer:nth-child(4n - 3)::before {
    left: -10px;
    translate: 0;
}

/* channels */

.menuitem {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    background: url(../placeholder.png);
    background-size: 100% 100%;
    mask-image: url('../wii-border.svg');
    mask-size: 100%;
    mask-position: center;
    mask-repeat: no-repeat;
}

.menuitem::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url(../channel-border.svg);
    background-size: 100%;
}

/* empty channel */

@keyframes scroll {
    to {
        background-position: 0 -150%;
    }
}

.itemcontainer:has(.menuitem.empty) {
    pointer-events: none;
}

.itemcontainer:has(.menuitem.empty)::before {
    content: '';
    z-index: 1;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    translate: 0 0;
    border-radius: unset;
    border: unset;
    box-shadow: unset;
    padding: unset;
    background: linear-gradient(white 35%, transparent 36%);
    background-size: 100% 4.5%;
    animation: scroll 50s linear forwards infinite;
    opacity: 0.2;
    scale: 1;
    mask-image: url('../wii-border.svg');
    mask-size: 100%;
    mask-position: center;
    mask-repeat: no-repeat;
}

.itemcontainer:has(.menuitem.empty)::after {
    z-index: 2;
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url(../channel-border.svg);
    background-size: 100%;
    opacity: 1;
    scale: 1;
}

.menuitem.empty {
    --offset: 0px;
    background: url('../logo-faded.svg'), linear-gradient(#eee, #ccc 30% 70%, #eee);
    background-size: 100% 100%;
}

.menuitem.empty::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    filter: url(#noise-filter);
    opacity: 0.12;
}

.menuitem.empty::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(white 25%, transparent 26%);
    background-size: 100% 60%;
    opacity: 0.2;
    background-position: 0 var(--offset);
    animation: scroll 10s linear forwards infinite;
    animation-composition: accumulate;
}

.background-img {
    height: 100vh;
    width: 100vw;
    z-index: 1;
    background-image: url('../mayonnaiseforeaster.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center center;
    position: fixed;
}

/* bottom bar */

.bottombar {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 250px;
    background: url(../bottomarealeft.png) left no-repeat, url(../bottomarearight.png) right no-repeat, url(../bottomarea.png);
    background-size: contain;
    bottom: 0;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}

.left-oob {
    position: absolute;
    width: 10000%;
    height: 100%;
    top: 0;
    left: calc(-10000% + 3px);
    background: url(../bottomareaOOB.png);
    background-size: contain;
}


.right-oob {
    position: absolute;
    width: 10000%;
    height: 100%;
    top: 0;
    right: calc(-10000% + 3px);
    background: url(../bottomareaOOB.png);
    background-size: contain;
}

.bottom-oob {
    position: absolute;
    width: 100%;
    height: 10000%;
    left: 0;
    bottom: calc(-10000% + 3px);
    background: #CBCDD1;
}

.timedate {
    width: 300px;
    translate: 0 -1.3em;
    flex-direction: column;
    align-items: center;
    display: flex;
    height: 80%;
    pointer-events: none;
    user-select: none;
}

.timedate>* {
    margin: unset;
}

.menutime {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 4.5em;
}

#wiimenu {
    position: absolute;
    color: #FF6B30;
    font-family: Rodin Pro;
    font-weight: 500;
    font-size: 40pt;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

#clock {
    position: absolute;
    right: 0;
    font-size: 50pt;
    color: #9D9D9D;
    font-family: clock;
    opacity: 0;
    padding-right: 10pt;
    letter-spacing: -2px;
    box-sizing: border-box;
    transition: opacity 0.2s ease-in-out;
}

#colon {
    animation: colonblink 2s ease-in-out infinite;
}

@keyframes colonblink {

    0%,
    45% {
        opacity: 1;
    }

    50%,
    95% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#ampm {
    position: absolute;
    height: 29px;
    right: -1.1em;
    bottom: 2px;
}

#daydate {
    font-family: Rodin Pro;
    font-weight: 700;
    padding-top: 10px;
    color: #797979;
    font-size: 43pt;
}

.holder-oob {
    top: 50%;
    translate: 0 calc(-50% - 9px);
    background-image: url(../holderOOB.png);
    height: 74%;
}

.holder {
    padding: 12px 25px;
    background-size: 100%;
    height: 74%;
    aspect-ratio: 1.43 / 1;
    box-sizing: border-box;
    display: flex;
    translate: 0 -9px;
}

.bottombtn {
    position: relative;
    height: 145px;
    z-index: 3;
    aspect-ratio: 1 / 1;
    transition: scale 0.08s ease-in-out;
    scale: 1;
}

.bottombtn img {
    position: absolute;
}

.bottombtn:hover {
    scale: 1.1;
}

.bottombtn::before {
    content: '';
    z-index: -1;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 7px;
    top: 7px;
    border-radius: 100%;
    background: rgba(0, 0, 0, 0.15);
}

.holder.right .bottombtn::after {
    content: 'Guestbook';
    left: unset;
    right: 1em;
}

.bottombtn::after {
    z-index: 8;
    content: 'About Me';
    position: absolute;
    padding: 14px;
    width: 7em;
    height: 1em;
    left: 1em;
    top: -1.2em;
    background-color: #ffffff;
    text-align: center;
    color: #595959;
    font-family: Rodin Pro;
    letter-spacing: -0.5pt;
    line-height: 1;
    border: 2px solid #CACACA;
    box-shadow: 3px 4px 8px rgba(0, 0, 0, 0.3);
    font-size: 35pt;
    border-radius: 1em;
    pointer-events: none;
    opacity: 0;
    scale: 0.8;
    transition: opacity 0.1s ease-in-out, scale 0.1s ease-in-out;
}

.bottombtn:hover::after {
    opacity: 1;
    scale: 0.9090909;
    transition-delay: 0.4s;
}

.holder.left {
    background-image: url(../holder-left.png);
    justify-content: right;
}

.holder.right {
    background-image: url(../holder-right.png);
    padding: 12px 12px;
}