@font-face {
    font-family: 'Upheaval';
    src: url("/assets/fonts/upheavtt.ttf");
}

@font-face {
    font-family: 'team-meat';
    src: url("/assets/fonts/IsaacGame.ttf");
}

@font-face {
    font-family: 'Material Symbols Outlined';
    src: url("/assets/fonts/MaterialSymbolsOutlined.woff2") format('woff2'),
         url("/assets/fonts/MaterialSymbolsOutlined.ttf");
}

@font-face {
    font-family: 'Material Symbols Rounded';
    src: url("/assets/fonts/MaterialSymbolsRounded.woff2") format('woff2'),
         url("/assets/fonts/MaterialSymbolsRounded.ttf");
}

@font-face {
    font-family: 'Montserrat';
    src: url("/assets/fonts/Montserrat.ttf");
}
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat';
}

body {
    padding: 10px;
    height: 100vh;
}

@media (max-width: 768px) {
    body {
        max-height: 93vh !important;
    }
}


button, input, optgroup, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button:active {
    transform: scale(0.9);
}

ol, ul {
    list-style: none;
    padding: 0;
}

#background {
    transition: background .2s ease-in;
}

.upheaval {
    font-family: 'Upheaval';
}

.team-meat {
    font-family: 'team-meat';
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;  /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;  /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

.symbol-fill {
    font-variation-settings: 'FILL' 1;
}


/******* Modaux *******/

#modal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 100%;
}

.modal-content {
    margin: 0 auto;
    padding: 20px;
    width: 90%;
    height: 90%;
    border-radius: 5px;
    border: 3px solid;
}

.close-button {
    border: none;
    font-size: 1.5em;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background-color: inherit;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    background: none;
}

.topright {
    position: absolute;
    top: -10px;
    right: 0;
}

.modal-content button {
    margin: 0 auto;
    display: block;
    margin-top: 20px;
    padding: 3px 10px;
    border: 2px solid;
    font-variation-settings: 'GRAD' -25;
    transition: all 0.5 ease;
}


/******* LE JEU ********/

#cards-game {
    border-radius: 2.5rem;
}

#cards-win section:nth-child(4) {
    margin-bottom: 0;
}

/* #cards-win, #cards-module {
    width: -webkit-fill-available;
} */

.pixelated {
    image-rendering: pixelated;
}

.hearts img {
    image-rendering: pixelated;
    width: 3em;
}

