:root {
  --board-width: 750px;
  /* --board-background-color: hsla(290, 100%, 88%, 0.77); */
  --board-background-color: #fff7fc;
  --board-border-radius: 15px;
  --board-padding: 2em 0;
  --board-grid-template-rows: 28px 75px 750px 100px;

  --button-width: 150px;
  --button-height: 60px;
  --button-border-radius: 15px;
  --button-font-size: 22px;

  --tour-button-padding: .2rem 5rem;

  --input-width: 70px;
  --input-height: 55px;
  --input-font-size: 2.2rem;
  --input-border-radius: 15px;
  --input-background-color: #a7fffd;
  --input-box-shadow: 2px 2px 0px #474f77;

  --arrow-buttons-padding: 4px 10px;

  --mute-button-width: 48px;
  --mute-button-height: 48px;

  --dividend-bg-color: #d7ffd7;
  --divisor-bg-color: #a8a8e7;
  --quotient-bg-color: #fef2c8;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: hsla(245, 75%, 80%, 0.25);
  color: #070707;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
}

::placeholder {
  color: rgba(148, 148, 148, 0.74);
}

.title {
  margin: 2rem 0;
}

.main {
  display: grid;
  flex: 1 1;
  width: 100%;
  max-height: fit-content;
  font-family: sans-serif;
}

main {
  display: grid;
  background: var(--board-background-color);
  width: var(--board-width);
  border-radius: var(--board-border-radius);
  padding: var(--board-padding);
  grid-template-rows: var(--board-grid-template-rows);
  grid-template-columns: 1fr;
  margin: 1rem auto;
  position: relative;
  max-width: 100%;
  border: 1px solid rgb(100, 100, 255);
  scroll-behavior: smooth;
  scroll-snap-align: start;
  scroll-snap-type: y mandatory;
}

.board-title {
  text-align: center;
  /* color: #0e2f77; */
  color: #1a1a1a;
  font-size: 2rem;
  margin: 1rem;
  padding: 1rem;
  text-shadow: 1px 1px #1a1a1a70;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-weight: bolder;
}

/*inputs */
.inputs {
  width: var(--input-width);
  height: var(--input-height);
  font-size: var(--input-font-size);
  border-radius: var(--input-border-radius);
  background-color: var(--input-background-color);
  box-shadow: var(--input-box-shadow);
  text-align: center;
  color: #070707;
  border: none;
  font-family: cursive;
  cursor: pointer;
}

.inputs:focus {
  outline: solid 2px purple !important;
  background-color: #dfecf7 !important;
}

.dividend {
  font-weight: bolder;
  text-shadow: 1px 1px 0px grey;
  background-color: var(--dividend-bg-color);
}

.divisor {
  background-color: var(--divisor-bg-color);
  text-shadow: 1px 1px 0px white;
  font-weight: bolder;
}

.alternative-quotient,
.standard-quotient {
  background-color: var(--quotient-bg-color);
}

.division-text {
  pointer-events: none;
  letter-spacing: 1px;
  text-align: left;
  font-size: 1rem;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  color: #df497b;
  text-shadow: -1px -1px #070707;
}

/* Buttons */
.disabled {
  background: #cccccc;
  color: #7777;
  cursor: not-allowed !important;
  opacity: 0.6;
  filter: grayscale(100%);
}

.buttons {
  text-align: center;
  border-radius: var(--button-border-radius);
  width: var(--button-width);
  height: var(--button-height);
  font-size: var(--button-font-size);
  border: none;
  font-weight: bolder;
  cursor: pointer;
  letter-spacing: 1px;
  text-shadow: 0px 0px 1px #070707;
  box-shadow: 1px 1px 1px 1px #070707;
}

#tryit_btn {
  background-color: #fdde66;
}

#tryit_btn:hover {
  transform: scale(1.1);
}

#verify_btn {
  color: rgb(1, 117, 32);
  background-color: rgb(132, 254, 254);
}

#verify_btn:hover {
  transform: scale(1.1);
}

#showresults_btn {
  color: rgb(7, 7, 7);
  background-color: rgb(186, 186, 186);
}

