@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,800&display=swap');

html, body {
    width: 100%;
    height: 100%; 
    margin: 0;
    background: #270F34; 
    overflow-y: hidden;
    overflow-x: hidden;
    display: flex; 
    align-items: center; 
    justify-content: center;
    contain: content;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    display: block;
    width: 100%;
    height: 100%;
    background-image: url("it_bg.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -o-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
}

:root {
  --width: 80vw;
  --col: 3;
}

main {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: auto;
  width: var(--width);
  /*background: linear-gradient(to top left, transparent 0, transparent 12.5%, rgba(255,255,255,0.5) 100%);*/
  z-index: 40;
  padding: 0;
  border-radius: 15px;
  overflow-y: scroll;
  scrollbar-width: none;
  height: 100vh;
}

main::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    display: block;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.4);
}

main::-webkit-scrollbar {
  display: none;
}

.grid-container {
  flex: 0 0 calc(33.33% - 50px);
  padding: 10px;
  margin: 10px auto;
  display: flex;
  align-items: center;
  justify-content:center;
}

.card-container {
  width: 20vw;
  min-width: 100px;
  height: 25.75vw;
  min-height: 150px;
  background-image: conic-gradient(#FF6663,#FEB144,#FDFD97,#9EE09E,#9EC1CF,#CC99C9,#FF6663);
  border-radius: 15px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  animation: wiggle 2s linear infinite;
  cursor: pointer;
}

.card-container:hover {
  filter: drop-shadow(0 0 15px white);
  animation: glow 1s linear infinite;
}

.card-container.active:hover {
  filter:none;
  animation: none;
}

.card-container.active {
  background: none;
  background-image: conic-gradient(#FF6663,#FEB144,#FDFD97,#9EE09E,#9EC1CF,#CC99C9,#FF6663);
  width: 80vw;
  height: 80vh;
  position:absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  transition: width 1s ease, height 1s ease;
  animation: none;
  z-index: 42;
  cursor: default;
}

.card-container.active::before {
  content: "";
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,.5);
  z-index: -1;
}

.card-body {
  width: calc(100% - 15px);
  height: calc(100% - 15px);
  border-radius: 10px;
  background: linear-gradient(to top, #225 0, rgb(16,19,36) 20%);
  overflow: hidden;
}

.card-container.active>.card-body {
  background-color: rgb(16, 19, 36);
}

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

.info {
  display: none;
}

.card-container.active>.card-body>.info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}
.card-container.active>.card-body>.front {
  display: none;
}

.title {
  width:100%;
  height:20%;
  text-align: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2.75vw;
  top: 10px;
  margin: 5% 0 5% 0;
  color: white;
  flex-shrink: 1;
}

.logo {
  border-radius: 50%;
  width: 70%;
  margin: 0 0 0 0;
}

.flavor {
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.7vw;
  text-align: center;
}

.close {
  font-family: 'Bricolage Grotesque', sans-serif;
  position: absolute;
  display: inline-block;
  top: 10px;
  right: 10px;
  padding: 0.01em 16px;
  border-radius: 15px;
  font-size: xx-large;
  font-weight: bolder;
  color: darkslategray;
}

.close:hover {
  color: red;
  background-color: brown;
  cursor: pointer;
}

.close::before, .close::after {
  content: "";
  display: table;
  clear: both;
}

.fulltitle {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 3vmax;
  color: white;
  text-align: center;
  margin: 8vh 0 0 0;
}

.long {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5vmax;
  color: white;
  text-align: center;
  margin: 3vh 10%;
}

.rules {
  width: 90%;
  border: 1px solid white;
  overflow-y: scroll;
  flex-grow: 1;
  height: 100%;
  padding: 3px 10px;
  margin: 10px 0;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  font-size: medium;
  color: white;
  border-radius: 15px;
  scrollbar-color: white transparent;
}

.rules::-webkit-scrollbar {
    background: transparent;
}

.rules::-webkit-scrollbar-thumb {
    background: white;
    border-radius: 15px;
}

.controls {
  width: 100%;
  padding: 10px 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.accept {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  border: 1px solid white;
  border-radius: 15px;
  height: 100%;
  margin: 0 30px;
  padding: 0 10px;
  box-sizing: border-box;
}

.accept>label {
  margin-top: 10px;
  margin-bottom: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  margin: 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

#notice {
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    text-align: center;
    font-size: small;
}

.joinlink {
  background-color: #0088cc;
  color: white;
  padding: 0;
  margin: 0 15px;
  border: 5px solid white;
  border-radius: 15px;
  cursor: pointer;
  height: 100px;
  width: 60%;
  flex-grow: 0;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  font-size: xx-large;
  font-weight: bolder;
}

.joinlink:hover {
  background-color: #35c3ee;
}

.joinlink:active {
  background-color: #03467e;
}

.joinlink:disabled {
  background-color: gray;
  border: 3px solid rgba(0,0,0,.5);
  color: rgba(0,0,0,.5);
  cursor:not-allowed;
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px white);
  }
  50% {
    filter: drop-shadow(0 0 5px white);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotateZ(-0.5deg);
  }
  50% {
    transform: rotateZ(0.5deg);
  }
}

@media screen and (max-width: 525px) {
    
    :root {
        --width: 90vw;
        --col: 1;
    }

    .grid-container {
        flex: 0 0 calc(50% - 50px);
        padding: 0;
    }

    .card-container {
        width: 40vw;
        height: 45vw;
    }

    .title {
        font-size: min(4vmax,28px);
        z-index: 1;
    }

    .flavor {
        font-size: 4vw;
    }

    .logo {
        width: 60%;
        aspect-ratio: 1;
        position: absolute;
        top: 50%;
        left: 50%;
        filter: opacity(30%);
        transform: translateY(-50%) translateX(-50%);
    }

    .rules {
        font-size: 2vw;
    }
}

@media screen and (max-width: 350px) {

    :root {
        --width: 95vw;
        --col: 2;
    }

    .grid-container {
        flex: 0 0 calc(90% - 50px);
        padding: 0;
    }

    .card-container {
        width: 60vw;
        height: 45vw;
    }

    .title {
        font-size: min(4.5vmax,28px);
        z-index: 1;
    }

    .flavor {
        font-size: 5vw;
    }

    .logo {
        width: 60%;
        aspect-ratio: 1;
        position: absolute;
        top: 50%;
        left: 50%;
        filter: opacity(30%);
        transform: translateY(-50%) translateX(-50%);
    }

    .rules {
        font-size: 2.5vw;
    }

    .accept {
        padding: 0;
        margin: 0 15px;
    }
}