/* ==========================================================================
   Variable and basic styles
   ========================================================================== */
:root {
  --black: #000000;
  --dark-blue: #181d4e;
  --blue: #0073bb;
  --light-blue: #00adee;
  --bright-blue: #3659ef;
  --midnight-blue: #0a274e;
  --green: #65bd88;
  --white: #ffffff;
  --orange: #e56626;
  --yellow: #f4f4e5;
  --gray: #4a4a4a;
  --light-gray: #8f9cb2;
  --pale-ivory: #ebedd3;
  --purple: #6050f9;
  --whisper-white: #eff5f9;
}

body {
  background: var(--white);
  color: var(--dark-blue);
  font-family: "DM Serif Text", serif;
}

h1,
h2 {
  font-size: 48px;
  line-height: 51px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--dark-blue);
}

h2 {
  text-align: center;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.btn {
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 100%;
}

/* Utility Classes */
.bg-yellow {
  background: var(--yellow);
}

.bg-whisper-white {
  background: var(--whisper-white);
}

.bg-blue {
  background: var(--bright-blue);
}



.fade-in {
  opacity: 1 !important;
}


.maintable
{

}

.maintable input, .maintable textarea
{
  background: #eee !important;
  border: 1px solid #aaa;

  font-family: inherit;
  font-size: inherit;
  margin-top: 2px;
  padding: 3px;
}




#globalwindow
{
  position: fixed; 
  right: 1%;
  top: 1%; 
  background: #eee; 
  border: 1px solid #444; 
  width: 300px; 
  height: auto; 
  padding: 1%; 
}

#gamesettings input, #gamesettings  select,  #gamesettings textarea
{
  font-size: 16px;

  color: #555;
  border: 1px solid #dcdcdc;
  background:#fff;
    padding: 6px;	
	margin-bottom: 4px; 

}

#multselectwindow
{
  position: fixed; 
  right: 1%;
  top: 392px; 
  background: #eee; 
  border: 1px solid #444; 
  width: 300px; 
  height: auto; 
  padding: 1%; 
  display: none;
}

#globalwindow h3, #multselectwindow h3
{
	margin: 0;
	font-size: 16px;
}

#globalwindow small
{
	font-style: italic;
	font-size: 70%;
}


/* ==========================================================================
     HEADER и NAVIGATION
     ========================================================================== */
.header {
  height: 85px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Be Vietnam Pro", sans-serif;
  position: relative;
  padding: 0 20px;
}

.menu-checkbox {
  display: none;
}

.menu-toggle {
  display: none;
  cursor: pointer;
}

.logo img {
  height: 55px;
  width: 138px;
}

.nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  height: 100%;
}