#showresults_btn:hover {
  transform: scale(1.1);
}

#delete_btn {
  background-color: #feaaa7;
  cursor: pointer;
}

#delete_btn:hover {
  transform: scale(1.1);
}

/* Instruction Tour Button */
.btn_tour {
  position: absolute;
  padding: var(--tour-button-padding);
  min-width: 270px;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  background-color: #318d27;
  color: rgb(249, 250, 255);
  border: none;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -0%);
  text-align: center;
  box-shadow: 0px 0px 1px 1px #070707;
  text-shadow: 1px 1px 2px #070707;
}

.btn_tour:hover {
  transform: scale(1.01) translate(-50%, -0%);
  box-shadow: 0px 0px 2px 2px #070707;
}

/* Arrows */
.arrow_section {
  grid-row: 4;
  display: grid;
  justify-content: space-evenly;
  align-items: center;
  align-content: center;
}

.arrow_buttons {
  grid-row: 2;
  padding: var(--arrow-buttons-padding);
  border-radius: 7px;
  cursor: pointer;
}

.arrow_labl {
  display: grid;
  letter-spacing: 1px;
  font-size: 1rem;
  justify-content: center;
  font-weight: bolder;
  grid-row: 1;
}

/* Choose Mode Container */
.choose-division-style-text {
  display: grid;
  align-content: center;
  grid-row: 1;
  font-size: 1.25rem;
  letter-spacing: 1px;
  font-family: monospace;
  font-weight: bold;
  text-align: center;
}

.division-style-buttons {
  display: flex;
  font-family: "Courier New", Courier, monospace;
  grid-row: 2;
  align-items: center;
  justify-content: space-evenly;
}

.division_style_button {
  font-size: 1rem;
  padding: 1rem 1.5rem;
  background-color: hsla(0, 0%, 100%, 0.7);
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 1px;
}

.activemode {
  /* background-color: hsla(0, 0%, 85%, 0.5); */
  background: lightblue;
  transform: scale(1.1);
  border: 1px solid darkblue;
  text-shadow: 0 1px 1px white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-weight: bolder;
}

.alternative_division_style_btn {
  grid-row: 1;
  transition: 0.1s;
}

.alternative_division_style_btn:hover,
.standard_division_style_btn:hover {
  transform: scale(1.1);
}

.standard_division_style_btn {
  grid-row: 1;
  transition: 0.1s;
}

/* Table Container */
/*       Close table container      */
.close-table-container-btn {
  width: 70%;
  height: 2rem;
  margin: 0 auto;
  background-color: rgb(70, 70, 70);
  color: silver;
  font-size: 1em;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.close-table-container-btn:hover,
.close-table-container-btn:focus {
  background-color: hsl(0, 0%, 50%);
}

#tables_dropdown {
  display: none;
  justify-content: center;
  position: absolute;
  max-width: 250px;
  top: 20%;
  right: 50%;
  cursor: move;
  z-index: 1;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.div_dropdown {
  color: silver;
  background: hsl(250, 10%, 80%);
  position: absolute;
  border-top-width: 5px;
  margin-top: 50px;
  row-gap: 7px;
  min-width: 120px;
  padding: 7px 5px;
  font-size: 1rem;
  font-weight: bolder;
  display: grid;
  box-shadow: 5px 5px 2px hsl(250, 10%, 50%, 0.7);
  border-radius: 7px;
  text-align: center;
}

.div_dropdown a {
  color: hsl(0, 0%, 10%);
}

#tables_dropdown #number_of_table {
  display: inline-grid;
  position: absolute;
  display: -moz-inline-grid;
  width: 120px;
  font-size: 1.125rem;
  font-weight: bolder;
  font-style: italic;
  font-family: 'Times New Roman', Times, serif;
  box-shadow: 5px 5px 2px hsl(250, 10%, 50%, 0.7);
  background-color: hsl(250, 50%, 100%);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  justify-items: center;
  font-weight: bolder;
  padding: 2px 0;
}

.table_multiplicand,
.table_result {
  font-weight: bolder;
}

