:root {
    --app-height: 100vh;
}

html {
    background: #000;
}

body {
    font-family: "Gamja Flower", sans-serif;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-x: hidden;
}

img {
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

body.fixed {
    overflow: hidden;
}

h1.logo {
    font-family: "Gamja Flower", sans-serif;
    font-size: 120px;
    line-height: 0.9;
    text-align: center;
}

section.header h1.logo {
    font-size: 109px;
    color: #ffb70f;
    letter-spacing: -2px;
    line-height: 1;
    text-shadow: 
    -3px -3px 9px rgba(255, 255, 255, 0.25),
    0px 3px 9px rgba(255, 255, 255, 0.3),
    0px 1px 1px rgba(255, 255, 255, 0.6),
    0px 1px 5px rgba(255, 255, 255, 0.6);
    margin: 0;
}

section.header h1.logo span {
    font-size: 20px;
}

.button {
    color: #fff;
    padding: 12px 20px;
    background-color: #f7a103;
    background-image: radial-gradient(93% 87% at 87% 89%, rgba(0, 0, 0, 0.23) 0%, transparent 86.18%), radial-gradient(66% 66% at 26% 20%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 69.79%, rgba(255, 255, 255, 0) 100%);
    box-shadow: inset -3px -3px 9px rgba(255, 255, 255, 0.25), inset 0px 3px 9px rgba(255, 255, 255, 0.3), inset 0px 1px 1px rgba(255, 255, 255, 0.6), inset 0px -8px 36px rgba(0, 0, 0, 0.3), inset 0px 1px 5px rgba(255, 255, 255, 0.6), 2px 19px 31px rgba(0, 0, 0, 0.2);
    border-radius: 14px;
    font-weight: bold;
    font-size: 24px;
    border: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease, background-image 0s;
    /* Prevents transitioning gradients directly */
    position: relative;
    overflow: hidden;
}

.button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(93% 87% at 87% 89%, rgba(0, 0, 0, 0.23) 0%, transparent 86.18%), radial-gradient(66% 66% at 46% 20%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 69.79%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
    /* Same radius as button to align properly */
}

.button:hover::after {
    opacity: 1;
}

.button.social{
    background-color: #008cff;
    display: block;
    width: 64px;
    height: 64px;
    padding: 12px 14px 14px 14px;
}

section.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 4308;
}

div.header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    align-items: center;
    z-index: 4308;
}

div.header>* {
    display: flex;
    align-items: center;
}

div.header>*:nth-child(2) {
    justify-content: flex-end;
}

section.main {
    height: var(--app-height);
    width: 100%;
    position: relative;
    overflow: hidden;
    background-image: url(bg.jpg);
    background-size: cover;
    background-position: center;
}

section.main div.niko__main-image-wrapper {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translate(-50%, -60%);
    width: 40vw;
    animation: niko-appear 1s ease-in-out;
}

section.main div.niko__main-image-wrapper.loaded{
    animation: niko-move 4s infinite ease-in-out;
}

@keyframes niko-move {

    0%,
    100% {
        top: 100%;
    }

    50% {
        top: 98%;
    }
}

@keyframes niko-appear {

    0%{
        top: 180%;
    }

    70% {
        top: 95%;
    }
    100%{
        top: 100%;
    }
}

section.main img.niko__main-image {
    width: 100%;
    z-index: 665;
    position: relative;
}

section.main img.pupils {
    position: absolute;
    width: 6%;
    left: 38%;
    top: 30%;
    transform: translate(-50%, -50%);
    z-index: 666;
    transition: scale .3s ease;
}

section.main img.pupils.left {
    animation: wiggle-left 1.5s infinite ease-in-out;
}

section.main img.pupils.right {
    transform: translate(-50%, -50%);
    left: 62%;
    animation: wiggle-right 1.5s infinite ease-in-out;
}

/* Wiggle animation */
@keyframes wiggle-left {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    25% {
        transform: translate(-49%, -51%) rotate(3deg);
    }

    50% {
        transform: translate(-51%, -49%) rotate(-3deg);
    }

    75% {
        transform: translate(-50%, -50%) rotate(1deg);
    }
}

@keyframes wiggle-right {

    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    25% {
        transform: translate(-51%, -51%) rotate(3deg);
    }

    50% {
        transform: translate(-49%, -49%) rotate(-3deg);
    }

    75% {
        transform: translate(-50%, -50%) rotate(1deg);
    }
}


#snow {
    width: 100%;
    height: var(--app-height);
    position: absolute;
    z-index: 4308;
    pointer-events: none;
}

div.main__links {
    position: absolute;
    top: 30%;
    left: 50%;
    width: 50vw;
    height: 50vh;
    transform: translate(-50%, -50%);
}

div.main__links img {
    width: 100%;
}

div.main__links a{
    display: block;
    position: absolute;
    transform: translate(-50%, -50%);
    transition: all .3 cubic-bezier(0.075, 0.82, 0.165, 1);
    scale: 1;
    top: 100%;
    left: 50%;
    opacity: 0;
}

div.main__links.loaded a{
    opacity: 1;
}

div.main__links.loaded a:nth-child(1){
    left: 0%;
    top: 100%;
    transform: translate(-50%, -50%) rotate(-72deg);
    animation: wobble-1 1.5s ease-in-out infinite;
    transition: top 1s ease-in-out, left 0.6s ease;
}

