/* ----------Dice Box---------- */
div#box{
    width: 100%;
    max-width: 900px;
    min-width: 300px;

    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 28px;
    padding: 20px;
    box-sizing: border-box;

    backdrop-filter: blur(16px);
    box-shadow:
        0 20px 50px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.08);

    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ----------Top Controls---------- */
div.rollTop{
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

/* ----------Top Controls---------- */
div.rollTop{
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;
}

/* ----------Yahtzee---------- */
div.yahtzeeGroup{
    display: flex;
    align-items: center;
}

button.yahtzee{
    border: 1px solid rgba(125,92,255,0.22);

    background:
        linear-gradient(
            135deg,
            rgba(125,92,255,0.18),
            rgba(91,61,245,0.08)
        );

    color: #e7ddff;

    border-radius: 16px;

    padding: 10px 16px;

    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 8px 20px rgba(0,0,0,0.28);

    transition:
        transform .15s ease,
        border-color .2s ease,
        background .2s ease;
}

button.yahtzee:hover{
    transform: translateY(-2px);

    border-color: rgba(125,92,255,0.4);

    background:
        linear-gradient(
            135deg,
            rgba(125,92,255,0.28),
            rgba(91,61,245,0.14)
        );
}

button.yahtzee.active{
    border-color: rgba(255,255,255,0.75);

    background:
        linear-gradient(
            135deg,
            rgba(125,92,255,0.52),
            rgba(91,61,245,0.3)
        );

    color: #f4eeff;

    box-shadow:
        0 0 28px rgba(125,92,255,0.34),
        0 10px 24px rgba(0,0,0,0.34),
        inset 0 1px 0 rgba(255,255,255,0.12);
}
/* ----------Dropdown---------- */
div.dropdown{
    position: relative;
    z-index: 10;
}

button.drop-btn{
    min-width: 170px;

    border: 1px solid rgba(255,207,110,0.18);

    background: rgba(0,0,0,0.28);

    color: #fff3c4;

    border-radius: 16px;

    padding: 10px 16px;

    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 8px 20px rgba(0,0,0,0.28);

    transition:
        transform .15s ease,
        background .2s ease,
        border-color .2s ease;
}

button.drop-btn:hover{
    background: rgba(255,207,110,0.08);

    border-color: rgba(255,207,110,0.35);

    transform: translateY(-2px);
}

div.drop-list{
    position: absolute;
    top: calc(100% + 10px);
    left: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    width: 170px;

    background: rgba(18,18,24,0.96);
    border: 1px solid rgba(255,207,110,0.14);
    border-radius: 18px;

    backdrop-filter: blur(14px);

    max-height: 0;
    padding: 0 8px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        max-height .3s ease,
        padding .3s ease,
        opacity .18s ease .12s,
        visibility 0s linear .3s;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 20px 40px rgba(0,0,0,0.42);
}

div.drop-list.open{
    max-height: 280px;
    padding: 8px;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transition:
        max-height .3s ease,
        padding .3s ease,
        opacity .2s ease,
        visibility 0s;
}

div.drop-list a{
    color: rgba(255,255,255,0.86);

    text-decoration: none;

    padding: 11px 12px;

    border-radius: 12px;

    font-weight: 700;

    transition:
        background .15s ease,
        color .15s ease,
        transform .15s ease;
}

div.drop-list a:hover{
    background: rgba(255,207,110,0.1);

    color: #fff3c4;

    transform: translateX(3px);
}

/* ----------Roll Button---------- */
input[id="roll-btn"]{
    width: 190px;
    height: 56px;

    margin-top: 20px;

    border: none;
    border-radius: 18px;

    background:
        linear-gradient(135deg, #ffcf6e, #ff9a3c);

    color: #241400;

    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 2px;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(255, 174, 66, 0.35);

    transition:
        transform .12s ease,
        box-shadow .15s ease;
}

input[id="roll-btn"]:hover{
    transform: translateY(-3px);
}

input[id="roll-btn"]:active{
    transform: translateY(2px);
}

input#roll-btn.rolling{
    transform: translateY(3px);
    box-shadow:
        0 4px 10px rgba(255,174,66,0.2);
}

/* ----------Dice Area---------- */
div.cup{
    width: 100%;

    margin-top: 34px;
    margin-bottom: 8px;

    min-height: 105px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 24px;

    perspective: 1200px;
}

/* ----------Dice---------- */
div.dice{
    position: relative;

    width: 88px;
    height: 88px;

    transform-style: preserve-3d;
    transform: rotateX(30deg) rotateY(30deg);

    cursor: pointer;

    transition:
        transform .25s ease,
        filter .25s ease;
}

div.dice:hover{
    transform: rotateX(20deg) rotateY(20deg) translateY(-6px);
}

.roll{
    animation: roll 1s linear 0s 2;
}

@keyframes roll{
    from{transform: rotateX(0deg) rotateY(0deg);}
    to{transform: rotateX(360deg) rotateY(720deg);}
}

div.dice > div{
    position: absolute;

    width: 88px;
    height: 88px;

    border-radius: 18px;

    background:
        linear-gradient(145deg, #343434, #1f1f1f);

    border: 2px solid rgba(255, 207, 110, 0.10);

    box-sizing: border-box;

    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        inset 0 -10px 18px rgba(0,0,0,0.25),
        0 10px 24px rgba(0,0,0,0.35);
}

div.dice div p{
    max-width: 78px;

    text-align: center;

    padding: 4px;

    color: #fff4d6;

    font-size: 11px;
    font-weight: 700;

    line-height: 1.2;

    overflow-wrap: break-word;
}

/* ----------Held Dice---------- */
div.dice.hold > div{
    border-color: #ffcf6e;
    box-shadow:
        0 0 24px rgba(255,207,110,0.45),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ----------3D Positioning---------- */
.front{ transform: translateZ(44px); }
.back{ transform: translateZ(-44px) rotateY(180deg); }

.left{
    right: 44px;
    transform: rotateY(-90deg);
}

.right{
    left: 44px;
    transform: rotateY(90deg);
}

.top{
    bottom: 44px;
    transform: rotateX(90deg);
}

.bottom{
    top: 44px;
    transform: rotateX(-90deg);
}

/* ----------Hide---------- */
.hide{
    display: none !important;
}

/* ----------Form Heading---------- */
.editor-heading{
    width: 100%;
    text-align: center;
    color: white;
}

.editor-heading h2{
    font-size: 1.15rem;
    color: #fff3c4;
    margin-bottom: 4px;
}

.editor-heading p{
    font-size: .9rem;
    color: rgba(255,255,255,.65);
}

/* ----------Form---------- */
form#load-dice{
    width: min(100%, 900px);

    margin: 24px auto 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 24px;
}

div.inputs{
    width: 100%;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;

    gap: 14px;
}

div.column:not(.hide){
    min-width: 150px;
    max-width: 320px;
    flex: 1 1 150px;

    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;

    padding: 14px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    backdrop-filter: blur(12px);

    box-shadow:
        0 12px 28px rgba(0,0,0,0.25);
}

form#load-dice input[type="text"]{
    width: 100%;

    background: rgba(0,0,0,0.25);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 10px;

    padding: 8px 10px;

    color: white;

    outline: none;

    transition:
        border-color .2s ease,
        background .2s ease;
}

form#load-dice input[type="text"]:focus{
    border-color: #ffcf6e;
    background: rgba(255,255,255,0.06);
}

