@font-face {font-family:hangyaku; src:url("assets/fonts/hangyaku.ttf");}
@font-face {font-family:comicsans; src:url("assets/fonts/comicsans.ttf");}
::-webkit-scrollbar {display: none;}
.invisibility{opacity: 0;}
.overFlow{overflow-x: scroll!important; overflow-y: scroll!important;}
html{
    margin: -8px;
}

#debug .menu{
    display: none;
    position: fixed;
    left: 0px;
    top: 0px;
    background-color: #ddf9ffe2;
    color: #242424;
    text-align: left;
    padding: 5px;
    z-index: 255;
}
#debug .div{
    display: none;
    position: fixed;
    pointer-events: none;
    background-color: #363636e2;
    color: #f0f8ff;
    text-align: left;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 256;
}

#gameArea{
    display:flex;
    flex-direction: row;
    height: 100vh;
    width: 100vw;
    margin: 0 auto;
    text-align: center;
    font-family: comicsans;
    padding: 10px;
    background-color: #f0f8ff;
    user-select: none;
    scrollbar-width: none;
}

/*logとtext*/
#log{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 320px;
    height: 200px;
    border: 1px solid #ffffff;
    background-color: rgba(0,0,0,0);
    position: fixed;
    bottom: 200px;
    right: -300px;
    color: #fefefe;
    overflow-y: hidden;
    transition: right 0.3s;
    z-index: 254;
}
#log .opener{
    width: 20px;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    color: #fefefe;
    text-align: center;
    cursor: pointer;
    z-index: 254;
}
#log .log{
    width: 300px;
    height: 100%;
    max-height: 200px;
    overflow-x: hidden;
    overflow-y: scroll;
    background-color: rgba(0,0,0,0.8);
    color: #fefefe;
    text-align: left;
    font-size: 14px;
    transition: right 0.3s;
    z-index: 253;
}
#text{
    display: none;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 1.2em;
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;

    white-space: nowrap;
    overflow: hidden;
    width: fit-content; /* 文字の長さに応じた幅 */
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    0%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}
.color-red{
    color: #ff1919;
}
.color-pink{
    color: #ff56e9;
}
.color-blue{
    color: #1919ff;
}


#debug .data{
    display: none;
    background-color: #4e7aa3b6;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 400px;
    height: 250px;
    z-index: 205;
    overflow-x: hidden;
    overflow-y: scroll;
}

#UIs{
    display: flex;
    flex-direction: column;
    width: 40%;
    height: calc(100% - 20px);
    padding: 5px 10px;
    background-color: #eaf5ff;
}
#UIs .player, #UIs .dealer{
    display: flex;
    flex-direction: row;
    align-items: center;
    width: calc(100% - 10px);
    height: 150px;
    padding: 2.5px;
}
#UIs .player .health, #UIs .dealer .health{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-content: center;
    justify-content: center;
    flex-wrap: nowrap;
    width: 30%;
    height: calc(90% - 5px);
    padding: 5px;
    border: 1px solid #cfe9ff;
    position: relative;
}
#UIs .player .health .hp, #UIs .dealer .health .hp{
    display: flex;
    flex-direction: row;
    height: 55px;
    /* background-color: #00ff04; */
}
#UIs .player .health .hp .img, #UIs .dealer .health .hp .img{
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    width: 40px;
    height: 100%;
    color: #ff003c;
    font-size: 30px;
    text-align: center;
    /* background-color: #99ff90; */
}
#UIs .player .health .hp .num, #UIs .dealer .health .hp .num{
    display: block;
    padding: 5px;
}
#UIs .player .health .hp .num .now, #UIs .dealer .health .hp .num .now{
    font-size: 30px;
    font-family: comicsans;
}
#UIs .player .health .hp .num .max, #UIs .dealer .health .hp .num .max{
    margin-top: -9px;
    margin-left: 10px;
}
#UIs .player .health .shl, #UIs .dealer .health .shl{
    display: flex;
    flex-direction: row;
    height: 55px;
    margin-top: 1px solid #cfe9ff;
    /* background-color: #bf00ff; */
}
#UIs .player .health .shl .img, #UIs .dealer .health .shl .img{
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    width: 40px;
    height: 100%;
    color: #009dff;
    font-size: 30px;
    text-align: center;
    /* background-color: #e390ff; */
}
#UIs .player .health .shl .num, #UIs .dealer .health .shl .num{
    margin-top: 6px;
    display: block;
    padding: 5px;
}
#UIs .player .health .shl .num .now, #UIs .dealer .health .shl .num .now{
    font-size: 30px;
    font-family: comicsans;
}
#UIs .player .point, #UIs .dealer .point{
    margin-left: 15px;
    font-family: hangyaku;
    font-size: 100px;/*50px;*/
}