.nav-links li {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-links label {
  cursor: pointer;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 10px 5px;
  height: 100%;
  display: flex;
  align-items: center;
  transition: 0.3s;
}

.nav-links .active {
  border-bottom: 3px solid var(--orange);
  font-weight: 700;
}

.register-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

/* ==========================================================================
     FIRST SECTION (Hero)
     ========================================================================== */
.first-section {
  position: relative;
}

.first-section .content {
  text-align: center;
  max-width: 890px;
  padding: 90px 0 215px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.first-section .content p {
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--blue);
  font-size: 20px;
  line-height: 60px;
  font-weight: 600;
}

.first-section .content h1 {
  margin-bottom: 40px;
}

.register-btn {
  background-color: var(--light-blue);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: 20px;
  transition: 0.3s;
}

.register-btn:hover {
  background-color: var(--dark-blue);
}

.register-btn img {
  margin-right: 8px;
}

.blue-btn {
  background-color: var(--light-blue);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: 0.3s;
}

.blue-btn:hover {
  background-color: var(--dark-blue);
}

/* ==========================================================================
     DECORATIVE ELEMENTS
     ========================================================================== */
.decorative-elements {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.decorative-element {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
}

.mountain-1 {
  left: 10%;
  bottom: 0;
  height: 275px;
  width: 880px;
  max-width: 50%;
  background-image: url(/images/mountain-1.svg);
  background-position: bottom;
}

.mountain-2 {
  right: 5%;
  bottom: 0;
  height: 275px;
  width: 300px;
  background-image: url(/images/mountain-2.svg);
  background-position: bottom;
}

.mountain-4 {
  left: 5%;
  bottom: 0;
  height: 175px;
  width: 450px;
  background-image: url(/images/mountain-4.svg);
  background-position: bottom;
}

.mountain-5 {
  right: 5%;
  bottom: 0;
  height: 135px;
  width: 300px;
  background-image: url(/images/mountain-5.svg);
  background-position: bottom;
}

.mountain-6 {
  left: 3%;
  bottom: 68px;
  height: 115px;
  width: 150px;
  background-image: url(/images/mountain-6.svg);
  background-position: bottom;
}

.mountain-7 {
  right: 3%;
  bottom: 60px;
  height: 135px;
  width: 300px;
  background-image: url(/images/mountain-7.svg);
  background-position: bottom;
}

.cloud {
  background-image: url(/images/cloud.svg);
  background-position: center;
}

.cloud-1 {
  left: 16%;
  top: 85px;
  height: 22px;
  width: 66px;
}

.cloud-2 {
  left: 22%;
  top: 68px;
  height: 39px;
  width: 116px;
}

.cloud-3 {
  left: 44%;
  top: 38px;
  height: 30px;
  width: 95px;
}

.cloud-4 {
  right: 22%;
  top: 68px;
  height: 39px;
  width: 116px;
}

.cloud-5 {
  right: 16%;
  top: 95px;
  height: 22px;
  width: 66px;
}

.circle {
  background-image: url(/images/circle.svg);
  background-position: center;
  background-size: contain;
  width: 205px;
  height: 205px;
  right: 0;
  top: 0;
}

.plus {
  background-image: url(/images/plus.svg);
  background-position: center;
  background-size: contain;
  left: 60%;
  bottom: 150px;
  width: 18px;
  height: 18px;
}

.minus {
  font-size: 63px;
  color: #65bd88;
  left: 20%;
  top: 100px;
}

.minus::before {
  content: "-";
}

.percentage {
  background-image: url(/images/percentage.svg);
  background-position: center;
  background-size: contain;
  left: 40%;
  bottom: 220px;
  width: 18px;
  height: 18px;
}

.rectangle {
  background: var(--pale-ivory);
  left: 0;
  top: 100%;
  width: 100%;
  height: 100px;
}

/* ==========================================================================
     SECOND SECTION: MATH GAMES
     ========================================================================== */
.second-section {
  margin-top: 100px;
  padding: 90px 0 110px;
}

.second-section h2 {
  margin-bottom: 50px;
}

.settings {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 40px;
}

.form-field {
  display: flex;
  flex-direction: column;
  font-family: "Be Vietnam Pro", sans-serif;
  width: calc(33.33% - 30px);
}

.form-field label {
  font-size: 18px;
  font-weight: 500;
}

.form-field input {
  color: var(--dark-blue);
  font-size: 17px;
  border: 1px solid #00000026;
  border-radius: 5px;
  padding: 18px 23px;
}

.select {
  position: relative;
  min-width: 100%;
}

.select select {
  appearance: none;
  width: 100%;
  font-size: 17px;
  padding: 18px 23px;
  background-color: #fff;
  border: 1px solid #00000026;
  border-radius: 5px;
  color: #000;
  cursor: pointer;
}

.select::before {
  border-left: var(--size) solid transparent;
  border-right: var(--size) solid transparent;
  border-bottom: var(--size) solid black;
  top: 40%;
}

.select::after {
  content: "⌵"; 
  font-weight: 800; 
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.toggle-group {
  font-family: "Be Vietnam Pro", sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.adtlpage
{
	margin-top: 50px;
}

.adtlpage h1
{
	font-size: 180%;
	margin-bottom: 20px;
}

.adtlpage p
{
	margin-bottom: 20px;
}

.sound {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 18px;
  background: #ffffff;
  border: 1px solid #bbc1e1;
  border-radius: 30px;
  cursor: pointer;
  appearance: none;
  transition: all 0.5s cubic-bezier(0.2, 0.85, 0.32, 1.2);
}

.sound::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  background-color: var(--green);
  border-radius: 50%;
  transition: all 0.5s cubic-bezier(0.2, 0.85, 0.32, 1.2);
  transform: translateX(0);
}

.sound:checked::after {
  transform: translateX(calc(100% + 8px));
}

.sound:checked {
  background-color: #e9e9e9;
}

.start-btn {
  font-family: "Be Vietnam Pro", sans-serif;  
  position: relative;
  margin: 0 auto 75px;
  display: flex;
  background: var(--light-blue);
  color: var(--white);
  padding: 10px 30px;
  font-weight: 800;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  font-size: 18px;
  width: max-content;
  transition: 0.3s;
}

.start-btn::before,
.start-btn::after {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 60px;
}

.start-btn::before {
  border: 8px solid #35c8ff;
  z-index: -1;
  transition: 0.3s;
}

.start-btn::after {
  top: -16px;
  left: -16px;
  right: -16px;
  bottom: -16px;
  border: 16px solid #c3efff;
  z-index: -3;
  transition: 0.3s;
}

.start-btn:hover {
  background-color: var(--bright-blue);
}

.start-btn:hover::before {
  border-color: #2e9ccf;
}

.start-btn:hover::after {
  border-color: #a0d6e0;
}

.game-modes-container {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  padding-bottom: 30px;
  /* Space for custom scrollbar */
}

.game-modes {
  font-family: "Be Vietnam Pro", sans-serif;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  overflow-y: auto;
  padding-bottom: 20px;

  /* Hide default scrollbars */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE and Edge */
}

.game-modes::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

/* Custom scrollbar track */
.custom-scrollbar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: #f4f4f4;
  border-radius: 8px;
}

/* Custom scrollbar thumb */
.custom-scrollbar-thumb {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 5px;
  background: #c0cfe7;
  border-radius: 8px;
  min-width: 50px;
  cursor: pointer;
}

.game-modes {
  cursor: grab;
  /* Show grab cursor to indicate draggable */
}

.game-modes.grabbing {
  cursor: grabbing;
  /* Show grabbing cursor while dragging */
  user-select: none;
  /* Prevent text selection while dragging */
}

/* Modal blocks of the game */
.mode {
  padding: 28px 20px 0 20px;
  border: 1px solid rgba(133, 199, 69, 0.4);
  border-radius: 8px;
  background: var(--white);
  width: 23%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 278px;
}

.mode-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--green);
  color: var(--white);
  font-weight: 800;
  font-size: 20px;
  border-radius: 5px;
}