form#load-dice input[type="text"]::placeholder{
    color: rgba(255,255,255,0.45);
    letter-spacing: 1px;
}

form#load-dice input[id="load-btn"]{
    display: block;
    margin: 0 auto;
    width: 220px;
    height: 56px;
    align-self: center;

    border: none;
    border-radius: 18px;

    background:
        linear-gradient(135deg, #7d5cff, #5b3df5);

    color: white;

    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;

    cursor: pointer;

    box-shadow:
        0 10px 26px rgba(91,61,245,0.4);

    transition:
        transform .15s ease,
        box-shadow .2s ease;
}

form#load-dice input[id="load-btn"]:hover{
    transform: translateY(-2px);
}

form#load-dice input[id="load-btn"]:active{
    transform: translateY(2px);
}

.column label{
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.55);
    margin-bottom: -6px;
    margin-left: 2px;
}

.roll-hint{
    margin-top: 4px;

    font-size: .82rem;
    letter-spacing: .5px;

    color: rgba(255,255,255,.55);

    text-align: center;
}

/* ----------Responsive Cleanup---------- */
@media only screen and (max-width: 840px){

    div.rollTop{
        flex-direction: column;
        align-items: center;
    }

    button.drop-btn,
    button.yahtzee{
        width: 220px;
    }

    div.column:not(.hide){
        width: 100%;
        max-width: 320px;
        flex: 1 1 100%;
    }
}