#else .info{
    display: flex;
    flex-direction: column;
    width: calc(100% - 10px);
    /* height: 50px; */
    padding: 5% 10px;
    background-color: #eaf5ff;
}
#else .info .row{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5%;
    width: 100%;
    height: 50px;
    background-color: #eaf5ff;
}
#else .info .item{
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 42.5%;
    height: 30px;
    font-size: 23px;
    padding: 2px;
    background-color: #eaf5ff;
    border: 2px solid #cfe9ff;
}
#else .info .upper{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5%;
    width: 50%;
    height: 50px;
    position: fixed;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
}
#else .info .upper .item{
    width: 100px;
    height: 25px;
    font-size: 18px;
}
#upperLayer{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;
    cursor: none;
    pointer-events: none;
}
#upperLayer .deck, #upperLayer .melt{
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    gap: 30px;
    cursor: url('assets/systems/x.png'), auto;
}
#upperLayer .deck{background-color: #000f11a8;}
#upperLayer .melt{background-color: #0b0000a8;}
#upperLayer .deck .hearts, #upperLayer .melt .hearts, #upperLayer .deck .spades, #upperLayer .melt .spades, #upperLayer .deck .diamonds, #upperLayer .melt .diamonds, #upperLayer .deck .clubs, #upperLayer .melt .clubs, #upperLayer .deck .elses, #upperLayer .melt .elses{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
    gap: 25px;
}
#upperLayer .deck .card, #upperLayer .melt .card{
    pointer-events: all;
    cursor: help;
}

.standeden{
    display: block;
    width: 50px;
    height: 50px;
    position: absolute;
    top: -10px;
    right: -10px;
    scale: (4);
    z-index: 50;
    opacity: 0;
    transition: opacity 1.0s ease, scale 1.0s ease;
    animation: reZoom 1.0s forwards;
    pointer-events: none;
}
.standeden img{
    display: block;
    width: 100%;
    height: 100%;
}
@keyframes reZoom{
    0%{
        scale: 4;
        opacity: 0;
    }
    100%{
        scale: 1;
        opacity: 1;
    }
}


#buttons{
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: center;
    gap: 30px;
    width: 400px;
    height: 130px;
    background-color: #d9eeff69;
    border-radius: 50px;
    margin: 10px;
}
#buttons .hit, #buttons .stand{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 65px;
    border: 4px solid #cfe9ff;
    background-color: #def0ff;
    font-size: 30px;
}
#buttons .hit.wait, #buttons .stand.wait{
    border: 4px solid #cfe9ff;
    color: #def0ff;
    opacity: 0.4;
}


#cardPlaces{
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap:30px;
    position: relative;
}
#cardPlaces .player, #cardPlaces .dealer{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    height: 100px;
    width: 400px;
    padding: 25px;
    background-color: #eaf5ff;
    border-radius: 35px;
    margin: 15px;
    overflow-x: scroll;
    overflow-y: hidden;
}
#cardPlaces .player.clone, #cardPlaces .dealer.clone{
    position: fixed;
    transition: left 0.8s ease, top 0.8s ease;
}


/* cardについて */
.card{
    display: block;
    height: 90px;
    width: 60px;
    position: relative;
    border: 4px solid #cfe9ff;
    background-color: #def0ff;
    flex-shrink: 0; /*勝手に縮減するのを防ぐやつ*/
    transform-style: preserve-3d;
    transition: transform 0.9s ease, left 0.3s ease, top 0.3s ease;
    transform: translate(0, 0) scale(1);
}
.card.normal .front .upper{
    position: absolute;
    top: 0px;
    right: 3px;
    font-size: 20px;
}
.card.normal .front .num{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    font-family: hangyaku;
    text-align: center;
}
.card.normal .front .lower{
    position: absolute;
    bottom: 0px;
    left: 3px;
    transform: rotate(180deg);
    font-size: 20px;
}
.card.tarot .front .upper{
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-family: hangyaku;
    text-align: center;
}
.card.tarot .front .img{
    width: 100%;
    height: 100%;
}

.card .front, .card .rever {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.card .rever {
    transform: rotateY(180deg);
    white-space: nowrap;
    overflow-x: hidden;
    overflow-y: scroll;
}
.card .rever .title{
    width: 80%;
    text-align: center;
    font-size: 6px;
    overflow-x: scroll;
    white-space: nowrap;
    padding: 5px 3px;
    border-bottom: #cfe9ff 1px solid;
}
.card .rever .detail{
    width: 80%;
    text-align: left;
    font-size: 3.5px;
    padding: 5px 3px;
    border-bottom: #cfe9ff 1px solid;
    overflow-x: scroll;
}
.card .rever .attributi{
    width: 80%;
    text-align: left;
    font-size: 4px;
    padding: 5px 3px;
}

.card.active{
    position: fixed;
    left: 50vw;
    top: 50vh;
    transition: transform 0.3s ease, left 0.3s ease, top 0.3s ease;
    transform: translate(-50%, -50%) scale(4);
    z-index: 255;
}
.card.active.flipped {
    transform: translate(-50%, -50%) scale(4) rotateY(180deg);
}

.card.clone{
    position: absolute;
    z-index: 254;
    margin: 0;
    transition: left 0.5s ease, top 0.5s ease;
    opacity: 1;
}