@media (min-width: 2440px) {
    :root {
        font-size: 48px;
        --rem: 48px;
    }
}

@media (max-width: 2440px) {
    :root {
        font-size: 40px;
        --rem: 40px;
    }
}

@media (max-width: 1800px) {
    :root {
        font-size: 36px;
        --rem: 36px;
    }
}

@media (max-width: 1440px) {
    :root {
        font-size: 32px;
        --rem: 32px;
    }
}

@media (max-width: 1080px) {
    :root {
        font-size: 20px;
        --rem: 20px;
    }   
}

@media (max-width: 640px) {
    :root {
        font-size: 16px;
        --rem: 16px;
    }   
}

@media (max-width: 400px) {
    :root {
        font-size: 12px;
        --rem: 12px;
    }   
}

@media (max-width: 280px) {
    :root {
        font-size: 8px;
        --rem: 8px;
    }   
}

:root {
    --light: #d8dbe0;
    --dark: #28292c;
    --light-bg: hsla(218, 11%, 86%, 0.25);
    --dark-bg: hsla(225, 5%, 16%, 0.25);
    --light-container: hsl(218, 11%, 100%);
    --dark-container: hsl(225, 5%, 0%);
    --primary-light: hsl(50, 100%, 50%);
    --primary-container-light: hsl(50, 100%, 6%);
    --primary-bg: hsla(50, 40%, 30%, 0.25);
    --secondary-light: hsl(90, 100%, 40%);
    --secondary-container-light: hsl(90, 100%, 20%);
    --secondary-bg-light: hsla(90, 100%, 40%, 0.25);
    --primary-dark: hsl(50, 50%, 10%);
    --primary-container-dark: hsl(50, 100%, 70%);
    --secondary-dark: hsl(90, 100%, 60%);
    --secondary-container-dark: hsl(90, 100%, 80%);
    --secondary-bg-dark: hsla(90, 100%, 60%, 0.25);
}

*, *::after, *::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

* {
    transition: all 130ms ease-in-out;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.disabled {
    display: none;
}

.container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: min-content min-content auto;
    justify-content: start;
    gap: 0.4rem;
    align-items: start;
    text-align: center;
    height: 100vh;

    padding: 0 0.4rem 0 0.4rem;
    background-color: var(--primary-light);
    color: var(--dark);
}

.game {
    width: 100%;
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    /* grid-template-rows: repeat(auto-fit, 1fr); */
    gap: 0.4rem;
    
    border-radius: 0.4rem;
    background-color: var(--primary-container-dark);
    color: var(--dark);
}

.players {
    display: flex;
    justify-content: space-around;
    grid-column: span 8;
    font-weight: 700;
    font-size: 1.5rem;
}

.labels, .guesses, .input {
    padding: 0.4rem;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    /* Subgrid compatibility on Phone */
    grid-column: 1 / 9;
    gap: 0.4rem;
    text-align: left;
}

@supports (grid-template-columns: subgrid) {
    .labels, .guesses, .input {
        padding: 0.4rem;
        display: grid;
        grid-template-columns: subgrid;
        grid-column: 1 / 9;
        gap: 0.4rem;
        text-align: left;
    }    
}


.labels {
    font-weight: 600;
    font-size: 1.2rem;
}

.guesses {
    background-color: var(--primary-bg);
    border-radius: 0.5rem;
    /* padding: 0.4rem; */
}

.tab {
    border-bottom: 0.08rem solid var(--dark);
}

.guess {
    grid-column: span 3;
    border: 1px #5555;
    text-align: left;
}

.num, .number {
    grid-column: span 2;
}

button {
    border: none;
    padding: 0.2rem;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
    font-size: inherit;

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

.active {
    border-radius: 0.1rem;
    background-color: var(--primary-dark);
}

button:hover {
    border-radius: 0.1rem;
    background-color: var(--primary-dark);
}

.nav {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.2rem 1rem 0.2rem;
    /* margin-bottom: 1rem; */
    border-radius: 0 0 0.4rem 0.4rem;
    
    background-color: var(--light-container);
    color: var(--dark);
}

.nav.full {
    flex-direction: row;
    height: 100%;
}

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

#menu {
    padding: 0.8rem;
    width: 3.2rem;
    height: 3.2rem;
    cursor: pointer;
}

