body {
    background: #666;    
}
.dropdown-menu-tool{
    z-index: 1050;
    margin: 0;
    font-size: 0.9rem;
    overflow: hidden;
}
[data-bs-theme="dark"] .dropdown-menu-tool {
    background-color: #121212;
    border: 1px solid hsla(0, 0%, 100%, 0.2);
}
.context-menu-inner {
    min-width: 190px;
    max-height: 210px;
    overflow-y: auto;
}
.dropdown-menu-tool a { cursor: pointer; }
[data-bs-theme="dark"] .dropdown-menu-tool a { color: #d4d1d0; }
.draggable{
  -ms-touch-action: none;
  touch-action: none;      
}
.card-draggable{
    display: inline-block;
    position: relative;
    border: 2px solid transparent;
    border-radius: 4px;
}
.card-draggable:hover { border: 2px solid goldenrod; }
.def-mode { 
  -webkit-transform: rotate(-90deg);
  -moz-transform: rotate(-90deg);
  -o-transform: rotate(-90deg);
  -ms-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
#main-deck, #graveyard, #extra-deck, #banishment {
    width: 100px;
    aspect-ratio: 285 / 398;
    cursor: pointer;
    background-size: cover;
    border-radius: 4px;
}
#play-hand{
    margin-left: 10px;
    margin-right: 10px;
    text-align: left;
    height: 145px;
}
.playarea-card {
    width: 100px;
    aspect-ratio: 271 / 395;
    border-radius: 2px;
}
.board {
    flex-grow: 1;
    position: relative;
    background: #666;
}
.board *, .view-zone * { user-select: none; }
#zone-playarea{
    position: absolute;
    top: 0;
    left: 0;
    height: calc(80% - 55px);
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    background-image: linear-gradient(to right, #262626 1px, transparent 1px),linear-gradient(to bottom, #262626 1px, transparent 1px);
    background-color: #222;
    background-size: 20px 20px;
    overflow: hidden;   
}
#deck-info-bottom {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
}
@media (min-width: 576px){
    #deck-info-bottom {
        flex-wrap: nowrap;
    }
}
@media (max-width: 700px){
    .playarea-card {
        width: 60px;
    }
    #main-deck, #graveyard, #extra-deck, #banishment { width: 60px; }
}