/* Stats Container */
:root {
  --bg-yellow: #f6e7b4;
  --bg-panel: #fff8dc;
  --text-main: #1a1a1a;
  --text-muted: #777;
  --accent: #6ed3cf;
  --radius: 16px;
}

/* Container */
.stats-container {
  width: 100%;
  font-family: sans-serif;
  /* margin: 20px auto; */
  margin: 0px auto;
  max-width: 900px;
}

/* Collapsed bar */
.stats-summary {
  display: flex;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  border-radius: var(--radius);
  border: groove;
  padding: 12px 16px;
  background: var(--bg-yellow);
  align-items: center;
  justify-content: space-evenly;
  gap: 10px;
  flex-wrap: wrap;
}

.streak-panel {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.streak-shadow.active {
  display: inline-block;
}

.streak-shadow {
  pointer-events: none;
  text-align: center;
  width: 100px;
  display: none;
  opacity: 0;
  position: absolute;
  color: #007f00;
  text-shadow: 1px 1px 2px grey;
  animation: flick 1.5s ease-in-out;
  font-weight: bold;
  border-radius: 50px;
  border: none;
  padding: 5px 10px;
  font-size: 1.5rem !important;
}

@keyframes flick {
  to {
    opacity: 0;
    transform: scale(1) translate(20px, -50px);
  }

  from {
    opacity: 1;
    transform: scale(0.5) translate(0, 0);
  }
}

.stats-summary span {
  font-size: 14px;
}

.stats-toggle {
  background: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* Expanded panel */
.stats-panel {
  margin-top: 10px;
  animation: slideDown 0.3s ease;
  display: none;
  border: groove;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-panel);
}

.stats-panel.active {
  display: block;
}

/* Header */
.stats-header {
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 18px;
}

/* Grid */
.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* Individual */
.stat {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  background: white;
  border-radius: 12px;
  text-align: center;
  padding: 12px;
}

/* Icon */

.stat-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

/* Values */
.stat-value {
  font-size: 22px;
  color: var(--text-main);
  font-weight: 700;
  transition: all 0, 2s ease;
}

/* Label */
.stat-label {
  margin-top: 2px;
  font-weight: 600;
  font-size: 13px;
}

/* Helper text */
.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.score_tracker {
  box-shadow: 2px 4px 2px 0px grey;
  border: groove;
  border-radius: 2px;
  height: 70px;
  width: 100%;
  max-width: 768px;
  background: rgb(255 249 200);
  margin: 1rem auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 1.15rem;
}

.button_track {
  cursor: pointer;
  border-radius: 7px;
  font-weight: bold;
  letter-spacing: 1px;
  background-color: #ece5ff;
  box-shadow: 1px 1px 2px #070707;
  border: none;
  padding: .5rem 1rem;
}

.button_track:hover {
  background-color: #e2d7ff;
  transform: scale(1.05);
}

.score_tracker_container {
  letter-spacing: 2px;
  text-shadow: 0px 0px 2px grey;
}

.track_buttons_container {
  display: flex;
  justify-content: space-between;
  width: 200px;
}

/* Stats Container */

/* Description Section */
.description-section {
  padding: 1px 0;
  max-width: 1024px;
  margin-top: 20px;
  margin: 2rem auto;
  font-size: 1.25rem;
  /*border-bottom: 1px solid grey;*/
  text-align: left;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

.head_text {
  width: 75%;
  margin: 1rem;
}

.description-section p {
  text-wrap: balance;
}

.head_subtitle {
  text-align: left;
  font-size: 2.5rem;
  margin-bottom: 1.1rem;
  color: green;
  line-height: 1.25;
}

.head_subtitle2 {
  text-align: left;
  margin-bottom: 1.1rem;
}

.image-section {
  width: auto;
  background-color: #98a8f8;
  box-shadow: 7px 5px 2px rgba(0, 255, 38, 0.711);
  margin: 1rem 0;
  border-radius: 10px;
  display: flex;
  padding: 1.5rem;
}

.head_section_li_n {
  line-height: 1.1;
}

.head_section_li_span {
  color: green;
  font-weight: 700;
}

.test_section {
  padding: 2rem;
  background-color: #3fa9f5;
  border-radius: 10px;
  display: flex;
  align-items: center;
  border: 1px solid grey;
  margin: 1rem auto;
  max-width: 750px;
}

.test_btn {
  height: 100px;
  width: 250px;
  font-size: 2rem;
  font-weight: 900;
  font-family: cursive;
  border-radius: 18px;
  background-color: #b4ffff;
  letter-spacing: 1px;
  cursor: pointer;
}

.test_btn:hover {
  transform: scale(1.1);
}

.test_lb {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  color: white;
}

/*Popup*/
.popup {
  max-width: 400px;
  width: 400px;
  min-width: 300px;
  background: #fff;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  border-radius: 6px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.1);
  text-align: center;
  padding: 0 30px 60px;
  color: hsl(126, 100%, 29%);
  visibility: hidden;
  transition: all 0.2s ease-in-out;
  z-index: 2;
  box-shadow: 5px 5px 2px hsl(0, 0%, 45%, 0.7);
}

.open-popup {
  visibility: visible;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
}

.popup img {
  max-width: 100px;
  margin-top: -50px;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: hsl(126, 100%, 42%);
}

.popup .congrats {
  font-size: 1.7rem;
  font-weight: 500;
  margin: 30px 0 10px;
  text-shadow: none;
}

.popup button {
  width: 100%;
  margin-top: 50px;
  padding: 10px 0;
  background-color: hsl(126, 100%, 46%);
  color: #fff;
  border: 0;
  outline: none;
  font-size: 1.2rem;
  border-radius: 4px;
  box-shadow: 5px 5px 2px hsl(0, 0%, 45%, 0.7);
  cursor: pointer;
}

:root {
  --animate-duration: 1s;
  --animate-delay: 1s;
  --animate-repeat: 1;
  --rotation-degree: -2deg
}

.animate__tada {
  -webkit-animation-name: tada;
  animation-name: tada;
}

.animate__animated {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-duration: var(--animate-duration);
  animation-duration: var(--animate-duration);
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

@keyframes tada {

  0% {
    -webkit-transform: scale(1)translate(-50%, -50%);
    transform: scale(1)translate(-50%, -50%);
  }

  10%,
  20% {
    -webkit-transform: scale3d(.8, .8, .8) rotate(var(--rotation-degree))translate(-50%, -50%);
    transform: scale3d(.8, .8, .8) rotate(var(--rotation-degree))translate(-50%, -50%);
  }

  30%,
  50%,
  70%,
  90% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate(2deg)translate(-50%, -50%);
    transform: scale3d(1.1, 1.1, 1.1) rotate(2deg)translate(-50%, -50%);
  }

  40%,
  60%,
  80% {
    -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate(var(--rotation-degree))translate(-40%, -50%);
    transform: scale3d(1.1, 1.1, 1.1) rotate(var(--rotation-degree))translate(-40%, -50%);
  }

  100% {
    -webkit-transform: scale(1)rotate(-1);
    transform: scale(1)rotate(-1);
  }

}

/* Mute Button */
.mute-wrapper {
  position: absolute;
  top: 10px;
  left: 10px;
}

.mute-btn {
  background: #1a1a1a;
  border: none;
  border-radius: 50%;
  width: var(--mute-button-width);
  height: var(--mute-button-height);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.mute-btn:hover {
  background: #323232;
}

.mute-btn svg {
  fill: #ffffff;
  transition: transform 0.2s ease;
}

.mute-btn:active svg {
  transform: scale(0.9);
}

.mute-btn .sound-wave,
.mute-btn .mute-cross {
  transition: opacity 0.2 ease, transform 0.2s ease;
  transform-origin: center;
}

.mute-btn .mute-cross {
  opacity: 0;
  transform: scale(0.5);
}

.mute-btn.muted .sound-wave {
  opacity: 0;
  transform: scale(0.7);
}

.mute-btn.muted .mute-cross {
  opacity: 1;
  transform: scale(1);
}

/* Recommendation cards */
.recommendation-cards {
  display: flex;
  justify-content: center;
  max-width: 1440px;
  overflow: hidden;
  padding-bottom: 1rem;
  font-family: "Bubblegum Sans", "Comic Sans MS", sans-serif;
  text-align: center;
}

.row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 1rem;
}

.column-title h2 {
  font-weight: bolder;
  text-shadow: 1px 1px #fff;
  color: #2196f3;
  margin: 1rem 0rem;
  font-size: 1.5rem;
}

.row #column1,
.row #column2,
.row #column3 {
  border: 4px solid #aca6f2;
  width: 325px;
  height: auto;
  padding: 10px 0;
  padding-top: 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #fff, #e4b0e140);
  box-shadow: 5px 5px 5px grey;
  gap: 7px;
}

.train_button {
  text-decoration: none;
  text-align: center;
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #0e2f77, #1a4ab9);
  color: white;
  border-radius: 10px;
  padding: 16px 32px;
  margin: 4px 2px 1rem 2px;
  -webkit-transition-duration: 0.2s;
  /* Safari */
  transition-duration: 0.2s;
  cursor: pointer;
  margin-top: auto;
  align-self: center;
  box-shadow: 0px 0px 10px grey;
}

.train_button:hover {
  background: linear-gradient(135deg, #0a1f4d, #0e2f77);
  transform: scale(1.05);
}

.img_boards {
  border-bottom: 2px solid #aca6f2;
  width: 100%;
  object-fit: cover;
}

.column_paragraph_for_columns {
  text-align: left;
  padding: 1rem 1rem;
}

.more {
  display: inline-block;
  width: 100%;
  border-top: 1px solid grey;
  font-size: 1.5rem;
  text-align: center;
  font-weight: bold;
  margin-top: 1rem;
  padding-top: 1rem;
  color: #0e2f77;
  text-shadow: 0px 0px 7px grey;
}

/* Responsive */
@media all and (max-width: 767px) {
  :root {
    --board-width: 90%;
    --board-border-radius: 7px;
    --board-padding: 1rem;
    --board-grid-template-rows: 28px 75px 700px 100px;

    --button-width: 130px;
    --button-height: 60px;
    --button-border-radius: 10px;
    --button-font-size: 20px;

    --tour-button-padding: .2rem 3rem;

    --input-width: 60px;
    --input-height: 47px;
    --input-font-size: 2rem;
    --input-border-radius: 14px;
    --input-box-shadow: 1px 1px 0px #474f77;
  }

  .board-title {
    font-size: 1.75rem;
  }

  .popup {
    padding: 0 10px 18px;
    max-width: 350px;
  }

  .description-section {
    flex-direction: column;
    margin: 1rem auto;
  }

  .division-text {
    display: none;
  }
}

@media all and (max-width: 650px) {
  :root {
    --board-width: 100%;
    --board-padding: 1rem;
    --board-grid-template-rows: 28px 75px 600px 100px;

    --button-width: 120px;
    --button-height: 50px;
    --button-font-size: 16px;

    --input-width: 50px;
    --input-height: 40px;
    --input-font-size: 1.5rem;
    --input-border-radius: 14px;
    --input-box-shadow: 1px 1px 0px #474f77;
  }
}

@media all and (max-width: 500px) {
  :root {
    --board-padding: 0.5rem;
    --board-grid-template-rows: 28px 75px 500px 100px;

    --button-width: 80px;
    --button-height: 35px;
    --button-font-size: 12px;

    --input-width: 40px;
    --input-height: 31px;
    --input-font-size: 1.1rem;
    --input-border-radius: 10px;

    --arrow-buttons-padding: 1px 4px;

    --mute-button-width: 40px;
    --mute-button-height: 40px;
  }

  .division-style-buttons {
    justify-content: center;
    gap: 1.25rem;
  }

  .division_style_button {
    padding: .5rem 0.75rem;
    font-size: 14px;
    letter-spacing: 0;
    border-radius: 7px;
  }

  .popup {
    width: 320px;
  }

  .mute-wrapper {
    top: 50px;
    left: 5px;
  }
}
