
html, body {
    background: var(--bg-color);
}

main {
    display: grid;
    opacity: 0;
    grid-template-columns: minmax(max-content,1fr) minmax(max-content,5fr) max-content;
    grid-template-rows: max-content minmax(0,1fr) max-content;
    background: var(--bg-color);
}


    main.active {
        opacity: 1;
        transition: opacity ease-out 500ms;
    }

.dice-link {
    color: var(--acc-color-dark);
    font-weight: bold;
    text-decoration: none;
}

    .dice-link:hover {
        color: var(--acc-color-mid);
        font-weight: bold;
        text-decoration: none;
    }

    .dice-link:visited {
        color: var(--acc-color-dark);
        font-weight: bold;
        text-decoration: none;
    }

.dice-logo {
    background-image: url(/img/dice-logo.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    height: 200px;
}

.patreon-logo {
    position: relative;
    top: -2px;
    display: inline-block;
    background-image: url(/img/patreon-logo-small.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 80px;
    height: 30px;
}

.gameboard-cell {
    position: relative;
    background-size: contain;
    filter: hue-rotate(var(--d-hue)) saturate(var(--d-saturate)) brightness(var(--d-brightness)) drop-shadow(var(--d-shadow));
}
.particle {
    position: absolute;
}
.particle-score {
    background-image: url(/img/score.png);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    width: 20px;
    height: 20px;
}
.dice-new {
    --d-shadow: 0 0 5px var(--acc-color-bright);
}

.dice-gameboard-max-size {
    grid-column: 2;
    grid-row: 2;
    pointer-events: none;
}
.dice-gameboard {
    background: #888;
    display: grid;
    grid-column: 2;
    grid-row: 2;
    grid-gap: 3px;
    position: relative;
    place-self: center;
    padding: 4px;
    border-radius: 5px;
    touch-action: none;
}
    .dice-gameboard.active {
        box-shadow: 0 0 20px rgb(96 73 216);
    }
    .dice-gameboard.paused::before {
        background: rgba(0,0,0,.5);
        content: 'Pause';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        color: white;
        padding: 50px;
        text-align: center;
        font-size: 8rem;
    }

.dice-score {
    grid-column: 2;
    grid-row: 1;
    color: var(--acc-color-bright);
    font-size: 4rem;
    text-align: center;
    align-items: center;
    display: inherit;
}

.dice-gameboard-cell {
    background: #aaa;
    border-radius: 2px;
}

.dice-players {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    grid-auto-rows: max-content;
    overflow: auto;
    margin: 0 5px;
}

@keyframes animation-hue-rotate {
    0% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(180deg);
    }

    100% {
        filter: hue-rotate(359deg);
    }
}
@keyframes animation-dice-rotate {
    0% {
        background-image: url(../img/1.png);
    }

    15% {
        background-image: url(../img/2.png);
    }

    30% {
        background-image: url(../img/3.png);
    }

    45% {
        background-image: url(../img/4.png);
    }

    60% {
        background-image: url(../img/5.png);
    }

    75% {
        background-image: url(../img/6.png);
    }
}
@keyframes animation-dice-rotateW {
    0% {
        background-image: url(../img/1w.png);
    }

    15% {
        background-image: url(../img/2w.png);
    }

    30% {
        background-image: url(../img/3w.png);
    }

    45% {
        background-image: url(../img/4w.png);
    }

    60% {
        background-image: url(../img/5w.png);
    }

    75% {
        background-image: url(../img/6w.png);
    }
}

@keyframes animation-dice-rotateJ {
    0% {
        background-image: url(../img/1j.png);
    }

    15% {
        background-image: url(../img/2j.png);
    }

    30% {
        background-image: url(../img/3j.png);
    }

    45% {
        background-image: url(../img/4j.png);
    }

    60% {
        background-image: url(../img/5j.png);
    }

    75% {
        background-image: url(../img/6j.png);
    }
}

.dice-player {
    position: relative;
    background: white;
    border-radius: 4px;
    padding: 5px;
    margin: 10px;
    margin-bottom: 0px;
    align-self: baseline;
    font-size: 1.4rem;
    display: grid;
    grid-template-columns: max-content 1fr max-content;
    grid-gap: 10px;
}
    .dice-player.active {
        box-shadow: 0px 0px 3px 3px var(--acc-color-mid);
    }
.dice-player-loading {
    position: absolute;
    background: var(--acc-color-mid);
    bottom: -1px;
    left: 0px;
    width: 0%;
    height: 5px;
    border-radius: 3px;
}
    .dice-player-name {
    }

.dice-player-indicator {
    width: 27px;
    height: 31px;
    border-radius: 4px;
    box-shadow: 0 0 2px inset rgb(0 0 0 / 70%);
}

.dice-help {
    display: grid;
    grid-column: 2;
    grid-row: 3;
    grid-template-columns: repeat(6,1fr);
    grid-auto-flow: dense;
    grid-auto-rows: max-content;
    justify-items: center;
    padding: 40px 0;
    height: 64px;
}


.die-display {
    width: 64px;
    height: 64px;
    background-size: contain;
    filter: hue-rotate(var(--d-hue)) saturate(var(--d-saturate)) brightness(var(--d-brightness)) drop-shadow(var(--d-shadow));
}
.dice-key {
    padding: 2px;
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    width: 21px;
    display: inline-block;
    text-align: center;
    border-radius: 6px;
    color: white;
    margin-right: 8px;
}

.dice-key-desc {
    display: inline-block;
    color: white;
    font-size: 1.2rem;
}

.dice-control {
    margin: 6px;
}


.dice-section-headline {
    text-align: center;
    font-size: 1.4rem;
    color: white;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 1;
    box-shadow: 0 0 10px black;
}

.dice-scoreboard {
    display: grid;
    grid-column: 3;
    grid-row: 2;
    grid-auto-rows: max-content;
    overflow: auto;
    margin: 0 5px;
}

.dice-scoreboard-headline {
    text-align: center;
    font-weight: bold;
    padding-bottom: 4px;
}

.dice-scoreboard-group {
    background: #eee;
    margin: 8px;
    margin-bottom: 0;
    padding: 10px;
    border-radius: 4px;
}

.dice-scoreboard-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    margin-top: 6px;
    background: #dbdbdb;
    padding: 7px;
    border-radius: 4px;
}

    .dice-scoreboard-item:nth-child(2n+1) {
        background: #c9c9c9;
    }