#general-controls {
    background-color: #27292d;
    border-radius: 5px;
    position: absolute;
    top: -97px;
    left: 10px;
    padding: 0.5rem;
    text-align: center;
    color: #d4d1d0;
}
#controls-txt-mobile {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1;
    display: none;
    color: #d4d1d0;
    font-size: 0.8rem;
}
@media screen and (max-width: 767px) {
    #general-controls {
        z-index: 1;
        top: 40px;
        left: 20px;
        background-color: #4f4f4f;
    }
    #controls-txt-mobile { display: inline; }
}
.zone-txt {
    font-size: 0.8rem;
    cursor: pointer;
}
.view-zone {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 1035;
    opacity: 0.9;
    width: 800px;
    max-height: calc(100% - 255px);
    background-color: #3d3d3d;
    border-radius: 0.5rem;
    box-shadow: 0px 4px 20px 5px rgba(0, 0, 0, 0.7);
    border: 1px solid #121212;
}
.view-zone h5, .view-zone span { color: #d4d1d0; }
.close-btn {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    color: #d4d1d0;
    background-color: #27292d;
    align-self: center;
    cursor: pointer;
}
.context-menu-divider { border-top: 1px solid hsla(0, 0%, 0%, 0.2); }
[data-bs-theme="dark"] .context-menu-divider { border-top: 1px solid hsla(0, 0%, 100%, 0.3); }
.context-menu-btn {
    opacity: 0;
    position: absolute;
    top: 10px;
    left: 10px;
    color: #d4d1d0;
    background-color: #121212;
    border-radius: 6px;
    padding: 1px 4px 2px;
    font-size: 0.8rem;
    line-height: normal;
    cursor: pointer;
    box-shadow: 0px 0px 3px 4px rgba(255, 255, 255, 0.6);
    transition: 0.3s ease opacity;
}
[data-bs-theme="dark"] .playtest-modal .modal-header { border-bottom: 1px solid #474747; }
[data-bs-theme="dark"] .playtest-modal .modal-footer { border-top: 1px solid #474747; }
#utility-modal #warning, #monster-stats-modal #warning { color: #dc3545; }
[data-bs-theme="dark"] #utility-modal #warning, [data-bs-theme="dark"] #monster-stats-modal #warning { color: #ff4557; }
#coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    justify-content: center;
    align-items: center;
}
.heads, .tails {
    width: 140px;
    height: 140px;
    border: 10px solid transparent;
    border-radius: 50%;
    background: linear-gradient(120deg, goldenrod 30%, #654a08) padding-box, linear-gradient(120deg, gold 30%, darkgoldenrod) border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #222;
    font-size: 2rem;
    font-weight: 700;
    position: absolute;
    backface-visibility: hidden;
}
.tails { transform: rotateX(180deg); }
@keyframes spin-tails {
    0% { transform: rotateX(0); }
    100% { transform: rotateX(1980deg); }
}
@keyframes spin-heads {
    0% { transform: rotateX(0); }
    100% { transform: rotateX(2160deg); }
}
#dice {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}
[data-bs-theme="dark"] #dice {
    background-color: #c7c7c7;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}
#dice.roll { animation: roll 1s infinite; }
.dice-red-dot, .dice-black-dot {
    --top: 0%;
    --left: 0%;
    border-radius: 50%;
    position: absolute;
    top: var(--top);
    left: var(--left);
    transform: translate(calc(var(--left) * -1), calc(var(--top) * -1));
}
.dice-red-dot {
    width: 30px;
    height: 30px;
    background-color: #b72828;
}
.dice-black-dot {
    width: 20px;
    height: 20px;
    background-color: black;
}
@keyframes roll {
    0% { transform: rotate(0); }
    100% { transform: rotate(360deg); }
}
.counter, .atk-def, .level-rank, .pendulum-scale {
    min-width: 1rem;
    height: 1rem;
    padding: 0 4px;
    border-radius: 0.25rem;
    position: absolute;
    font-size: 12px;
    color: white;
    display: grid;
    place-content: center;
}
.counter {
    left: 2px;
    bottom: 2px;
    cursor: pointer;
    background-color: black;
}
.atk-def {
    right: 0;
    bottom: -18px;
    background-color: #656565;
}
.level-rank {
    right: 2px;
    top: 25px;
    background-color: black;
}
.pendulum-scale {
    right: 2px;
    bottom: 22px;
    background-color: black;
}
.attributes {
    position: absolute;
    left: calc(100% + 4px);
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-wrap: wrap;
    max-height: 100%;
}
.attributes > img {
    width: 1rem;
    height: 1rem;
}
.stats-container {
    width: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: white;
    display: flex;
    gap: 4px;
    flex-direction: column;
    align-items: center;
}
.stat-item {
    min-height: 1rem;
    padding: 0 4px;
    border-radius: 0.25rem;
    background-color: black;
}
.editable-monster-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
}
#card-info-overlay {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    background-color: rgba(0, 0, 0, 0.8);
}
#close-overlay {
    cursor: pointer;
    font-size: 3rem;
    color: #d4d1d0;
}
#card-img {
    width: 300px;
    border-radius: 0.5rem;
}
#card-name {
    font-size: 2rem;
    font-weight: 500;
}
.card-info { color: #d4d1d0; }
.info-divider { border-top: 3px solid hsla(0, 0%, 100%, 0.3); }
@media screen and (max-width: 991px) {
    #card-info-overlay { top: 54px; }
    #card-img { width: 200px; }
}
@media screen and (max-width: 982px) and (max-height: 1000px) {
    #card-info-container {
        max-height: 80vh;
        overflow-y: auto;
    }
}
@media screen and (min-width: 983px) and (max-height: 750px) {
    #card-info-right {
        max-height: 70vh;
        overflow-y: auto;
    }
}