.mode-body {
  padding: 15px;
  font-size: 14px;
  color: var(--gray);
}

.range-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.range-item {
  display: flex;
  flex-direction: column;
  width: 45%;
}

.range-item label {
  margin-bottom: 5px;
  font-weight: 600;
}

.range-item input {
  padding: 6px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.second-section .green-btn {
  margin-top: 50px;
}

/* Styles for separate modes */
.time-tables .mode-header {
  background: var(--green);
}

.additions {
  border-color: rgba(22, 168, 206, 0.3);
}

.additions .mode-header {
  background: var(--blue);
}

.subtraction {
  border-color: rgba(136, 93, 170, 0.3);
}

.subtraction .mode-header {
  background: var(--purple);
}

.balancing {
  border-color: rgba(241, 111, 32, 0.3);
}

.balancing .mode-header {
  background: var(--orange);
}

.second-section hr {
  width: 95%;
  margin: 32px auto 50px;
}

.green-btn {
  width: max-content;
  background-color: var(--green);
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin: 0 auto;
  padding: 25px 54px;
  border-radius: 60px;
  transition: 0.3s;
}

.green-btn:hover {
  background-color: var(--light-blue);
}

/* ==========================================================================
     THIRD SECTION: TIMES TABLES
     ========================================================================== */
.third-section {
  background-color: var(--whisper-white);
  padding: 104px 0 230px;
  text-align: center;
  position: relative;
}

.third-section .container {
  padding: 0 20px;
  position: relative;
  z-index: 99;
}

.third-section h2 {
  font-family: "DM Serif Text", serif;
  font-size: 32px;
  margin-bottom: 10px;
}

.third-section p {
  font-family: "Be Vietnam Pro", sans-serif;
  max-width: 550px;
  margin: 25px auto 0;
  line-height: 1.5;
}

/* Tabs */
.tabs {
  font-family: "Be Vietnam Pro", sans-serif;
  width: 100%;
  margin-top: 30px;
  display: inline-block;
  text-align: center;
}

.tabs input[type="radio"] {
  display: none;
}

.tab-titles {
  display: flex;
  justify-content: center;
  margin-bottom: -1px;
}

.tab-label {
  cursor: pointer;
  background: var(--white);
  color: var(--dark-blue);
  padding: 17px 20px;
  font-weight: 700;
  font-size: 20px;
  border: 1px solid #dfedf6;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  transition: 0.3s;
  user-select: none;
}

.tab-label.active {
  background: var(--blue);
  color: var(--white);
}

.panel {
  display: none;
  border-top: 2px solid #0073bb;
  padding: 20px;
  background: var(--white);
  width: 100%;
  box-sizing: border-box;
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
  box-shadow: 0px 4px 19px rgba(214, 229, 239, 1);
}

.panel.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #d8e7f6;
  border-radius: 5px;
  overflow: hidden;
}

