@charset "UTF-8";
/* CSS Document */

body {
  background-color: #393E61;
  text-align: center;
}
.game-page {
  background-color: #ffffff;
  margin: 0;
  overflow: hidden;
}

.main-heading {
  color: #ffffff;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .main-heading {
    font-size: 1.6rem;
  }
}

.top-spacing {
  padding-top: 2rem;
}
.ad-container {
  width: 100%;
  overflow: hidden;
}

.ad-container ins.adsbygoogle {
  display: block;
  min-height: 90px;
}
/* Floating Back Button (final version) */
.floating-back-btn {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 10px 14px;
  border-radius: 999px;

  /* subtle modern look */
  background: rgba(45, 140, 255, 0.9);
  backdrop-filter: blur(4px);

  border: 2px solid rgba(0,0,0,0.1);

  color: #ffffff !important;
  text-decoration: none !important;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;

  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.floating-back-btn:hover,
.floating-back-btn:focus {
  background: rgba(31, 111, 224, 0.95);
  border-color: rgba(0,0,0,0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.2);
  color: #ffffff !important;
  text-decoration: none !important;
}

.floating-back-btn:active {
  transform: translateY(0);
}

.floating-back-icon {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1;
}

.floating-back-text {
  line-height: 1;
}

@media (max-width: 768px) {
  .floating-back-btn {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 9px 12px;
    font-size: 13px;
  }

  .floating-back-icon {
    font-size: 15px;
  }
}
/* =========================
   INTRO BOX
========================= */

.intro-box {
  margin-top: 10px;
  padding: 30px;
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;

  border: 1px solid rgba(255,255,255,0.2); /* permanent outline */

  box-shadow: 
    0 10px 25px rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.05); /* soft glow edge */
}

.intro-heading {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

.intro-box p {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.intro-note {
  margin-top: 1rem;
  padding: 14px 18px;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: #ffffff;

  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 600;
  text-align: center;

  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.intro-cta {
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: underline;
}

.intro-cta:hover {
  color: #eaf3ff !important;
}
.intro-logo {
  height: 30px;
  width: auto;
  vertical-align: middle;
  opacity: 0.9;
}
/* =========================
   GAME SECTIONS
========================= */

.game-section {
  margin-bottom: 2rem;
}

.game-card {
  
  margin-top: 10px;
  padding: 30px;
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;

  border: 1px solid rgba(255,255,255,0.2); /* permanent outline */

  box-shadow: 
    0 10px 25px rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.05); /* soft glow edge */
}

.game-image {
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.game-image-link {
  display: block;
}

.game-image {
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-image:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.game-content {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.game-tag {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.game-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.game-title-link {
  color: #ffffff;
  text-decoration: none;
}

.game-title-link:hover {
	color: #ffffff;
  text-decoration: underline;
}

.game-description {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.game-button {
  min-width: 140px;
}
.game-card {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-card:hover {
  box-shadow: 0 0 15px rgba(255,255,255,0.4);
  border-color: #fff;
}

@media (min-width: 992px) {
  .game-content {
    padding-left: 1rem;
  }
}

/* =========================
   OTHER UI
========================= */

.about-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  padding: 20px;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.worksheet-image {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.worksheet-image:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: #ffc107;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* scroll animation */
.animated-row {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.animated-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* glass effect */
.glass-image {
  position: relative;
  display: inline-block;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.6);
}

.glass-image img {
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  transition: 0.25s ease;
}

.glass-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.18),
    rgba(255,255,255,0.04) 40%,
    rgba(0,0,0,0.08)
  );
  pointer-events: none;
}

.glass-image:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 25px rgba(0,0,0,0.35);
}

/* =========================
   BUTTONS
========================= */

/* Base button styles */
.math-btn,
.math-btn-light {
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;

  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* Active button (current page) */
.math-btn {
  background-color: #ff4d4d;
  border-color: rgba(255,255,255,0.8);
}

/* Inactive buttons */
.math-btn-light {
  background-color: #2d8cff;
}

/* Hover effect (border highlight only) */
.math-btn:hover,
.math-btn-light:hover {
	color: #e6f2ff;
  border-color: rgba(255,255,255,1);
}

/* Layout helpers */
.button-area {
  text-align: center;
  margin-top: 20px;
}

.button-area a {
  margin: 8px;
}

/* Mobile */
@media (max-width: 768px) {
  .math-btn,
  .math-btn-light {
    display: block;
    width: 80%;
    margin: 10px auto;
  }
}
/* =========================
   FOOTER
========================= */

.site-footer {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  color: #ddd;
  padding: 50px 0 40px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px 20px 0 0;
}

.site-footer h5 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
}

.site-footer p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copy {
  color: #aaa;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 10px;
}