*,
* > * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* --bk-ground: #edf4ff; */
  --bk-ground: hsla(200, 24%, 63%, 0.2);
  --btn-hover: hsla(200, 24%, 63%, 0.4);
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;

  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bk-ground);

  line-height: 1.7;
  border-block-start: 10px solid #f1d23a;

  /* Delay Values (css variables) */
  --eng-delay: 0;
  --phone-delay: 0;
  --chin-delay: 0;
  --char-delay: 0;
  --singlePhon-delay: 0;
  --def-delay: 0;
  --duration: 0.6s;
}

/*
          Common
*/

.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.hidden {
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.gold {
  color: rgb(177, 150, 0);
}

.tab-div {
  font-size: 0.6em;
  height: 15rem !important;
}

.tab-div label {
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 700;
}

.tab-content-1 input {
  font-size: 1em;
  border: none;
  outline: none;
  padding: 0.2em 0.4em;
  width: 3em;
  cursor: pointer;
}

.tab-content-1 {
  flex-direction: column;
  justify-content: center;
}

button {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  padding: 0.2em 0;
  width: 4em;
  border-radius: 0.2em;
  margin: auto;
  cursor: pointer;
  border: none;
  outline: none;
  background: linear-gradient(var(--bk-ground), white, var(--bk-ground));
}

button:hover {
  background-color: var(--btn-hover);
}

/*
          Settings
*/

.tab-content-1 .outer-wrapper {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: nowrap;
  /* font-size: 1.1em; */
  padding: 0 2em;
}

.message {
  display: flex;
  align-items: center;
  font-size: 0.9em;
  font-weight: 600;
  text-align: center;
  justify-content: center;
  height: 2em;
  padding: 2em 0 1.4em;
  line-height: 1.1;
  width: 100%;
  box-sizing: content-box;
}

#delay-controls {
  display: flex;
  padding: 1em;
}

.options {
  width: min-content;
  flex-grow: 0;
  padding: 1em;
}

.options.settings {
  padding: 2em;
}

.options h3 {
  font-size: 1.3em !important;
  white-space: nowrap;
}

.options .delay-time {
  white-space: nowrap;
  text-align: center;
}

/*
          Phrases
*/

.tab-content-2 {
  padding: 0.5em 0;
}

.chineseChar {
  cursor: pointer;
}

.chineseChar:hover {
  color: blue;
}

/*
          Characters
*/

#character {
  font-size: 5em !important;
  line-height: 0.84;
  text-align: center;
  padding-bottom: 0.1em;
}

#singlePhonetic {
  font-size: 2em !important;
  text-align: center;
  line-height: 1;
  margin-top: 0.32em;
}

.tab-content-3.button-container {
  margin: 0rem 0;
}

/*
          Both ph & ch
*/

#multipleDefs,
#definition {
  font-size: 0.6rem;
  padding: 0 1rem 1rem;
}

.container-outer {
  width: 80%;
  max-height: 95vh;
  align-self: center;
  background-color: white;
  margin: auto;
}

.button-container {
  display: flex;
  justify-content: space-evenly;
  margin: 1.5em 0 0;
}

.tab-content-2,
.tab-content-3 {
  font-size: 1.35rem;
}

.tab-content-2 p,
.tab-content-3 p {
  margin-block-end: 0 !important;
}

/*
          Flag & Star Icons
*/

.fadeIn {
  opacity: 0;
  animation: fadeIn var(--duration) forwards;
}

.icon {
  position: absolute;
  width: 1em;
  top: 0.5em;
  float: right;
  cursor: pointer;
  z-index: 1000000;
}

.icon img {
  width: 100%;
}

.icon p {
  font-size: 0.5em;
  line-height: 1;
  position: relative;
  top: -0.7em;
  text-align: center;
  width: fit-content;
}

.gold-star p {
  position: relative;
  left: -0.5em;
  top: -0.5em;
}

.red-flag.not-this img {
  filter: grayscale(1);
  opacity: 0.2;
}

.gold-star.not-this {
  position: absolute;
  filter: grayscale(1) brightness(1);
  opacity: 0.7;
  z-index: 100000000;
}

.gold-star img {
  position: relative;
  z-index: 100000000;
}

.black-star {
  filter: brightness(0);
  transform: scale(1.1);
}

.black-star,
.gold-star {
  right: 1em;
}

.red-flag {
  left: 1em;
}

/* Delay times are separated - some may be set to 0 */
.english {
  animation-delay: var(--eng-delay);
}

.phonetic {
  animation-delay: var(--phone-delay);
}

.chinese {
  animation-delay: var(--chin-delay);
  letter-spacing: 0.5em;
}

.character {
  animation-delay: var(--char-delay);
}

.singlePhonetic {
  animation-delay: var(--singlePhon-delay);
}

.definition {
  animation-delay: var(--def-delay);
}

.character,
.english,
.phonetic,
.chinese,
.singlePhonetic {
  font-size: 1.2em !important;
  text-align: center;
}

.english,
.phonetic,
.chinese,
.character,
.singlePhonetic,
.definition {
  opacity: 0;
  /* transition: var(--duration);  */
}

/* index of the current phrase */
.index {
  position: absolute;
  bottom: 0.5em;
  font-size: 0.5em;
  text-align: center;
  width: fit-content;
  height: fit-content;
  text-align: center;
  line-height: 1;
  transform-origin: center;
  padding: 0.1em 2em;
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
  background-color: white;
  left: 0;
  right: 0;
  width: fit-content;
  margin: auto;
  transition: 0.5s;
}

label[for="phrasesDiv"] span.larger {
  content: "whatever";
  position: absolute;
  font-size: 1.3em;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media screen and (max-width: 650px) {
  .tab-content {
    font-size: 3.5vw;
  }
  #delay-controls {
    padding: 0;
  }
  .tab-div {
    height: 35vw !important;
  }

  .options.settings {
    padding: 1em;
  }
}

@media screen and (max-width: 650px) {
  .tab-content-2,
  .tab-content-3 {
    font-size: 3vw;
  }
}
