@tailwind base;
@tailwind components;
@tailwind utilities;


:root {
    --gray: #9F9F9F;
    --violet: #A445ED;
    --darkGray: #444;
    --listColor: #444;
    --black: #222;
    --light: #fff;
    --inLight: #f4f4f4;
}

.color-violet {
    color: var(--violet);
}

.fa-moon,
.fa-sun {
    animation: scale .4s forwards;
    font-size: 1.1em;
}

.fa-sun {
    transform: rotate(-90deg);
    color: var(--gray);
}

.fa-moon {
    transform: rotate(90deg);
}

body .fa-sun {
    display: none;
}

html {
    overflow: hidden;
    overflow-y: scroll;
}

body {
    position: relative;
    color: var(--black);
    z-index: 1;
    overflow: hidden;
    transition: all .7s;
    min-height: 100vh;
    font-family: serif;
}

/* body::before {
    content: '';    
    background-color: #222;
    position: absolute;
    width: 20em ;
    height: 20em;
    top: -10.3em;
    right: -10em;
    transform: scale(0);
    transition: all 1s;
    transition-timing-function: ease-in-out;
    border-radius: 50%;
    z-index: -1;
}


body.active::before {
    transform: scale(20);
} */
body .dm-bg {
    z-index: -1;
    width: 100%;
    height: 100%;
    position: relative;
}

body .dm-bg::before {
    content: '';    
    background-color: #222;
    position: absolute;
    width: 20em ;
    height: 20em;
    top: -8.7em;
    right: -7em;
    transform: scale(0);
    transition: all .8s;
    transition-timing-function: ease-in-out;
    border-radius: 50%;
   /*  z-index: -1; */
}

body .dm-bg.active::before {
    transform: scale(24);
    transition: all 3s;
} 

body .dm-bg.active ~ div ~ div > input {
  transition: all .2s;
}

/* body .dm-bg.active ~ div > div > div > div:nth-child(2)[data-list] {
  transition: background .2s,
              transform .4s ease;
}

body [data-list] {
  transition: transform .4s ease;
} */

body .dm-bg.active ~ div > * {
  transition: all .01s;
}

@keyframes scale {
    to {
        transform: scale(1);
    }
}

body .switch {
    background-color: gray;
    height: 1.4em;
    width: 2.6em;
    position: relative;
    display: flex;
    align-items: center;
    transition: all .6s;
    padding-inline: .2em;
}


.switch .ball {
    background-color: white;
    height: .9em;
    width: .9em;
    position: absolute;
    transition: all .6s;
    border-radius: 50%;
    transform: translateX(0);
}

body .switch.active .ball {
    transform: translateX(1.2em);
    
}

body .switch.active {
    background-color: var(--violet);
    
}

input { 
    outline: 1px solid var(--gray);
    background-color: var(--inLight);
    transition: background 2.5s;
}

input:focus {
    outline-color: var(--violet);
}

.noun-line {
    height: 1px;
    background-color: var(--gray);
}

.meaning-title {
    color: var(--darkGray);
    margin-bottom: .5em;
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
    transition: background 3s;
}

.list-container > li,
.features-list > li {
    font-size: 1.1em;
    color: var(--black);
    line-height: 1.6;
}

.features-list > li {
  font-size: 1em;
}

@media (min-width: 1100px) {
  .features-list > li {
    font-size: 1.1em;
  }
}

.list-container > li::before,
.features-list > li::before {
    content: "\2022";
    color: var(--violet);
    font-weight: bold;
    display: inline-block;
    width: 1em;
}

[data-nounSection],
[data-verbSection],
[data-adjSection],
.sy-con {
    display: none;
}

[data-card] > * {
    opacity: 0;
}

[data-card].active {
  position: static;
}

[data-card].active > * {
    opacity: 1;
}



[data-nounSection].active,
[data-verbSection].active,
[data-adjSection].active,
.sy-con.active,
[data-card] {
    display: block;
}

[data-source] {
    color: gray;
}

.synonyms-con [data-vsy],
.synonyms-con [data-asy],
.synonyms-con [data-nsy] {
    color: var(--violet);
}

.search-logo {
    transition: all .1s;
}

.search-logo:active {
    transform: scale(1.2);
}

.font-list {
    background-color: var(--light);
    transition: all .4s;
    transform-origin: top;
    transform: translateY(-14em);
    transition: all .5s;
    /* border: .1px solid var(--darkGray); */
    opacity: 0;
}

.font-list.active {
    transform: translateY(0);
    opacity: 1;
} 

.font-img {
    transform: rotate(0deg);
    transition: all .4s;
}

.font-img.active {
    transform: rotate(-90deg);
}

.font-list h3 {
    position: relative;
    font-weight: 500;
    width: fit-content;
    cursor: pointer;   
}

.font-list h3::before {
    content: '';
    height: 2px;
    width: 100%;
    background-color: var(--violet);
    position: absolute;
    bottom: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all .4s;
    
}

.font-list h3:hover::before {
    transform: scaleX(1);
}

/* Loader */

.load-wrapper {
    min-height: 50vh;
    display: none;
}

.load-wrapper.active {
    display: flex;
}

