* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background: #111;
    color: white;
}


body {
    display: flex;
    justify-content: center;
    align-items: flex-start;

    width: 100%;
    height: 100%;
    overflow: hidden;
}

#app {
    width: 100%;
    max-width: 600px;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            rgba(0,0,0,0.65),
            rgba(0,0,0,0.85)
        ),
        #222;
}



/* TOP */

#topBar {
    height: 42px;
    width: 100%;

    padding: 0;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#181818;

    border:0;

    overflow:hidden;
}


.game-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
}



/* CONTENT */

#content {
    flex: 1;
    overflow:hidden;
    position:relative;
    min-height:0;
    width:100%;
    max-width:100%;
}


.screen {
    display:none;
    height:100%;
    width:100%;
    overflow-y:auto;
    overflow-x:hidden;
    padding:10px;
    text-align:center;
}


.screen.active {
    display: block;
}

#gameScreen.screen.active {
    display: flex;
}

/* BUTTONS */

button {
    width: 90%;
    max-width: 320px;

    min-height: 54px;

    margin: 10px auto;
    padding: 10px 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 14px;

    background: #333;
    color: white;

    font-size: 18px;
    font-weight: bold;

    box-shadow: 0 3px 8px black;
}

button:active {
    transform: scale(0.97);
}



/* HOME */

.logo {
    font-size: 90px;
    margin: 50px 0 30px;
}



/* SETUP */

.player-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}


.player-buttons button {
    width: 60px;
}


input {
    width: 90%;
    max-width: 320px;
    padding: 14px;
    margin: 8px;

    border-radius: 10px;
    border: none;

    font-size: 18px;
}


/* GAME */

.game-status {

    display: flex;

    justify-content: space-between;

    align-items: center;

    height: 35px;

    padding: 0 15px;

    font-size: 16px;

    margin: 0;

    background: transparent;

}


.dice {

    aspect-ratio: 1;

    background: white;

    color: black;

    border-radius: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 45px;

    box-shadow: 0 5px 12px black;

}


/* GAME LAYOUT */

#gameScreen {
    display: none;
    height: 100%;
    flex-direction: column;
    overflow:hidden;
}


.dice-area {

    flex: 1;

    display: grid;

    grid-template-columns: repeat(3,1fr);

    gap: 20px;

    align-content: center;

    margin-top: 0;

}


.action-buttons {

    margin-top: auto;

    padding-bottom: 10px;

    display: flex;

    gap: 10px;

    justify-content: center;

}


.action-buttons button {

    flex: 1;

    width: auto;

    max-width: none;

    margin: 0;

    padding: 14px 5px;

    background: #555;

}

/* SCORE */

.score-list {

    text-align: left;

}


.score-list div {

    background: #222;

    margin: 6px 0;

    padding: 14px;

    border-radius: 10px;

    font-size: 18px;

    display: flex;

    justify-content: space-between;

}


.score-list span {

    color: #aaa;

}


hr {

    border: 0;

    height: 1px;

    background: #555;

}



/* HIGHSCORE */

.highscore {

    background: #222;

    padding: 20px;

    border-radius: 12px;

    font-size: 20px;

    line-height: 2;

}



/* BOTTOM MENU */

#bottomMenu {
    height: 70px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    background: #181818;
    border-top: 2px solid #444;
    z-index: 10;
}


#bottomMenu button {
    flex: 1;
    height: 70px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #333;
    color: white;

    font-size: 16px;

    border: 1px solid #555;
    border-radius: 0;

    box-shadow: none;
}


/* LANDSCAPE */

@media screen and (orientation: landscape) {

    #app {

        max-width: 900px;

    }

}