.nav.drop > *:not(:first-child) {
    display: none;
}

.nav.drop.dropped {
    /* height: 100vh; */
    gap: 1rem;
}

.nav.drop.dropped > *:not(:first-child) {
    display: inline;
}

.display {
    font-weight: 700;
    font-size: 2.4rem;
}

.title {
    font-weight: 600;
    font-size: 1.5rem;
}

.subtitle {
    font-weight: 400;
    font-size: 1.1rem;
}

.text {
    font-weight: 350;
    font-size: 0.9rem;
}

.link {
    color: var(--dark-container);
    cursor: pointer;
}

footer {
    width: 100%;
    display: flex;
    padding: 1rem;
    justify-content: space-evenly;
    align-items: center;
    align-self: end;
}

.wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    flex-grow: 1;
    gap: 2rem;
}

.spacer {
    flex-grow: 1;
}


.tooltip.wrapper {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    margin: auto;
    text-align: center;
    width: 100%;
    height: 100%;
    background-color: hsla(225, 5%, 16%, 0.933);
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow-x: hidden;
}

.tooltip.bg {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    text-align: center;
    background-color: hsl(218, 11%, 86%);
    justify-content: center;
    align-items: center;
    width: clamp(30ch, 50%, 75ch);
    gap: 1rem;
    border-radius: 0.4rem;
}

.tooltip.box {
    border: none;
    border-radius: 0.4rem;
    padding: calc(var(--rem) * 0.4);
    width: 100%;
    height: auto;
}

.tooltip.box:focus {
    border-radius: 0.1rem;
}

.tooltip.close {
    width: clamp(33%, 50%, 100%);
}


/* Inserted toggle animation */

/* Credits go to: Madflows on UIVerse */

.toggle-switch {
    position: relative;
    --wid: 3rem;
    --hei: 1.5rem;

    width: var(--wid);
    height: var(--hei);
    --link: rgb(27, 129, 112);
    --link-hover: rgb(24, 94, 82);

    display: flex;
  }
  
  .switch-label {
    position: absolute;
    width: 100%;
    height: var(--hei);
    background-color: var(--dark);
    border-radius: calc(var(--hei) / 2);
    cursor: pointer;
    border: calc(var(--wid) / 25) solid var(--dark);

    display: flex;
    align-items: center;
  }
  
  .checkbox {
    position: absolute;
    display: none;
  }
  
  .slider {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--hei) / 2);
    -webkit-transition: 0.3s;
    transition: 0.3s;
  }
  
  .checkbox:checked ~ .slider {
    background-color: var(--light);
  }
  
  .slider {
    display: flex;
  }

  .slider::before {
    content: "";
    position: absolute;
    /* top: calc(var(--hei) / 5); */
    align-self: center;
    left: calc(var(--wid) / 10);
    width: calc(var(--wid) / 4);
    height: calc(var(--hei) / 2);
    border-radius: 50%;

    --min-bor: calc(var(--wid) / 25);
    -webkit-box-shadow: inset calc(var(--min-bor) * 3) calc(var(--min-bor) * -1) 0px 0px var(--light);
    box-shadow: inset calc(var(--min-bor) * 3) calc(var(--min-bor) * -1) 0px 0px var(--light);
    background-color: var(--dark);
    -webkit-transition: 0.3s;
    transition: 0.3s;
  }
  
  .checkbox:checked ~ .slider::before {
    -webkit-transform: translateX(calc(var(--wid) / 2));
    -ms-transform: translateX(calc(var(--wid) / 2));
    transform: translateX(calc(var(--wid) / 2));
    background-color: var(--dark);
    -webkit-box-shadow: none;
    box-shadow: none;
  }
  