/*!
 * KnowledgeMiracle
 *
 * Copyright (c) 2022-2026 Knowledge Miracle Technologies, Inc.
 * Licensed under the KMT commercial license.
 *
 * Version: 1.5.0
 */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --shadow: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --shadow: rgba(0, 0, 0, 0.6);
}

html {
  scroll-behavior: smooth;
}

#welcomeText {
  background: var(--surface);
  color: var(--text);
  max-width: 900px;
  margin: 80px auto 40px;
  padding: 32px;

  border-radius: 20px;

  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.05);

  font-size: 1.1rem;
  line-height: 1.75;
}

.btn-group, .section {
  margin: 96px auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.section-container {
  display: flex;        /* arrange buttons horizontally */
  flex-wrap: wrap;      /* wrap to next line if needed */
  justify-content: center;  /* center the row of buttons */
  gap: 20px;            /* spacing between buttons */
  margin-top: 30px;     /* spacing below the title */
}

.section-title {
  pointer-events: none;
  font-size: 2.2rem;
  font-weight: 800;

  display: inline-flex;
  flex-direction: column;

  align-items: flex-start;   /* 👈 KEY CHANGE */
  text-align: left;          /* 👈 KEY CHANGE */

  gap: 10px;
  margin-bottom: 32px;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.section-title span {
  background: linear-gradient(135deg, #2563eb, #9333ea);
  -webkit-text-fill-color: transparent;
}


.section-subtitle {
  font-size: 1rem;
  color: #64748b;
  /* slate-500 */
}

h1 {
  /* box-shadow: 5px 10px rgba(255, 44, 7, 0.747); */
  font-style: normal;
  font-size: larger;
  background-color: #2196F3;
  font-family: Arial, sans-serif;
  /* text-shadow: 2px 2px #252121; */
  text-align: center;
  color: rgb(255, 255, 255);
  /* box-shadow: 0 4px 8px 0 rgba(9, 245, 253, 0.2), 0 6px 20px 0 rgba(3, 153, 247, 0.1); */
}

h3 {
  text-align: center;
}

h4 {
  text-align: center;
  margin-bottom: 0%;
}

h5 {
  margin-left: 20px;
  text-align: left;
  margin-bottom: 0%;
}

.content p {
  /* color: #faf6f6; */
  margin: 5px 0 20px 0;
}

.content .buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

.buttons button {
  padding: 10px 20px;
  border: none;
  outline: none;
  color: #fff;
  /* font-size: 16px; */
  /* font-weight: 500; */
  border-radius: 5px;
  /* background: #FCBA7F; */
  cursor: pointer;
  transition: all 0.3s ease;
}

.buttons button:hover {
  transform: scale(0.97);
}

.buttons .item {
  margin: 0 10px;
}

.buttons a {
  color: #FCBA7F;
}

/* Three image containers (use 25% for four, and 50% for two, etc) */
.column {
  float: left;
  width: 33.33%;
  padding: 5px;
}

* {
  box-sizing: border-box;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  font-size: 20px;
}

.responsive {
  padding: 0 6px;
  float: left;
  width: 24.99999%;
}

@media only screen and (max-width: 700px) {
  .responsive {
    width: 49.99999%;
    margin: 6px 0;
  }
}

@media only screen and (max-width: 500px) {
  .responsive {
    width: 100%;
  }
}

.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/* Black */

button {
  /* background-color: rgb(233, 176, 138);
  color: rgb(255, 255, 255); */
  padding: 5px;
  border-radius: 5px;
  font-size: 1rem;
  outline: none;
  /* margin-top: 10px; */
  border: none;
  /* animation: blink 2s infinite; */
}

button:hover {
  background-color: rgb(238, 230, 224);
  /* color: rgb(0, 0, 0); */
}

button:active {
  background-color: rgb(242, 238, 235);
  transform: scale(0.9);
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

.moreInfo {
  display: none;
}

.container {
  /* position: relative; */
  text-align: center;
  color: #E76F51;
}

.bottom-left {
  position: absolute;
  bottom: 8px;
  left: 16px;
}

.top-left {
  position: absolute;
  top: 8px;
  left: 16px;
}

.top-right {
  position: absolute;
  top: 8px;
  right: 16px;
}

.bottom-right {
  position: absolute;
  bottom: 8px;
  right: 16px;
}

.centered {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

ans {
  text-align: right;
  color: #000000;
  margin-bottom: 0%;
}

/* Header/Blog Title */
.header {
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
  /* padding: 30px; */
  text-align: center;
  background-color: #2196F3;
}

.header h1 {
  font-size: 50px;
}

/* Style the top navigation bar */
.topnav {
  overflow: hidden;
  background-color: #2196F3;
}

/* Style the topnav links */
.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

/* Change color on hover */
.topnav a:hover {
  background-color: #f9faf9;
  color: black;
}

/* Create two unequal columns that floats next to each other */
/* Left column */
.leftcolumn {
  float: left;
  width: 75%;
}

.left {
  float: left;
  width: 37%;
}

.right {
  float: right;
  width: 37%;
}

/* Right column */
.rightcolumn {
  float: left;
  display: flex;
  width: 25%;
  justify-content: center;
  align-items: center;
  /* background-color: #f1f1f1; */
  align-content: center;
  padding-left: 20px;
}

/* Fake image */
.fakeimg {
  background-color: #faf5f5;
  width: 100%;
  padding: 20px;
}

/* Add a card effect for articles */
.card {
  background-color: white;
  padding: 20px;
  margin-top: 20px;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - when the screen is less than 800px wide, make the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 800px) {

  .leftcolumn,
  .rightcolumn {
    width: 100%;
    padding: 0;
  }
}

/* Responsive layout - when the screen is less than 400px wide, make the navigation links stack on top of each other instead of next to each other */
@media screen and (max-width: 400px) {
  .topnav a {
    float: none;
    width: 100%;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  /* slate-800 */
}

.responsiveImage {
  width: 100%;
  max-width: 500px;
  height: auto;
}

img {
  border-radius: 10%;
}

.w3-row-padding {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.w3-top .w3-bar {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
}

a {
  text-decoration: none;
  pointer-events: auto;
}

a:hover {
  opacity: 0.95;
}

/* learn & play buttons */

.btn {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: 
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* Learn button */
.btn-learn {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.btn-learn:hover {
    background: linear-gradient(135deg, #66BB6A, #388E3C);
}

/* Play Game button */
.btn-play {
    background: linear-gradient(135deg, #2196F3, #1565C0);
}

.btn-play:hover {
    background: linear-gradient(135deg, #42A5F5, #1E88E5);
}


/* Button Group Start */

.btn-group button {
  /* background-color: #04AA6D; */
  color: white;
  /* White text */
  padding: 10px 24px;
  /* Some padding */
  cursor: pointer;
  /* Pointer/hand icon */
  width: auto;
  margin: 10px;
}
.buttonGroupPanel {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 260px;
  background: white;
  border-radius: 20px;
  padding: 24px;
  margin: 16px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}

.buttonGroupPanel:hover {
  /* transform: translateY(-8px); no scale here */
  transform: translateY(-8px) scale(1.03);
  box-shadow:
    0 24px 40px rgba(0, 0, 0, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.08);
}

/* .buttonGroupPanel:hover img {
  transform: scale(1.08);
} */


.buttonGroupPanel img {
  border-radius: 12px;
  width: 100%;
  max-width: 180px;
  height: auto;
  object-fit: cover;
}

.buttonGroupPanel button.btn {
  all: unset; /* remove legacy + browser styles */
  display: inline-block;

  padding: 12px 22px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.buttonGroupPanel button.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}


.buttonGroupPanel h2 {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

/* Button Group End */

.title {
  background-color: #2196F3;
}

/* Sidebar Start */

.sidebar {
  width: 200px;
  max-height: 600px;
  background-color: #2196F3;
  padding: 20px;
}

.sidebar-title {
  font-size: 1.5em;
  /* Font size for the title */
  margin-bottom: 20px;
  /* Space below the title */
  color: #ecf0f1;
  /* Same color as text to maintain consistency */
}

.sidebar button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  text-align: left;
  border: none;
  background-color: inherit;
  cursor: pointer;
  /* font-size: 1.2rem; */
}

.sidebar button:hover {
  background-color: #f9efef;
}

#sidebar-menu a {
    font-size:1.0rem; /* smaller text */
  }

.content {
  flex: 1;
  /* Ensure content takes remaining space */
  overflow-y: auto;
  /* Enable vertical scrollbar */
  padding: 10px;
  /* Optional: Add padding for better appearance */
  max-height: 600px;
}

/* CSS for the active button */
#sidebar button.active {
  background-color: #f1f4f7;
  /* Ensure the background color overrides */
  font-weight: bold;
}

/* Sidebar End */


/* Gallery Start */

div.gallery {
  margin: 15px;
  /* border: 1px solid #ccc; */
  width: 250px;
}

div.gallery:hover {
  /* border: 1px solid #777; */
  background-color: #dbf1f641;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}

div.gallery img {
  width: 200px;
  height: 120px;
}

div.desc {
  padding: 15px;
  text-align: center;
}

/* Gallery End */

/* Inside Play Game */
.dynamic-button {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  background-color: #ffc800;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dynamic-button:hover {
  background-color: #0056b3;
}

.main-title {
  border: 1px solid #ccc;
  height: 10rem;
  padding: 10px;
  margin: 10px;
  background-color: #007bff;
  font-family: Arial, sans-serif;
}

/* code */

pre {
  background-color: #333;
  color: #f8f8f2;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
}

code {
  display: block;
}

.big-panel {
  padding: 24px;
  font-size: 1.4rem;
  /* increase text size */
  border-radius: 16px;
  /* round corners */
  margin: 12px auto;
  max-width: 70%;
}

.align-left {
  text-align: left;
  margin-right: 5%;
}

.align-right {
  text-align: right;
  margin-left: 5%;
}

.white-text {
  color: white;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* upgraded */
/* HOVER EFFECT */
.section-container > *:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}