.card-module {
    border-radius: 5px;
    margin: 2px;
    cursor: pointer;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

@media (min-width: 768px) {
    .card-module {
        padding: 0.5em;
        /* width: 112px !important; J'ai pas trouvé mieux pour le moment
        height: 112px !important; */
    }
}

.card-module.transition {
    transition: all 0.5s ease;
}

.card-module img {
    width: 6em;
    image-rendering: pixelated;
}

.card-module--content {
    display: none;
}

@media (max-width: 768px) {
    .card-module span {
        font-size: 0.5rem;
        font-weight: 800;
        word-break: break-word;
    }

    label.card-module {
        height: -webkit-fill-available;
        /* aspect-ratio: auto;  */
        display: flex;
        align-items: center;   
    }

    .easy img {
        width: 3em;
        font-size: 0.80rem;
    }
}

@media (min-width: 768px) {
    .easy img {
        width: 4em;
        font-size: 0.80rem;
    }
}


.easy .card-module--content {
    display: flex;
}

.card-module--disabled {
    cursor: default;
}

.rainbow {
    animation: rainbow 1s steps(36) infinite;
    -webkit-animation: rainbow 1s steps(36) infinite;
}

.card-module--shake {
    animation: shake 0.5s;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.solved-group {
    padding: 5px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.solved-group--title {
    font-size: x-large;
}

.solved-group--card {
    margin: 0 5px;
}

.solved-group--card img {
    width: 3em;
    image-rendering: pixelated;
}

@media (max-width: 768px){
    .solved-group--card img {
        width: 2em;
    }
}

.solved-group--cards {
    display: flex;
    flex-wrap: wrap;
}

.solved-group--card {
    display: flex;
    align-items: center;
}

.button--disabled:active {
    transform: scale(1);
}

.message {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-weight: 800;
}

.page    { display: none; padding: 0 0.5em; }

/***** Random Settings *********/



/***** Group Creator *********/

.infos {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-weight: 800;
    position: absolute;
    z-index: 2;
}

.group.selected {
    border: 2px solid #000;
}

.item.selected {
    background-color: #5a5a5a;
}

pre {outline: 1px solid #ccc; padding: 5px; margin: 5px; }
.string { color: green; }
.number { color: darkorange; }
.boolean { color: blue; }
.null { color: magenta; }
.key { color: red; }

select#quality option[value="Quality 0"] { background-image:url(/assets/gfx/Quality\ 0.png);   }
select#quality option[value="Quality 1"] { background-image:url(/assets/gfx/Quality\ 1.png); }
select#quality option[value="Quality 2"] { background-image:url(/assets/gfx/Quality\ 2.png); }
select#quality option[value="Quality 3"] { background-image:url(/assets/gfx/Quality\ 3.png); }

.menu {
    position: fixed;
    top: 0;
    width: 400px;
    height: 100%;
    background-color: #333;
    color: white;
    overflow-x: hidden;
    transition: 0.5s;
}

.menu-right {
    right: -400px;
}

.menu-left {
    width: 800px;
    left: -800px;
}

.menu ul {
    list-style-type: none;
    padding: 0;
}

.menu ul li {
    padding: 8px 16px;
    text-decoration: none;
    font-size: 25px;
    color: white;
    display: block;
    transition: 0.3s;
}

.menu ul li:hover {
    background-color: #575757;
}

.menu-button {
    position: fixed;
    bottom: 20px;
    padding: 15px 25px;
    font-size: 16px;
    color: white;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.menu-button-right {
    right: 20px;
}

.menu-button-left {
    left: 20px;
}

.menu-button:hover {
    background-color: #0056b3;
}

/***** TOOLTIPS *********/

#tooltip-wrapper
{
    position: fixed;
    transition: all 0.5s ease;
    bottom: 5.25rem;
}

#bigmodal-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

#tooltip-icons span
{
    cursor: pointer;
}

@media (max-width: 768px) {
    #tooltips {
        width: 100%;
        bottom: 0;
        z-index: 99;
    }
    
    #tooltip-icons {
        display: none;
    }

    #tooltip-mobile {
        content: "";
        position: absolute;
        left: 50%;
        top: -20px; 
        margin-left: -10px;
        border-width: 10px;
        border-style: solid;
        border-color: transparent transparent #fff transparent;
    }

    #tooltips.active {
        padding: 5px;
    }

    #tooltips.active #tooltip-mobile {
        content: "";
        margin-left: -10px;
        border-width: 10px;
        border-style: solid;
        border-color: #fff transparent transparent  transparent;
    }
}

.tooltip {
    position: relative;
    text-align: center;
    padding: 5px 10px;
    z-index: 1;
    /* animation: tooltip-show 0.5s ease; */
}

.tooltip-content {
    position: relative;
}

.tooltip-active {
    transform: translateY(-10px);
    transition: transform 0.5s ease;
}

