@import url('./animation.css');
@import url('./item.css');


:root {
    --cloud-color: rgba(255, 255, 255);
    --shadow-color: rgba(0, 0, 0);
    --water-color: rgba(111, 181, 213);
    --water-deep-color: rgba(0, 74, 230);
    --water-deep-border-color: rgba(0, 74, 230, 0.2);
    --wood-color: rgba(147, 117, 96);
}

@font-face {
    font-family: 'ShantellSansItalic';
    src: url('./fonts/ShantellSans-Italic-VariableFont_BNCE,INFM,SPAC,wght.ttf') format("truetype-variations");
    font-weight: 300 800;
}

@font-face {
    font-family: 'ShantellSans';
    src: url('./fonts/ShantellSans-VariableFont_BNCE,INFM,SPAC,wght.ttf') format("truetype-variations");
    font-weight: 300 800;
}

html, body, #app {
    height: 100%;
    width: 100%;
    overscroll-behavior: none;
    font-family: 'ShantellSans';
    font-weight: 400;
    user-select: none;
    overflow: hidden;
}
body {
    background: url('/public/images/grass/1.png') 48px 48px,
        url('/public/images/grass/2.png') 48px 48px,
        url('/public/images/grass/3.png') 48px 48px;
}

h1 {
    font-size: xx-large;
    font-weight: 600;
    text-align: center;
    color: var(--cloud-color);
    text-shadow: .5rem .5rem 1rem var(--shadow-color);
    margin-bottom: 1rem;
}
h2 {
    font-size: xx-large;
    font-weight: 600;
    text-align: center;
    color: var(--cloud-color);
    text-shadow: .5rem .5rem 1rem var(--shadow-color);
    margin-bottom: 2rem;
}
button {
    background-color: var(--wood-color);
    font-size: 1.5rem;
    color: var(--cloud-color);
    padding: 0.1rem 1rem;
    margin-bottom: 2rem;
}

.button-lobby {
    margin-bottom: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.5rem;
  }
.button-lobby + .button-lobby {
    margin-top: 0.7rem;
}

.game, .lobby {
    display: grid;
    justify-items: center;
    grid-template-columns: 100%;
    grid-template-rows: 100px auto;
    grid-auto-rows: 0;
    height: calc(100% - 120px);
    width: 100%;
    overflow: hidden;
}
.player-view, .opponent-view {    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--water-color);
}
.lake-border {
    position: relative;
    overflow: hidden;
    max-width: calc(16px + 10 * 50px);
    width: 100%;
    max-height: calc(25px + 10 * 50px);
    height: 100%;
    border: 18px solid transparent;
    border-image: url('/public/images/shore.png') 18 / 18px repeat;
}
.lake {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: fit-content;
    height: fit-content;
    justify-content: center;
    background-color: var(--water-color);
}
.lake-title {
    text-align: center;
}
.lake-row {
    display: flex;
    flex-direction: row;
}
.lake-cell {
    display: flex;
    height: 48px;
    width: 48px;
    cursor: pointer;
    background-image: url('/public/images/water/1.png');
    align-items: center;
    justify-content: center;
    padding: 4px;
    position: relative;
    color: rgba(0, 102, 143, 0.3);
}
.lake-row + .lake-row {
    border-top: 1px var(--water-deep-border-color) solid;
}
.lake-cell + .lake-cell {
    border-left: 1px var(--water-deep-border-color) solid;
}


.hide {
    height: 0;
    animation: hide 2s;
}

.player-view.active {
    animation: active 2s;
}
.player-view.hide {
    height: 0;
    animation: hide 2s;
}

.opponent-view.active {
    animation: active-opponent 2s;
}
.opponent-view.hide {
    height: 0;
    animation: hide-opponent 2s;
}




@keyframes hide {
    0% {
        max-width: calc(16px + 10 * 50px);
        width: 100%;
        max-height: calc(25px + 10 * 50px);
        height: 100%;
    }
    50% {

        height: 0;
    }
    100% {

        height: 0;

    }
}

@keyframes active {
    0% {

        height: 0;
        
    }
    50% {
        max-width: calc(16px + 10 * 50px);
        width: 100%;
        max-height: calc(25px + 10 * 50px);
        height: 100%;

    }
    100% {
        max-width: calc(16px + 10 * 50px);
        width: 100%;
        max-height: calc(25px + 10 * 50px);
        height: 100%;

    }
}



@keyframes hide-opponent {
    0% {
       /* border-top: 2rem #fff solid;*/
        max-width: calc(16px + 10 * 50px);
        width: 100%;
        max-height: calc(25px + 10 * 50px);
        height: 100%;
    }
    50% {

        height: 0;
    }
    100% {

        height: 0;

    }
}

@keyframes active-opponent {
    0% {
      /*  border-top: 2rem #fff solid;*/
        height: 0;
        
    }
    50% {
        max-width: calc(16px + 10 * 50px);
        width: 100%;
        max-height: calc(25px + 10 * 50px);
        height: 100%;

    }
    100% {
        max-width: calc(16px + 10 * 50px);
        width: 100%;
        max-height: calc(25px + 10 * 50px);
        height: 100%;

    }
}
