:root {
    --primary-font: 'sans-serif';

    --primary-color-0: hsla(50, 100%, 30%, 1);
    --primary-color-50: hsla(50, 100%, 50%, 1);
    --primary-color-100: hsla(50, 100%, 90%, 1);
    --secondary-color-0: hsla(211, 100%, 35%, 1);
    --secondary-color-50: hsla(211, 100%, 53%, 1);
    --secondary-color-100: hsla(211, 100%, 75%, 1);
    --highlight-color-0: hsla(275, 82%, 25%, 1);
    --highlight-color-50: hsla(275, 82%, 39%, 1);
    --highlight-color-100: hsla(275, 82%, 85%, 1);

    --link-color: var(--secondary-color-0);

    --correct-answer-color: hsla(87, 100%, 50%, 1);
    --player-answer-color: hsla(345, 100%, 50%, 1);

    --black-color: black;
    --red-color: hsla(0, 100%, 45%, 1);
    --white-color: white;

    --content-side-padding: 0.75em;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: var(--primary-font);
}

h2,
h3,
h4 {
    margin-bottom: 0.45em;
    color: var(--secondary-color-0);
}

p {
    margin-bottom: 1.00em;
}

/**
 * Page layout
 */
.page-header {
    display: flex;
    align-items: center;
    gap: 1.50em;
    padding: var(--content-side-padding) 1.75em;
    background-color: var(--primary-color-50);
}

.page-header p {
    margin: 0;
}

.page-content {
    padding: var(--content-side-padding) 1.00em;
}

/**
 * Tables
 */
.table {
    width: 75%;
    margin: 0 auto;
    border-collapse: collapse;
    border: 1px solid var(--black-color);
}

.table th,
.table td {
    padding: 0.25em;
    border: 1px solid var(--black-color);
}

/**
 * Forms
 */
.form {
    width: 50%;
    margin: 0 auto;
}

.form--full {
    width: 100%;
}

.form input[type="text"],
.form input[type="password"],
.form input[type="email"],
.form input[type="number"],
.form select,
.form textarea {
    display: inline-block;
    width: 100%;
    padding: 0.25em;
    outline: 1px solid var(--highlight-color-0);
    font-size: 1em;
    font-family: var(--primary-font);
}

.form select[multiple=""] {
    min-height: 12em;
}

.form input[type="text"]:focus,
.form input[type="password"]:focus,
.form input[type="email"]:focus,
.form input[type="number"]:focus {
    outline: 1px solid var(--highlight-color-100);
    box-shadow: 0 0 0.50em var(--highlight-color-100);
}

.form input[type="number"] {
    width: max-content;
}

.errorlist {
    color: var(--red-color);
    text-align: center;
}

.questions-answer::marker {
    font-weight: bold;
}

/**
 * Form to create game room
 */
.homepage-game-room-form {
    padding: 0 17%;
}

.category-selection div.flex {
    gap: 1.50em;
}

.category-selection input[type="checkbox"] {
    --input-size: 1.50em;

    width: var(--input-size);
    height: var(--input-size);
    vertical-align: middle;
}

.category-selection label {
    display: inline-block;
    vertical-align: middle;
}

/**
 * Game room styles
 */
.correct-answer {
    background-color: var(--correct-answer-color);
}

.player-answer {
    background-color: var(--player-answer-color);
}

/**
 * Links
 */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:active,
a:hover,
a:focus {
    opacity: 0.75;
}

a:focus {
    border-bottom: 2px solid var(--link-color);
    outline: none;
}

/**
 * Buttons
 */
.button {
    display: inline-block;
    padding: 0.35em 1.25em;
    color: var(--white-color);
    background-color: var(--highlight-color-50);
    border: 1px solid var(--secondary-color-0);
    font-size: 1em;
    font-weight: normal;
    font-family: var(--primary-font);
    cursor: pointer;
}

.button--danger {
    color: var(--white-color);
    background-color: var(--red-color);
    border: 1px solid var(--secondary-color-0);
}

.button--bigger {
    font-size: 1.50em;
}

/**
 * Pagination
 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.50em;
    margin-top: 1em;
    list-style: none;
}

/**
 * Navigation
 */
.navigation ul {
    list-style: none;
}

.navigation li {
    display: inline-block;
    border-left: 1px solid var(--primary-color-100);
}

.navigation a {
    display: inline-block;
    padding: 1em 2.50em;
}

.navigation a:focus {
    border: none;
}

/**
 * Details widget
 */
details {
    margin-bottom: 1em;
}

summary {
    margin-bottom: 0.25em;
    font-size: 1.35em;
    font-weight: bold;
}

/**
 * Flexbox
 */
.flex {
    display: flex;
    flex-wrap: wrap;
}

.flex--column {
    flex-direction: column;
}

.flex--justify-center {
    justify-content: center;
}

.flex--align-center {
    align-items: center;
}

.flex--gap-2p00em {
    gap: 2.00em;
}

.flex__item-100 {
    flex-basis: 100%;
}

.flex__item-50 {
    flex-basis: 50%;
}

.flex__item--no-shrink {
    flex-shrink: 0;
}

.flex__item--no-grow {
    flex-grow: 0;
}

/**
 * Text
 */
.text-normal {
    font-size: 1rem;
}

.text-small {
    font-size: 0.85rem;
}

.text-smaller {
    font-size: 0.65rem;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-65ch {
    width: 65ch;
}

.helptext {
    font-size: 0.75em;
}

@media (max-width: 45em) {
    .homepage-game-room-form {
        padding: 0;
    }
}