.tooltip-inactive {
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.shuffle-mobile {
    display: none;
}

@media (min-width: 768px) { 
    #tooltip-wrapper::after {
        content: "";
        position: absolute;
        left: 50%;
        margin-left: -17px;
        border-width: 17px;
        border-style: solid;
        -webkit-animation-fill-mode: forwards; 
        -moz-animation-fill-mode: forwards;    
        -o-animation-fill-mode: forwards;      
        -ms-animation-fill-mode: forwards;     
        animation-fill-mode: forwards;
    }

    #tooltip-wrapper::after {
        top: -30px;
        /* animation: tooltip-show 0.5s ease; */
        transition: all 0.5s ease;
        bottom: unset;
    }

    #tooltip-wrapper[data-index="0"]::after {
        left: 7%;
    }

    #tooltip-wrapper[data-index="1"]::after {
        left: 15%;
    }

    #tooltip-wrapper[data-index="2"]::after {
        left: 20%;
    }

    #tooltip-wrapper[data-index="3"]::after {
        left: 29.5%;
    }

    #tooltip-wrapper[data-index="4"]::after {
        left: 38%;
    }

    #tooltip-wrapper[data-index="5"]::after {
        left: 51%;
    }

    #tooltip-wrapper[data-index="6"]::after {
        left: 70%;
    }

    #tooltip-wrapper[data-index="7"]::after {
        left: 80%;
    }
 }

 @media (max-width: 768px) {
    .tooltip-active::after {
        content: "";
        position: absolute;
        /* animation: tooltip-show 0.5s ease, invisible 0.5s ease; */
        transform: translateY(20px);
        bottom: 50px;
        margin-left: -28px;
        border-width: 17px;
        border-style: solid;
        -webkit-animation-fill-mode: forwards; 
        -moz-animation-fill-mode: forwards;    
        -o-animation-fill-mode: forwards;      
        -ms-animation-fill-mode: forwards;     
        animation-fill-mode: forwards;
    }
 }

  
.theme-selection select {
    width: 100%;
    height: 40px;
    padding-left: 50px;
    border: none;
    outline: none;
    display: inline-block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    text-align: left;
}

.theme-selection label {
    position: relative;
}

.theme-selection label:after {
    content: "< >";
    font-size: 11px;
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
    font-weight: 900;
    left: 20px;
    top: 10px;
    padding: 0 0 2px;
    position: absolute;
    pointer-events: none;
}

.theme-selection option {
    text-align: left;
}

/********** GAME CREATOR *************/
.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 80%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1;

}

.disabled {
    pointer-events: none;
    opacity: 0.5;
}

@media (max-width: 768px) {
    #game-creator .card-module img {
        width: 4em;
    }
}

/********** LOADER *************/
.loader {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

#square-loader {
    height: 30px;
    aspect-ratio: 2.5;
    --_g: no-repeat linear-gradient(#fff 0 0);
    background: var(--_g), var(--_g), var(--_g), var(--_g);
    background-size: 20% 50%;
    animation: l44 1s infinite linear alternate;
}

#tboi-loader {
    height: 40%;
    aspect-ratio: 1;
    image-rendering: pixelated;
    background-size: 100% 100%;
    background-image: url("/assets/loading-1.png");
    animation: loader 0.2s infinite step-start alternate;
}

.button--language-active[data-lang="fr"] {
    background: linear-gradient(to right, blue 33%, white 33%, white 66%, red 66%);
    color: #000;
}

.errors {
    color: darkred;
    font-weight: bold;
}

.group-list ul {
    list-style-type: disc;
    padding: 0;
}

@keyframes loader {
    0% {
        background-image: url("/assets/loading-1.png");
    }
    50%
    {
        background-image: url("/assets/loading-2.png");
    }
}

@keyframes l44 {
    0%,
    5%    {
        background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50%;
    }
    12.5% {
        background-position: calc(0*100%/3) 0   ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50%;
    }
    25%   {
        background-position: calc(0*100%/3) 0   ,calc(1*100%/3) 0   ,calc(2*100%/3) 50% ,calc(3*100%/3) 50%;
    }
    37.5% {
        background-position: calc(0*100%/3) 100%,calc(1*100%/3) 0   ,calc(2*100%/3) 0   ,calc(3*100%/3) 50%;
    }
    50%   {
        background-position: calc(0*100%/3) 100%,calc(1*100%/3) 100%,calc(2*100%/3) 0   ,calc(3*100%/3) 0;
    }
    62.5% {
        background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 100%,calc(2*100%/3) 100%,calc(3*100%/3) 0;
    }
    75%   {
        background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 100%,calc(3*100%/3) 100%;
    }
    87.5% {
        background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 100%;
    }
    95%,
    100%  {
        background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50%;
    }
}