div.main__links.loaded a:nth-child(2){
    left: 20%;
    top: 58%;
    transform: translate(-50%, -50%) rotate(-36deg);
    animation: wobble-2 1.5s ease-in-out infinite;
    transition: top 0.8s ease-in-out, left 0.8s ease;
}

div.main__links.loaded a:nth-child(3){
    left: 50%;
    top: 42%;
    animation: wobble-3 1.5s ease-in-out infinite;
    transition: top 1s ease-in-out, left 1s ease;
}

div.main__links.loaded a:nth-child(4){
    left: 80%;
    top: 58%;
    transform: translate(-50%, -50%) rotate(36deg);
    animation: wobble-4 1.5s ease-in-out infinite;
    transition: top 1.1s ease-in-out, left 1.2s ease;
}

div.main__links.loaded a:nth-child(5){
    left: 100%;
    top: 100%;
    transform: translate(-50%, -50%) rotate(72deg);
    animation: wobble-5 1.5s ease-in-out infinite;
    transition: top 1.2s ease-in-out, left 1.4s ease;
}

@keyframes wobble-1 {
    0%, 100%{
        transform: translate(-50%, -50%) rotate(-72deg);
    }
    33%{
        transform: translate(-50%, -48%) rotate(-74deg);
    }
    66%{
        transform: translate(-51%, -48%) rotate(-70deg);
    }
}

@keyframes wobble-2 {
    0%, 100%{
        transform: translate(-50%, -50%) rotate(-36deg);
    }
    33%{
        transform: translate(-50%, -48%) rotate(-38deg);
    }
    66%{
        transform: translate(-51%, -48%) rotate(-34deg);
    }
}

@keyframes wobble-3 {
    0%, 100%{
        transform: translate(-50%, -50%) rotate(0deg);
    }
    33%{
        transform: translate(-50%, -48%) rotate(2deg);
    }
    66%{
        transform: translate(-51%, -48%) rotate(-2deg);
    }
}

@keyframes wobble-4 {
    0%, 100%{
        transform: translate(-50%, -50%) rotate(36deg);
    }
    33%{
        transform: translate(-50%, -48%) rotate(38deg);
    }
    66%{
        transform: translate(-51%, -48%) rotate(34deg);
    }
}

@keyframes wobble-5 {
    0%, 100%{
        transform: translate(-50%, -50%) rotate(72deg);
    }
    33%{
        transform: translate(-50%, -48%) rotate(74deg);
    }
    66%{
        transform: translate(-51%, -48%) rotate(70deg);
    }
}

.address-game {
    position: relative;
    width: 100vw;
    height: var(--app-height);
    background: url('collectbg.jpg') no-repeat center center/cover; /* Background image */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#address-canvas {
    position: relative;
    width: 100%;
    height: var(--app-height);
    border: none;
}

.letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.full-address__wrapper{
    display: inline-block;
    position: absolute;
    left: 50%;
    bottom: 0px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.full-address__wrapper.done{
    pointer-events: unset;
}

.full-address {
    font-family: "Gamja Flower", sans-serif;
    font-size: 24px;
    color: white;
    transition: all .5s ease;
    text-align: center;
}

.full-address__wrapper.done .full-address{
    scale: 1.3;
}

p.hint{
    position: absolute;
    left: 50%;
    top: 90px;
    margin: 0;
    font-size: 24px;
    text-align: center;
    pointer-events: none;
    z-index: 668;
    color: #fff;
    transform: translate(-50%, -50%);
    width: 100%;
}

#click-to-copy {
    font-size: 24px;
    cursor: pointer;
    color: lightgray;
    display: block;
    margin: auto;
    opacity: 0;
    transition: all .3s ease;
    text-align: center;
}

#full-address{
    font-family: "Space Mono", monospace;
    font-size: 20px;
    color: #ffb70f;
    line-height: 1;
    text-shadow: 
    -3px -3px 9px rgba(255, 255, 255, 0.25),
    0px 3px 9px rgba(255, 255, 255, 0.3),
    0px 1px 1px rgba(255, 255, 255, 0.6);
    word-break: break-all;
}


section.separator{
    background-image: url(ice.png);
    background-size: contain;
    background-repeat: repeat-x;
    height: 60px;
    width: 100%;
    margin-bottom: -40px;
    margin-top: -20px;
    z-index: 666;
}

/* Animation class for collected letters */
.letter-animation {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.letter-animation.active {
    opacity: 1;
    transform: translateY(0);
}



@media (max-width: 768px) {

    section.header h1.logo{
        font-size: 72px;
    }

    h1.logo {
        font-size: 64px;
    }

    div.header {
        flex-wrap: wrap;
        row-gap: 24px;
        justify-content: center;
    }

    div.header>* {
        min-width: 50%;
    }

    section.main{
        max-height: 500px;
    }

    section.main div.niko__main-image-wrapper{
        width: 60vw;
    }

    div.main__links{
        width: 76vw;
    }

    div.main__links.loaded a:nth-child(3){
        top: 66%;
    }

    div.main__links.loaded a:nth-child(4), div.main__links.loaded a:nth-child(2){
        top: 76%;
    }

    p.hint{
        top: 120px;
    }

    .full-address__wrapper{
        width: 80%;
    }

    .full-address__wrapper.done .full-address{
        scale: 1.09;
    }

}