.grid-item {
  padding: 15px;
  border-bottom: 1px solid #d8e7f6;
  border-right: 1px solid #d8e7f6;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-align: start;
  color: var(--dark-blue);
}

.grid-item:nth-child(3n) {
  border-right: none;
}

.grid-item:nth-last-child(-n + 3) {
  border-bottom: none;
}

.grid-item:nth-child(6n + 1),
.grid-item:nth-child(6n + 2),
.grid-item:nth-child(6n + 3) {
  background: #f6f9fc;
}

/* ==========================================================================
     FOURTH SECTION
     ========================================================================== */
.section-four {
  padding: 80px 0 115px;
  background-color: var(--white);
}

.section-four .content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-four p {
  color: var(--blue);
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 60px;
}

.features {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.feature {
  flex: 1;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
}

.feature .icon {
  width: 111px;
  height: 111px;
  margin: 0 auto 15px;
}

.feature .icon img {
  width: 100%;
  height: auto;
  display: block;
}

.feature h3 {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-size: 25px;
  line-height: 60px;
  color: var(--dark-blue);
  margin-bottom: 15px;
}

.feature p {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  color: var(--dark-blue);
}

.cta {
  text-align: center;
  margin-top: 50px;
}

/* ==========================================================================
     FIFTH SECTION: ABOUT
     ========================================================================== */
.section-five {
  padding: 165px 0 200px;
  position: relative;
}

.section-five .content {
  max-width: 660px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  z-index: 99;
}

.section-five h3 {
  font-family: "DM Serif Text", serif;
  font-size: 40px;
  line-height: 51px;
  color: #181d4e;
  font-weight: 400;
  text-align: start;
}

.section-five p {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 17px;
  line-height: 26px;
}

.section-five .green-btn {
  margin: 0;
}

.section-five .image-block {
  position: absolute;
  right: 10%;
  bottom: 0;
  max-width: 100%;
}

/* ==========================================================================
     SIXTH SECTION
     ========================================================================== */
.section-six {
  position: relative;
  overflow: hidden;
}

.section-six .content {
  display: flex;
  gap: 60px;
  align-items: center;
}

.section-six .right-block {
  color: var(--white);
  max-width: 820px;
}

.section-six h4 {
  font-weight: 400;
  font-size: 40px;
  line-height: 51px;
}

.section-six p {
  font-family: "Be Vietnam Pro", sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 60px;
}

.section-six img {
  width: 400px;
}

.circle-2 {
  background-image: url(/images/circle-2.svg);
  background-position: center;
  background-size: contain;
  width: 220px;
  height: 405px;
  right: 0;
  top: 12%;
}

.circle-3 {
  background-image: url(/images/circle-3.svg);
  background-position: center;
  background-size: contain;
  width: 250px;
  height: 250px;
  left: -60px;
  bottom: -103px;
}

/* ==========================================================================
     FOOTER
     ========================================================================== */
footer {
  background: var(--midnight-blue);
  font-family: "Be Vietnam Pro", sans-serif;
  color: #fff;
  position: relative;
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 40px 0;
  padding-bottom: 120px;
  position: relative;
  z-index: 99;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex: 1 1 410px;
  margin-right: 40px;
}

.footer-logo {
  width: 138px;
}

.footer-description {
  color: var(--light-gray);
  font-size: 18px;
  line-height: 31px;
  max-width: 410px;
}

footer .blue-btn {
  width: max-content;
}

.social-icons a {
  display: inline-block;
  margin-right: 10px;
  color: #fff;
  font-size: 16px;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #00b7ff;
}

.footer-right {
  display: flex;
  flex: 1 1 400px;
  flex-wrap: wrap;
  gap: 50px;
}

.footer-links h5 {
  font-size: 20px;
  font-weight: 600;
  line-height: 60px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--light-gray);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: 400;
  line-height: 35px;
  font-size: 18px;
}

.footer-links a:hover {
  color: #00b7ff;
}

.footer-bottom {
  position: relative;
  z-index: 99;
}

.footer-bottom p {
  background: #001634;
  color: var(--light-gray);
  padding: 20px 0;
  text-align: center;
  font-size: 18px;
}


