@font-face {
    font-family: "aceh";
    src: url(assets/Aceh.ttf);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    font-family: "aceh";
}

body {
    --dark: #000;
    --light: #fff;
    --gray: #a9a9b9;
    --background-1: #e0e9ee;
    --background-2: #dbcafe;
    --primary-light: #fedfb0;
    --primary-dark: #704d21;
    --primary-gray: #cba67c;
    --primary-strong: #ec8b53;
    --secondary-light: #e3d7ff;
    --secondary-dark: #4a3189;
    --secondary-gray: #a992d3;

    background-color: var(--light);
}

.cargo-ship {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 100svh;
}

.container {
    width: 100%;
    max-width: 700px;
    padding: 2rem 2rem 0rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media screen and (min-width: 700) { 
    .container {
        position: absolute;
        left: 50%;
        transform: translate(-50%, 0);
    }
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.title {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 2rem;
}

.greeting {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    min-width: 0;
}

.greeting p {
    font-size: 2rem;
    font-weight: 800;
}

.name {
    padding: 0.4rem;
    border: solid 2px var(--gray);
    border-radius: 0.3rem;
    max-width: 100%;
}

.name.set {
    border: none;
    font-size: 2rem;
    font-weight: 800;
    padding: 0;
    margin-left: -0.4rem;
}

.name.set:-webkit-autofill,
.name.set:-webkit-autofill:hover,
.name.set:-webkit-autofill:focus,
.name.set:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px var(--light) inset;
    -webkit-text-fill-color: var(--dark);
}

.name.set:-moz-autofill,
.name.set:-moz-autofill:hover,
.name.set:-moz-autofill:focus,
.name.set:-moz-autofill:active {
  box-shadow: 0 0 0px 1000px var(--light) inset;
  -moz-text-fill-color: var(--dark);
}

.profile img {
    width: 4.5rem;
    height: auto;
    cursor: pointer;
    clip-path: inset(7% round 30%);
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.buttons button {
    flex: 1;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: none;
    border-radius: 1.5rem;
    cursor: pointer;
}

.buttons button.orange {
    background-color: var(--primary-light);
}

.buttons button.orange .button-text p {
    color: var(--primary-gray);
}

.buttons button.orange .button-text h2 {
    color: var(--primary-dark);
}

.buttons button.purple {
    background-color: var(--secondary-light);
}

.buttons button.purple .button-text p {
    color: var(--secondary-gray);
}

.buttons button.purple .button-text h2 {
    color: var(--secondary-dark);
}

.button-text {
    text-align: start;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.button-text p {
    font-size: 1.1rem;
}

.button-text h2 {
    font-size: 1.5rem;
}

.buttons button.orange img {
    filter: brightness(0) saturate(100%) invert(60%) sepia(47%) saturate(600%) hue-rotate(336deg) brightness(96%) contrast(93%);
    height: 5rem;
    width: auto;
    padding-right: 0.5rem;
}

.buttons button.purple img {
    filter: brightness(0) saturate(100%) invert(19%) sepia(45%) saturate(2421%) hue-rotate(237deg) brightness(94%) contrast(94%);
    height: 5rem;
    width: auto;
    padding-right: 0.5rem;
}

.profile-picture-selection {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 10vh);
    max-width: 400px;
    background-color: #fffdf9;
    border-radius: 2rem;
    border: solid 0.2rem #fff0c7;
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.current-image {
    width: 5rem;
    height: auto;
    clip-path: inset(7% round 30%);
    margin: 1rem 0;
}

.profile-picture-selection h1 {
    margin-bottom: 1rem;
}

.profile-pictures {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.1rem;
    margin-bottom: 2rem;
}

.profile-pictures img {
    width: 3.5rem;
    height: auto;
    cursor: pointer;
    clip-path: inset(7% round 30%);
    transition: 0.2s ease-in-out;
}

.profile-pictures img.selected {
    transform: scale(50%);
}

.profile-picture-selection button {
    background-color: var(--primary-light);
    color: var(--dark);
    padding: 0.4rem 2.2rem;
    border: solid 0.2rem var(--primary-light);
    border-radius: 5rem;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.profile-picture-selection button:hover {
    background-color: transparent;
}

.leaderboard {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.leaderboard-title {
    font-size: 1.8rem;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.position {
    display: flex;
    flex-direction: row;
    gap: 1.4rem;
    align-items: center;
}

.position-index {
    font-size: 1.5rem;
    color: var(--gray);
}

.position img {
    width: 4.5rem;
    height: auto;
    clip-path: inset(7% round 30%);
}

.user {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.user-name {
    font-size: 1.2rem;
    font-weight: bold;
}

.user-score {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    font-weight: bold;
    color: var(--gray);
    align-items: center;
}

.separator {
    height: 0.2rem;
    width: 0.2rem;
    border-radius: 100%;
    background-color: var(--gray);
}

/* The quiz */

.green-bg {
    background-color: var(--background-1) !important;
}

.quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.8rem 0 0.8rem;
    min-height: 100svh;
    width: 100%;
}

.quiz-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 2rem;
}

.quiz-head a {
    position: absolute;
    left: 1rem;
    top: 1rem;
}

.quiz-head a img {
    width: clamp(3rem, 10vw, 5rem);
    height: auto;
}

.quiz-title {
    font-size: 1.7rem;
}

.progress-bar {
    width: 50vw;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 0%;
    background-color: var(--primary-strong);
    transition: width 0.3s ease;
}

.the-quiz {
    background-color: var(--light);
    border-radius: 2rem 2rem 0 0;
    padding: 1rem;
    width: 100%;
    flex: 1;
}

.question {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.question img {
    width: 200px;
    height: auto;
    margin: 2rem 0 3em 0;
}

.quiz-time {
    color: var(--primary-strong);
    background-color: var(--primary-light);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
}

.question-text {
    text-align: center;
    line-height: 2rem;
    margin: 1.5rem 0;
    font-size: 1.5rem;
}

.alternatives {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.alternatives button {
    background-color: var(--secondary-light);
    color: var(--secondary-dark);
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 100px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
}

.alternatives button:hover {
    background-color: #ad8cf5;
    color: var(--light);
}

.alternatives button.wrong:hover {
    background-color: #f14e4e;
    color: var(--light);
}

/* Result */

.result-cargo-ship {
    display: flex;
    justify-content: center;
    min-height: 100svh;
    width: 100%;
}

.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 0.8rem 0 0.8rem;
    flex: 1;
    max-width: 500px;
}

.result-box {
    border-radius: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    text-align: center;
    background-color: var(--secondary-light);
    color: var(--secondary-dark);
    gap: 1.5rem;
}

.result-head {
    background-color: var(--light);
    padding: 0.5rem 1.6rem;
    border-radius: 5rem;
}

.score-circle {
    --progress: 0%;
    width: clamp(120px, 40vw, 230px);
    height: clamp(120px, 40vw, 230px);
    border-radius: 50%;
    background: conic-gradient(#b49df7 0% var(--progress), #ddd0f8 0% 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.score-value {
    width: clamp(110px, 37vw, 210px);
    height: clamp(110px, 37vw, 210px);
    background: #fff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: solid 1rem var(--secondary-light);
}

.points {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: -0.2rem;
}

.points-total {
    font-size: 1rem;
    font-weight: bold;
    color: #9193a3;
}

.bottom-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.stats {
    width: 100%;
    padding: 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem 1rem;
}

.category {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category p {
    color: #9193a3;
    font-size: 1.2rem;
}

.category h1 {
    font-size: 2.5rem;
}

.save-score {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 0.8rem 2.5rem;
    background-color: transparent;
    border-radius: 10rem;
    border: solid 3px #b6b7c5;
    margin-bottom: 2rem;
    cursor: pointer;
    color: var(--dark);
}

.save-score:hover {
    border: solid 3px #cfcfd2;
    color: #cfcfd2;
}