/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}




body{
    width: 100vw;
    height: 100vh;
    background-image: url(background.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    overflow: hidden;
    position: relative;
}
#hand{
    position: absolute;
    top: 0;
    left: calc(100vw - 2rem);
    height: 100vh;
    display: none;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    transition: left 200ms ease;
}
#reveal-hand-phone{
    width: 2rem;
    height: 2rem;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px 0 0 5px;
}
#reveal-hand-pc{
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px 0 0 5px;
}
#window{
    width: 50vw;
    height: 100vh;
    background: white;
}


main{
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
}
.board{
    height: 100vh;
    width: 70vw;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
}
.terrain-zone, .played-cards{
    box-sizing: border-box;
    flex: 0 1 50vh;
    width: 100%;
    padding: 3rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    gap: 3rem;
}
.terrain-zone{
    align-items: end;
}
.creatures{
    align-items: start;
}
.terrain-slot, .played-slot{
    max-height: 40vh;
    flex: 0 1 250px;
    aspect-ratio: 240/336;
    border: 1px solid white;
    border-radius: 10px;
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    font-size: 2rem;
}
.terrain-slot img, .creature-slot img{
    display: block;
    object-fit: contain;
    width: 100%;
    height: 100%;
}
.card{
    animation: "card-appear";
    animation-duration: 500ms;
    position: relative;
    height: 100%;
    overflow: hidden;
}
.card img{
    height: 100%;
    border-radius: 10px;
}
.card:hover .card-menu{
    opacity: 100%;
}
.card-menu{
    opacity: 0;

    position: absolute;
    top: 0;
    left: 0;
    z-index: 200;
    width: 100%;
    height: 100%;
    padding: 1rem;
    box-sizing: border-box;
    border-radius: 10px;

    background-color: rgba(0,0,0,.3);

    display: flex;
    flex-flow: column nowrap;
    justify-content: end;
    align-items: end;
    gap: 1rem;

    transition: all 100ms ease;
}
.card-zoom{
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    cursor: pointer;
}
.discard-card, .back-to-hand, .event-to-hand{
    border: 2px solid black;
    background-color: white;
    color: black;
    border-radius: 10px;
    padding: .5rem 1rem;
    font-size: 1rem;

    transition: all 100ms ease;
    cursor: pointer;
}
.play-card:hover, .back-to-deck:hover, .event-to-hand:hover{
    background-color: #aaa;
}
.event-to-hand{

    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 2rem;
}
.card-name{
    display: none;
}
.card-hp{
    position: absolute;
    top: 0;
    left: calc(100% - 2rem);
    transform: translateY(100%);
    z-index: 300;
    padding: .5rem;
    min-width: 3rem;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background-color: white;
    border: 2px solid black;
    color: black;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 1.2rem;
}
.card-hp span{
    margin-right: .4rem;
}
.hp-up, .hp-down{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: black;
    cursor: pointer;
}
.hp-up{
    top: 0;
}
.hp-down{
    bottom: 0;
}

.side{
    height: 100vh;
    width: 30vw;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    gap: 6rem;
}
#deck, .edit-deck{
    max-width: 250px;
    width: 100%;
    position: relative;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    font-size: 2rem;
}
#edit-deck{
    padding: 1rem;
    width: 100%;
    height: 100%;
    resize: none;
    background: transparent;
    color: white;
    border: none;
    outline: none;
    box-sizing: border-box;
}
#no-deck, #active-deck{
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-evenly;
    align-items: center;
}
.deck-button{
    width: auto;
    max-width: 70%;

    border: 1px solid white;
    border-radius: 10px;
    padding: 1rem;
    background: transparent;

    transition: all 100ms ease;
    text-align: center;
    cursor: pointer;
}
.deck-button:hover{
    background-color: rgba(255,255,255,.1);
}

#select-deck{
    background-color: black;
    color: white;
    padding: 0.5rem 1rem;
    font-size: inherit;
    border-radius: 10px;
    border: 1px solid white;
}




@media screen and (max-width: 1400px) {
    main{
        flex-flow: column nowrap;
    }
    .board{
        width: 100vw;
        height: unset;
        flex: 1 0 60%;
    }
    .side{
        width: 100vw;
        height: unset;
        flex: 1 0 30%;
        flex-flow: row nowrap;
        padding-bottom: 3rem;
        box-sizing: border-box;
        gap: 3rem;
    }
    .terrain-zone, .played-cards{
        flex: 1 0 50%;
    }
    .terrain-slot, .played-slot, #deck, .edit-deck{
        height: 25vh;
        flex: unset;
    }
    #deck, .edit-deck{
        font-size: 1rem;
    }
    .edit-deck{
        flex: 1 0 50%;
        max-width: 40vw;
    }
    #deck{
        aspect-ratio: 240/336;
        width: unset;
    }
}
@media screen and (max-width: 650px) {
    .played-cards, .terrain-zone{
        padding: 1rem;
        gap: 1rem;
    }
    .terrain-slot, .played-slot, #deck, .edit-deck{
        width: calc(33vw - 1rem);
        height: unset;
        flex: unset;
    }
    .side{
        gap: 1rem;
        padding: 1rem;
        padding-bottom: 3rem;
    }
    #deck{
        width: calc(33vw - 1rem);
        height: 100%;
    }
    .edit-deck{
        height: 100%;
        width: calc(66vw - 1rem);
        aspect-ratio: unset;
    }
    #no-deck, #active-deck{
        padding: .5rem;
    }
    .deck-button{
        padding: .5rem;
    }
    #zoom-card{
        height: unset;
        width: 100%;
    }
}

@keyframes roll-dice {
    0% {opacity: 0%;}
    100% {opacity: 100%;}
}

@keyframes card-appear {
    0% {transform: scale(0.1);}
    75% {transform: scale(1.1);}
    100% {transform: scale(1);}
}