html {
    height: 100vh;
    overflow: hidden;
}
body {
    margin:0;
    padding:0;
    overflow: hidden;
    animation: body-anim 6.4s linear infinite;
    font-family: helvetica, arial, sans-serif;
}

#container-matrix {
    position: absolute;
    z-index: 1;
    height: 100vh;
    overflow-y: hidden;
}
#container-matrix > div {
    cursor: pointer;
    float: left;
    animation: div-anim 1.6s linear infinite;
}
#container-matrix > div:hover {
    animation: none;
}
@media screen and (orientation: portrait) {
    #container-matrix > div {
        width: 10vw;
        height: 10vw;
    }
}
@media screen and (orientation: landscape) {
    #container-matrix > div {
        width: 5vw;
        height: 5vw;
    }
}

@keyframes body-anim {
    0% {
        background-color: #fff; }
    50% {
        background-color: #000; }
    100% {
        background-color: #fff; }
}

@keyframes div-anim {
    0% {
      opacity: 0; }
    50% {
      opacity: 1; }
    100% {
      opacity: 0; }
}

#container-selection {
    position: absolute;
    left: 2.5vw;
    width: calc(100% - 5vw);
    top: 2.5vw;
    height: calc(100% - 5vw);
    z-index: 0; 
    overflow: hidden;
}
#container-selection > div {
    opacity: 0;
    width: 100%;
    height: 100%;
}
#container-selection > div.show {
    animation: selection-show 1.6s ease-in forwards;
}

#container-selection > div > #image-container {
    cursor: none;
    height: 100%;
    zoom: 200%;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
}
#container-selection > div > #image-container.show {
    animation: 3s ease-in 3s 1 forwards selection-show;
}

#container-selection > div > #btnAudio {
    position: absolute;
    z-index: 10;
    background-color: #fff;
    background-image: url("/images/audio-no-110x110.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-style: solid;
    border-width: medium;
    border-color: #000;
    
}
@media screen and (orientation: portrait) {
    #container-selection > div > #btnAudio {
        top: 2vw;
        left: 2vw;
        width: 10vw;
        height: 10vw;
        border-radius: 2vw;
    }
}
@media screen and (orientation: landscape) {
    #container-selection > div > #btnAudio {
        top: 1vw;
        left: 1vw;
        width: 5vw;
        height: 5vw;
        border-radius: 1vw;
    }
}
#container-selection > div > #btnAudio:hover {
    cursor: pointer;
    opacity: .6;
}

#container-selection > div > #btnClose {
    position: absolute;
    z-index: 10;
    background-color: white;
    color: black;
    font-weight: bold;
    border-style: solid;
    border-width: medium;
    border-color: #000;
}
@media screen and (orientation: portrait) {
    #container-selection > div > #btnClose {
        top: 2vw;
        right: 2vw;
        width: 20vw;
        height: 10vw;
        border-radius: 2vw;
        font-size: 1em;
        font-size: calc(0.5em + 2vw);
    }
}
@media screen and (orientation: landscape) {
    #container-selection > div > #btnClose {
        top: 1vw;
        right: 1vw;
        width: 10vw;
        height: 5vw;
        border-radius: 1vw;
        font-size: calc(0.5em + 1vw);
    }
}
#container-selection > div > #btnClose:hover {
    cursor: pointer;
    opacity: .6;
}

:root {
    --color-word-1: white;
    --color-word-2: white;
    --color-word-3: white;
}
#container-selection > div > .dream-word-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    display: flexbox;
    justify-content: center;
}
#container-selection > div > #dream-word-container-1 {
    animation:
       dream-word-rotate-right 70s linear 10s 1 forwards;
}
#container-selection > div > #dream-word-container-2 {
    animation:
       dream-word-rotate-left 70s linear 20s 1 forwards;
}

#container-selection > div > .dream-word-container > .dream-word {
    cursor: none;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    font-weight: bold;
    font-size: 0;
    display: flex;
    align-items: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    white-space: nowrap;
}
#container-selection > div > .dream-word-container > #dream-word-1 {
    z-index: 4;
    color: var(--color-word-1);
    transform: translate(-50%, -50%);
    animation:
        dream-word-show 45s ease-in 5s 1 forwards,
        dream-word-grow 45s ease-in 5s 1 forwards
}
#container-selection > div > .dream-word-container > #dream-word-2 {
    z-index: 3;
    color: var(--color-word-2);
    transform: translate(-50%, -50%);
    animation:
        dream-word-show 40s ease-in 15s 1 forwards,
        dream-word-grow 40s ease-in 15s 1 forwards
}
#container-selection > div > .dream-word-container > #dream-word-3 {
    z-index: 2;
    color: var(--color-word-3);
    transform: translate(-50%, -50%);
    animation:
        dream-word-show 35s ease-in 25s 1 forwards,
        dream-word-grow 35s ease-in 25s 1 forwards
}

@keyframes selection-show {
    0% {
        opacity: 0; }
    100% {
        opacity: 1; }
}


@keyframes dream-word-show {
    0% {
        opacity: 0.2;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
    }
}
@keyframes dream-word-grow {
    0% {
        font-size: 0;
    }
    100% {
        font-size: 180em;
    }
}

@keyframes dream-word-rotate-right {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(180deg);
    }
}
@keyframes dream-word-rotate-left {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-180deg);
    }
}
