﻿@charset "UTF-8";

@font-face {
    font-family: 'River Adventurer';
    src: url('res/fonts/River Adventurer.ttf') format('truetype');
}

@font-face {
    font-family: 'Vanderick';
    src: url(res/fonts/Vanderick.ttf) format('truetype');
}

:root {
    --titleShade: #3b0d41;
    --bodyColor: rgb(82, 45, 45);
    --bckgColor: #130938;
    --generalFont: 'Vanderick', Arial, Helvetica, sans-serif;
}

/* MAIN SECTION */
html {
    background: url(res/images/sunsetBckg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    background-color: var(--titleShade);
}

body {
    font-family: var(--generalFont);
    margin: 0;
    padding: 0;
    color: var(--bodyColor);
}


/* HEADER STARTS HERE */
header {
    text-align: center;
    margin-top: 1rem;
    letter-spacing: 1rem;
}

header h1 {
    font-family: 'River Adventurer', monospaced;
    text-shadow: 1px 5px 10px var(--bodyColor);
    font-size: 5rem;
    color: var(--titleShade);
}

/* ELEMENTS LAYOUT */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: calc(-5%);
}

/* ASIDE SECTION */
.aside {
    padding: 10px;
    flex: 0%;
}

.board-item {
    padding: 10px;
    flex: 45%;
}

.scoreTable {
    flex: 10%;
}


/* PLAYER AND BUTTON STARTS HERE */

#player img {
    width: 14rem;
    height: 100%;
}

aside button {
    margin-left: 13%;
}

button {
    font-family: 'Vanderick';
    font-size: 20px;
    color: white;
    background-color: var(--bckgColor);
    margin: 4px 2px;
    width: 12rem;
    height: 3rem;
    border-radius: 12px;
    border: whitesmoke solid;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

.aside button:hover {
    background-color: goldenrod;
    color: var(--bckgColor);
    border-style: solid;
    font-weight: bolder;
}

aside {
    flex: 10%;
    margin: 0 2rem 0 8rem;
}

aside button:hover {
    background-color: goldenrod;
    color: var(--bckgColor);
    border-style: solid;
    font-weight: bolder;
}

aside #player img {
    width: 17rem;
    height: 100%;
}

/* DICES STARTS HERE*/

.board-item h2 {
    text-align: center;
    border: var(--bodyColor) dotted;
    padding: 0.5rem;
}

.dice-flex {
    width: calc(15%);
/*     height: 8rem; */
    margin: 0 1rem;
}

/* SCORE TABLE STARTS HERE */

.scoreTable {
    float: right;
    margin: 0 60px;
}

.scoreTable table {
    table-layout: auto;
    width: 20rem;
    border-spacing: 1em .5em;
    background-color: var(--bckgColor);
    color: whitesmoke;
    border-bottom: 1px solid whitesmoke;
}

.scoreTable caption {
    caption-side: top;
    background-color: var(--titleShade);
    font-size: 2rem;
    padding: .5rem;
}

.scoreTable thead {
    color: skyblue;
    border-bottom: 2px solid whitesmoke;
}

.scoreTable thead th {
    font-size: medium;
}

.scoreTable td {
    border-right: 1px solid var(--bodyColor);
    border-bottom: 1px solid var(--bodyColor);
    padding: 0.3rem 1rem;
}

table {
    color: whitesmoke;
}

td:nth-child(even) {
    color: red;
}

/* RESTART GAME */
#restartGame {
    left: 42%;
    bottom: 0;
    text-align: center;
    position: fixed;
}

#restartGame button:hover {
    background-color: yellowgreen;
    color: var(--bodyColor);
}

/* RESPONSIVE PARTS STARTS HERE */
@media only screen and (max-width: 800px) {
   
    .container {
        height: 60%;
        margin: 1rem;
        text-align: center;
        display: flex;
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
        align-content: center;
        flex-direction: column-reverse;
    }

    .aside, .scoreTable, .board-item {
        flex: 100%;
        justify-content: center; 
    }

    header h1 {
        color: goldenrod;
        font-size: 5rem;
        margin-top: 10%;
    }

    .dices > * {
        width: 4rem;
        height: 4rem;
    }

    #player button {
        bottom: 3rem;
        position: fixed;
        left: 37%;
    }

    #player img {
        display: none;
    }
    
    .board-item {
        margin: 3rem 1rem;
    }

    img[id^=dice] {
        width: 7rem;
        height: 7rem;
        align-content: center;
    }

    #restartGame {
        right: -6.5rem;
        top: 0.3rem;
        float: right;
    }

}