/******** KEY FRAMES ********/

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(10deg);
    }
    20% {
        transform: rotate(-10deg);
    }
    30% {
        transform: rotate(10deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(-10deg);
    }
    70% {
        transform: rotate(10deg);
    }
    80% {
        transform: rotate(-10deg);
    }
    90% {
        transform: rotate(10deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes tooltip-show {
    0% {
        visibility: hidden;
    }
    10% {
        visibility: hidden;
    }
    20% {
        visibility: hidden;
    }
    30% {
        visibility: hidden;
    }
    40% {
        visibility: hidden;
    }
    50% {
        visibility: hidden;
    }
    60% {
        visibility: hidden;
    }
    70% {
        visibility: hidden;
    }
    80% {
        visibility: hidden;
    }
    90% {
        visibility: hidden;
    }
    100% {
        visibility: visible;
    }
}

@keyframes invisible {
    0% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(20px);
    }
}

  @-webkit-keyframes rainbow {
     from { -webkit-filter:hue-rotate(10deg); }
       to { -webkit-filter:hue-rotate(360deg); }
  }

  @keyframes rainbow {
   from {
      -webkit-filter:hue-rotate(10deg);
              filter:hue-rotate(10deg);
      }
    to {
      -webkit-filter:hue-rotate(360deg);
              filter:hue-rotate(360deg);
      }
  }

/**************************/
/*** TROUVE SUR LE NET ***/
/************************/



/****** TOGGLE BUTTON ********/

.checkbox-wrapper .tgl {
    display: none;
}

.checkbox-wrapper .tgl,
.checkbox-wrapper .tgl:after,
.checkbox-wrapper .tgl:before,
.checkbox-wrapper .tgl *,
.checkbox-wrapper .tgl *:after,
.checkbox-wrapper .tgl *:before,
.checkbox-wrapper .tgl + .tgl-btn {
    box-sizing: border-box;
}
.checkbox-wrapper .tgl::-moz-selection,
.checkbox-wrapper .tgl:after::-moz-selection,
.checkbox-wrapper .tgl:before::-moz-selection,
.checkbox-wrapper .tgl *::-moz-selection,
.checkbox-wrapper .tgl *:after::-moz-selection,
.checkbox-wrapper .tgl *:before::-moz-selection,
.checkbox-wrapper .tgl + .tgl-btn::-moz-selection,
.checkbox-wrapper .tgl::selection,
.checkbox-wrapper .tgl:after::selection,
.checkbox-wrapper .tgl:before::selection,
.checkbox-wrapper .tgl *::selection,
.checkbox-wrapper .tgl *:after::selection,
.checkbox-wrapper .tgl *:before::selection,
.checkbox-wrapper .tgl + .tgl-btn::selection {
    background: none;
}
.checkbox-wrapper .tgl + .tgl-btn {
    outline: 0;
    display: block;
    width: 4em;
    height: 2em;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.checkbox-wrapper .tgl + .tgl-btn:after,
.checkbox-wrapper .tgl + .tgl-btn:before {
    position: relative;
    display: block;
    content: "";
    width: 50%;
    height: 100%;
}
.checkbox-wrapper .tgl + .tgl-btn:after {
    left: 0;
}
.checkbox-wrapper .tgl + .tgl-btn:before {
    display: none;
}
.checkbox-wrapper .tgl:checked + .tgl-btn:after {
    left: 50%;
}

.checkbox-wrapper .tgl-theme + .tgl-btn {
    border-radius: 2em;
    padding: 2px;
    transition: all 0.4s ease;
}
.checkbox-wrapper .tgl-theme + .tgl-btn:after {
    border-radius: 2em;
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), padding 0.3s ease, margin 0.3s ease;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 0 rgba(0, 0, 0, 0.08);
}
.checkbox-wrapper .tgl-theme + .tgl-btn:hover:after {
    will-change: padding;
}

.checkbox-wrapper .tgl-theme + .tgl-btn:active:after {
    padding-right: 0.8em;
}

.checkbox-wrapper .tgl-theme:checked + .tgl-btn:active {
    box-shadow: none;
}

.checkbox-wrapper .tgl-theme:checked + .tgl-btn:active:after {
    margin-left: -0.8em;
}


#filter-result {
    list-style-type: none;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
}

#filter-result li {
    margin: 5px 0;
    padding: 5px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
}