.lds-roller {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
  }
  .lds-roller div {
    animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    transform-origin: 40px 40px;
  }
  .lds-roller div:after {
    content: " ";
    display: block;
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--violet);
    margin: -4px 0 0 -4px;
  }
  .lds-roller div:nth-child(1) {
    animation-delay: -0.036s;
  }
  .lds-roller div:nth-child(1):after {
    top: 63px;
    left: 63px;
  }
  .lds-roller div:nth-child(2) {
    animation-delay: -0.072s;
  }
  .lds-roller div:nth-child(2):after {
    top: 68px;
    left: 56px;
  }
  .lds-roller div:nth-child(3) {
    animation-delay: -0.108s;
  }
  .lds-roller div:nth-child(3):after {
    top: 71px;
    left: 48px;
  }
  .lds-roller div:nth-child(4) {
    animation-delay: -0.144s;
  }
  .lds-roller div:nth-child(4):after {
    top: 72px;
    left: 40px;
  }
  .lds-roller div:nth-child(5) {
    animation-delay: -0.18s;
  }
  .lds-roller div:nth-child(5):after {
    top: 71px;
    left: 32px;
  }
  .lds-roller div:nth-child(6) {
    animation-delay: -0.216s;
  }
  .lds-roller div:nth-child(6):after {
    top: 68px;
    left: 24px;
  }
  .lds-roller div:nth-child(7) {
    animation-delay: -0.252s;
  }
  .lds-roller div:nth-child(7):after {
    top: 63px;
    left: 17px;
  }
  .lds-roller div:nth-child(8) {
    animation-delay: -0.288s;
  }
  .lds-roller div:nth-child(8):after {
    top: 56px;
    left: 12px;
  }
  @keyframes lds-roller {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  

  @import url(https://fonts.googleapis.com/css?family=Gilda+Display);

.error-message {
  display: none;
}

.error-message.active {
  display: block;
}

.static {
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  top: -100px;
  opacity: 0.05;
  z-index: 230;
  user-select: none;
  user-drag: none;
}

.error {
  text-align: center;
  font-family: 'Gilda Display', serif;
  font-size: 95px;
  font-style: italic;
  text-align: center;
  width: 100px;
  height: 60px;
  line-height: 60px;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60px;
  right: 0;
  animation: noise 2s linear infinite;
  overflow: default;
}

.error:after {
  content: '404';
  font-family: 'Gilda Display', serif;
  font-size: 100px;
  font-style: italic;
  text-align: center;
  width: 150px;
  height: 60px;
  line-height: 60px;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  color: var(--violet);
  animation: noise-1 .2s linear infinite;
}

.info {
  text-align: center;
  font-family: 'Gilda Display', serif;
  font-size: 2em;
  font-style: italic;
  text-align: center;
  width: 200px;
  height: 60px;
  line-height: 60px;
  margin: auto;
  position: absolute;
  top: 140px;
  bottom: 0;
  left: 0;
  right: 0;
  animation: noise-3 1s linear infinite;
  color: var(--darkGray);
}

.error:before {
  content: '404';
  font-family: 'Gilda Display', serif;
  font-size: 100px;
  font-style: italic;
  text-align: center;
  width: 100px;
  height: 60px;
  line-height: 60px;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  color: var(--violet);
  animation: noise-2 .2s linear infinite;
}

@keyframes noise-1 {
  0%, 20%, 40%, 60%, 70%, 90% {opacity: 0;}
  10% {opacity: .1;}
  50% {opacity: .5; left: -6px;}
  80% {opacity: .3;}
  100% {opacity: .6; left: 2px;}
}

@keyframes noise-2 {
  0%, 20%, 40%, 60%, 70%, 90% {opacity: 0;}
  10% {opacity: .1;}
  50% {opacity: .5; left: 6px;}
  80% {opacity: .3;}
  100% {opacity: .6; left: -2px;}
}

@keyframes noise {
  0%, 3%, 5%, 42%, 44%, 100% {opacity: 1; transform: scaleY(1);}  
  4.3% {opacity: 1; transform: scaleY(1.7);}
  43% {opacity: 1; transform: scaleX(1.5);}
}

@keyframes noise-3 {
  0%,3%,5%,42%,44%,100% {opacity: 1; transform: scaleY(1);}
  4.3% {opacity: 1; transform: scaleY(4);}
  43% {opacity: 1; transform: scaleX(10) rotate(60deg);}
}

/* No audio message */

.no-audio-mess.active {
  display: flex;
}

.no-audio-mess {
  display: none;
  position: fixed;
  inset: 0 0 0 0;
  background-color: rgba(0,0,0,0.7);
  z-index: 999;
}


.no-audio-mess .card {
  background-color: var(--light);
  animation: pop-up .6s forwards;
}

@keyframes pop-up {
  from {
    transform: translateY(-10em);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.no-audio-mess .card button {
  color: #fff;
  background-color: var(--violet);
}

/* Introduction */
.intro-mess p {
  margin-bottom: 2em;
}

.intro-mess .feature-title {
  color: var(--violet);
}

.intro-mess.hidden-mess {
  display: none;
}
