* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    border: none;
    text-decoration: none;
    transition: all .3s linear;
}

html {
    overflow-x: hidden;
    scroll-padding-top: 7rem;
    scroll-behavior: smooth;
}

body {
    background: whitesmoke;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}




section {
    padding: 1rem 4%;
}

.container {
    overflow: hidden;
    background: white;
    max-width: 700px;
    margin: 0 auto;

    flex: 1;
    display: flex;
    flex-direction: column;

}


.header {
    flex-shrink: 0;
}

.header .head {
    background: #12343b;
}

.header .credit {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    font-size: 1.3rem;
    color: #e1b382;
    align-items: center;
}

.header .credit .logo {
    color: #e1b382;
}

.header .credit .navbar a {
    color: #e1b382;

}



.footer {
    flex-shrink: 0;
}

.footer .foot {
    background: #12343b;
}

.footer .credit {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    font-size: 1rem;
    color: #e1b382;
    align-items: center;
}

.footer .credit a {
    font-size: 1rem;
    color: #e1b382;
}

.home {
    display: flex;
    justify-content: space-around;
    gap: 1rem;

    flex: 1;


}









.yatzy-table {
    width: 450px;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.yatzy-table th,
.yatzy-table td {
    border: 1px solid #ddd;
    padding: .8rem;
    text-align: center;
}

.yatzy-table th {
    /* background: #4CAF50; */
    background: #c89666;

    color: white;
    font-size: 17px;

}

.yatzy-table td {

    font-size: 22px;

}

.yatzy-table tr:nth-child(even) {
    /* background: #f2f2f2; */
    background: #e1b382;

}

.yatzy-table tbody tr:nth-child(8) td {
    font-size: 22px;
    font-weight: bold;
    color: darkred;
}

.yatzy-table tbody tr:nth-child(7) td {
    font-size: 20px;
    color: darkred;
}

 @keyframes blinkRedGlow {
    0% {
        background-color: #c89666;
        color: white;
        box-shadow: none;
        text-shadow: none;
        opacity: 1;
    }

    50% {
        background-color: #ff0033;
        box-shadow: 0 0 30px rgba(255, 0, 0, 1), 0 0 60px rgba(255, 0, 0, 0.9);
        text-shadow: 0 0 10px #ff0033, 0 0 20px #ff0033, 0 0 40px #ff0033;
        opacity: 0.9;
    }

    100% {
        background-color: #c89666;
        color: white;
        box-shadow: none;
        text-shadow: none;
        opacity: 1;
    }
}

@keyframes blinkBlueGlow {
    0% {
        background-color: #c89666;
        color: white;
        box-shadow: none;
        text-shadow: none;
        opacity: 1;
    }

    50% {
        background-color: #00ccff;
        box-shadow: 0 0 30px rgba(0, 200, 255, 1), 0 0 60px rgba(0, 150, 255, 0.9);
        text-shadow: 0 0 10px #00ccff, 0 0 20px #00ccff, 0 0 40px #00ccff;
        opacity: 0.9;
    }

    100% {
        background-color: #c89666;
        color: white;
        box-shadow: none;
        text-shadow: none;
        opacity: 1;
    }
}

.yatzy-table th.active-player.player1 {
    animation: blinkRedGlow 1.2s infinite ease-in-out;
        box-shadow: 0 0 10px #df002d, 0 0 20px #df002d; 

}

.yatzy-table th.active-player.player2 {
    animation: blinkBlueGlow 1.2s infinite ease-in-out;
        box-shadow: 0 0 10px #00a8d2, 0 0 20px #00a8d2; 

}


/*  .yatzy-table th.active-player.player1 { 
    animation: blinkRedGlow 1.5s infinite alternate; 
    box-shadow: 0 0 10px #df002d, 0 0 20px #df002d; 
} 

.yatzy-table th.active-player.player2 { 
    animation: blinkBlueGlow 1.5s infinite alternate; 
    box-shadow: 0 0 10px #00a8d2, 0 0 20px #00a8d2; 
} 

@keyframes blinkRedGlow { 
    from { box-shadow: 0 0 10px #fb0838, 0 0 20px #fb0838; } 
    to { box-shadow: 0 0 20px #ff0033, 0 0 40px #ff0033; } 
}

@keyframes blinkBlueGlow { 
    from { box-shadow: 0 0 10px #0accfc, 0 0 20px #0accfc; } 
    to { box-shadow: 0 0 20px #00ccff, 0 0 40px #00ccff; } 
} */




.container-dice {
    display: grid;
    place-items: center;
    width: 250px;
    padding: 60px 0 40px;
    gap: .5rem;
    background: #c89666;
    /* background: linear-gradient(to bottom, #a35139, #ffb162); */

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;


}

/*
    Dice Styles
*/

.dice {
    position: relative;
    width: 90px;
    height: 90px;
    transform-style: preserve-3d;
    transition: 1s ease;
}

@keyframes rolling {
    50% {
        transform: rotateX(455deg) rotateY(455deg);
    }
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 5px solid #f6f3f0;
    transform-style: preserve-3d;
    background: linear-gradient(145deg, #dddbd8, #fff);
}

.face::before {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: #f6f3f0;
    transform: translateZ(-1px);
}

.face::after {
    position: absolute;
    content: '';
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #131210;
}

.front {
    transform: translateZ(50px);
}

.back {
    transform: rotateX(180deg) translateZ(50px);
}

.top {
    transform: rotateX(90deg) translateZ(50px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(50px);
}

.right {
    transform: rotateY(90deg) translateZ(50px);
}

.left {
    transform: rotateY(-90deg) translateZ(50px);
}

.front::after {
    width: 30px;
    height: 30px;
    background: #f63330;
    margin: -15px 0 0 -15px;
}

.back::after {
    margin: -35px 0 0 -30px;
    box-shadow: 40px 0,
        0 25px,
        40px 25px,
        0 50px,
        40px 50px;
}

.top::after {
    margin: -30px 0 0 -30px;
    box-shadow: 40px 40px;
}

.bottom::after {
    margin: -36px 0 0 -36px;
    box-shadow: 26px 26px,
        52px 52px,
        52px 0,
        0 52px;
}

.right::after {
    margin: -30px 0 0 -30px;
    box-shadow: 40px 0,
        0 40px,
        40px 40px;
}

.left::after {
    margin: -35px 0 0 -35px;
    box-shadow: 25px 25px,
        50px 50px;
}

/*
    Roll Button styles
*/

.new-roll,
.roll {
    cursor: pointer;
    color: #b33951;
    margin-top: 60px;
    padding: 6px 12px;
    border-radius: 3px;
    font: 700 16px 'Montserrat';
    border: 2px solid #e1b382;
    transition: .4s;
}

.roll:hover {
    color: #fff;
    background: #12343b;
}

.new-roll:hover {
    color: #fff;
    background: #12343b;
}

.roll {
    margin-bottom: 5px;
}

.new-roll {
    margin-top: 0;
}






@media screen and (max-width: 480px) {
    section {
        padding: 0.5rem 2%;
    }


    .container {
        max-width: 100%;

    }




    .header .credit {
        font-size: 1rem;
        gap: 0.2rem;
    }

    .footer .credit {
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }

    .footer .credit a {
        font-size: 0.8rem;
    }

    .home {
        gap: 1rem;
    }

    .yatzy-table {
        width: 100%;
        font-size: 14px;
    }

    .yatzy-table th {
        font-size: 14px;
    }

    .yatzy-table td {
        font-size: 16px;
    }


    .container-dice {
        padding: 30px 0 20px;
        width: 270px;

    }


    .new-roll,
    .roll {
        font-size: 14px;
        padding: 5px 10px;
        margin-top: 5px;
    }

    .yatzy-table tbody tr:nth-child(8) td {
        font-size: 16px;
    }

    .yatzy-table tbody tr:nth-child(7) td {
        font-size: 15px;
    }

}

@media screen and (min-width: 481px) and (max-width: 767px) {
    section {
        padding: 0.5rem 5%;
    }

    .container {
        max-width: 100%;

    }



    .header .credit {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .footer .credit {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .yatzy-table {
        width: 100%;
        font-size: 14px;
    }

    .yatzy-table th {
        font-size: 14px;
    }

    .yatzy-table td {
        font-size: 14px;
    }

    .container-dice {
        padding: 30px 0 10px;
        width: 300px;

    }



    .new-roll,
    .roll {
        font-size: 14px;
        padding: 5px 10px;
        margin-top: 20px;
    }

    .yatzy-table tbody tr:nth-child(8) td {
        font-size: 16px;
    }

    .yatzy-table tbody tr:nth-child(7) td {
        font-size: 14px;
    }

}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    section {
        padding: 0.5rem 5%;
    }



    .header .credit {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .footer .credit {
        font-size: 0.9rem;
        gap: 0.2rem;
        text-align: center;
    }

    .yatzy-table {
        width: 100%;
        font-size: 18px;
    }

    .yatzy-table th {
        font-size: 17px;
    }

    .yatzy-table td {
        font-size: 16px;
    }

    .container-dice {
        padding: 30px 0 10px;
        width: 320px;

    }



    .new-roll,
    .roll {
        font-size: 14px;
        padding: 5px 10px;
        margin-top: 5px;
    }

    .yatzy-table tbody tr:nth-child(8) td {
        font-size: 18px;
    }

    .yatzy-table tbody tr:nth-child(7) td {
        font-size: 20px;
    }
}

@media screen and (min-width: 1025px) and (max-width: 1440px) {
    section {
        padding: 0.5rem 5%;
    }



    .header .credit {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .footer .credit {
        font-size: 0.9rem;
        gap: 0.2rem;
        text-align: center;
    }

    .yatzy-table {
        width: 100%;
        font-size: 18px;
    }

    .yatzy-table th {
        font-size: 17px;
    }

    .yatzy-table td {
        font-size: 16px;
    }

    .container-dice {
        padding: 30px 0 10px;
        width: 350px;

    }



    .new-roll,
    .roll {
        font-size: 14px;
        padding: 5px 10px;
        margin-top: 5px;
    }

    .yatzy-table tbody tr:nth-child(8) td {
        font-size: 22px;
    }

    .yatzy-table tbody tr:nth-child(7) td {
        font-size: 20px;
    }
}

@media screen and (min-width: 1441px) {
    section {
        padding: 0.5rem 5%;
    }



    .header .credit {
        font-size: 1rem;
        gap: 0.5rem;
    }

    .footer .credit {
        font-size: 0.9rem;
        gap: 0.2rem;
        text-align: center;
    }

    .yatzy-table {
        width: 100%;
        font-size: 18px;
    }

    .yatzy-table th {
        font-size: 20px;
    }

    .yatzy-table td {
        font-size: 22px;
    }

    .container-dice {
        padding: 30px 0 10px;
        width: 450px;

    }



    .new-roll,
    .roll {
        font-size: 16px;
        padding: 5px 10px;
        /* margin-top: 5px; */
    }

    .yatzy-table tbody tr:nth-child(8) td {
        font-size: 24px;
    }

    .yatzy-table tbody tr:nth-child(7) td {
        font-size: 22px;
    }
}