.dice-settings {
    display: grid;
    grid-column: 3;
    grid-row: 3;
    grid-auto-columns: max-content;
    grid-auto-rows: max-content;
    grid-auto-flow: column;
    margin-right: 40px;
    align-self:center;
}

.dice-setting {
    background: var(--acc-color-mid);
    padding: 7px;
    border-radius: 5px;
    color: white;
    font-size: 2rem;
    margin: 5px;
}

    .dice-setting:hover {
        filter: brightness(1.1);
    }

.property-values-2 {
    display: grid;
    grid-template-columns: max-content 1fr;
    grid-gap: 15px;
    align-items: center;
}

input.property-value[type='text'] {
    padding: 10px 15px;
    border-radius: 7px;
    border: 2px solid var(--acc-color-mid);
    font-size: 1.1rem;
}

.color-picker {
    position: relative;
    transform: scale(0);
    transition: transform 0.5s;
}

    .color-picker.show {
        transform: scale(1);
    }

.color-picker-swatch {
    position: absolute;
    width: 260px;
    height: 260px;
    background: white;
    top: -116px;
    left: -116px;
    border-radius: 150px;
    box-shadow: 0 0 30px rgb(0 0 0 / 50%);
}

.color-picker-swap {
    position: absolute;
    width: 30px;
    height: 30px;
    box-shadow: 0 0 1px rgb(0 0 0 / 80%);
    z-index: 3;
}

    .color-picker-swap:hover {
        filter: brightness(1.1);
        box-shadow: 0 0 1px rgb(0 0 0 / 30%);
    }
.hand-movable {
    display: grid;
    grid-auto-columns: 64px;
    grid-auto-rows: 64px;
    z-index: 1;
    position: fixed;
    pointer-events: none;
}

    .hand-movable .die-display{
        display:inline-block;
    }



.rotate {
    display: none;
    font-family: "Material Icons";
    grid-row: 3;
    font-size: 3rem;
    color: white;
    background: rgb(96 73 216);
    padding: 10px;
    text-align: center;
    margin: 4px;
    border-radius: 7px;
    margin-top:20px;
}
.rotate-left {
    grid-column: 1;
}
.rotate-right {
    grid-column: 2;
}
.reroll {
    display: none;
    font-family: "Material Icons";
    grid-row: 3;
    grid-column: 2;
    font-size: 3rem;
    color: white;
    background: rgb(96 73 216);
    padding: 10px;
    text-align: center;
    margin: 20px;
    border-radius: 7px;
    margin-top: 20px;
    justify-self: end;
    align-self: center;
}

    @media (orientation: portrait) {
        main {
            grid-template-columns: 1fr 1fr;
            grid-template-rows: max-content minmax(0,1fr) max-content max-content max-content;
        }

    .dice-gameboard-max-size {
        grid-column: 1 / span 2;
        grid-row: 2;
    }

    .dice-gameboard {
        grid-column: 1 / span 2;
        grid-row: 2;
    }

    .dice-score {
        grid-column: 1 / span 2;
        grid-row: 1;
    }

    .dice-players {
        display: none;
    }

        .reroll {
            grid-column: 1 / span 2;
            grid-row: 5;
        }

    .dice-help {
        grid-column: 1 / span 2;
        grid-row: 5;
    }

    .dice-settings {
        grid-column: 1 / span 2;
        grid-row: 6;
        justify-self: center;
        margin: 20px;
    }

    .hand-movable {
        position:fixed;
        top: 20%;
        left: 50%;
        align-items: center;
        padding: 32px;
        background: rgba(0,0,0,0.5);
        border-radius: 20px;
    }
    .rotate {
        display: block;
    }
}