* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background: #ffffff;
  color: #222;
  min-height: 100vh;
}

header {
  background: #b00020;
  color: white;
  text-align: center;
  padding: 45px 20px;
}

header h1 {
  font-size: 2.7rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  max-width: 750px;
  margin: 0 auto;
}

main {
  width: min(1100px, 92%);
  margin: 35px auto;
}

.intro-card {
  background: #fff5f5;
  border: 2px solid #b00020;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 30px;
  text-align: center;
}

.intro-card h2 {
  color: #b00020;
  margin-bottom: 10px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.menu-card {
  background: white;
  border: 2px solid #b00020;
  border-radius: 20px;
  padding: 35px 25px;
  text-decoration: none;
  color: #222;
  min-height: 190px;
  transition: 0.2s ease;
  box-shadow: 0 8px 20px rgba(176, 0, 32, 0.12);
}

.menu-card:hover {
  background: #b00020;
  color: white;
  transform: translateY(-5px);
}

.menu-card h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: #b00020;
}

.menu-card:hover h2 {
  color: white;
}

.menu-card p {
  font-size: 1rem;
}

footer {
  text-align: center;
  padding: 25px;
  background: #b00020;
  color: white;
  margin-top: 45px;
}

@media (max-width: 700px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  header h1 {
    font-size: 2.1rem;
  }
}
.page-intro {
  background: #fff5f5;
  border: 2px solid #b00020;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
}

.page-intro h2 {
  color: #b00020;
  font-size: 2rem;
  margin-bottom: 10px;
}

.topic-list {
  display: grid;
  gap: 20px;
}

.learn-topic-card {
  display: flex;
  gap: 20px;
  align-items: center;
  background: white;
  border: 2px solid #b00020;
  border-radius: 22px;
  padding: 28px;
  text-decoration: none;
  color: #222;
  box-shadow: 0 8px 20px rgba(176, 0, 32, 0.12);
  transition: 0.2s ease;
}

.learn-topic-card:hover {
  transform: translateY(-4px);
  background: #fff5f5;
}

.topic-number {
  background: #b00020;
  color: white;
  font-size: 1.6rem;
  font-weight: bold;
  padding: 18px;
  border-radius: 18px;
}

.learn-topic-card h2 {
  color: #b00020;
  margin-bottom: 8px;
}

.learn-topic-card span {
  display: inline-block;
  margin-top: 12px;
  color: #b00020;
  font-weight: bold;
}

.lesson-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  background: #b00020;
  color: white;
  border-radius: 24px;
  padding: 34px;
  margin-bottom: 28px;
}

.lesson-hero h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.label {
  background: white;
  color: #b00020;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: bold;
  margin-bottom: 14px;
}

.image-box {
  background: white;
  color: #b00020;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
}

.image-box code {
  display: inline-block;
  margin-top: 8px;
  background: #fff5f5;
  padding: 6px 10px;
  border-radius: 8px;
}

.lesson-card {
  background: white;
  border: 2px solid #ffd6d6;
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(176, 0, 32, 0.08);
}

.lesson-card h2 {
  color: #b00020;
  margin-bottom: 18px;
}

.vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.vocab-card {
  background: #fff5f5;
  border: 1px solid #ffb3b3;
  border-radius: 18px;
  padding: 20px;
  text-align: center;
}

.vocab-card h3 {
  color: #b00020;
  font-size: 2rem;
}

.pinyin {
  color: #666;
  font-style: italic;
  margin: 5px 0;
}

.sentence-block {
  background: #fff5f5;
  border-left: 6px solid #b00020;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.chinese {
  color: #b00020;
  font-size: 1.6rem;
  font-weight: bold;
}

.learn-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.learn-table th {
  background: #b00020;
  color: white;
  padding: 14px;
  text-align: left;
}

.learn-table td {
  border-bottom: 1px solid #ffd6d6;
  padding: 14px;
}

.learn-table tr:nth-child(even) {
  background: #fff5f5;
}

.checkpoint {
  background: #fffafa;
}

.question-box {
  background: white;
  border: 1px solid #ffb3b3;
  border-radius: 16px;
  padding: 18px;
  margin-top: 16px;
}

.model-answer {
  background: #fff5f5;
  border-radius: 18px;
  padding: 20px;
}

.bottom-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0;
}

.bottom-buttons a {
  background: #b00020;
  color: white;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: bold;
}

.bottom-buttons a:hover {
  background: #7a0016;
}

@media (max-width: 750px) {
  .lesson-hero {
    grid-template-columns: 1fr;
  }

  .learn-topic-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .bottom-buttons {
    flex-direction: column;
  }
}

.step {
  display: none;
}

.active-step {
  display: block;
}

.continue-btn {
  margin-top: 22px;
  background: #b00020;
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.continue-btn:hover {
  background: #7a0016;
}

.hidden {
  display: none;
}

.mcq {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.mcq button {
  background: white;
  border: 2px solid #ffd6d6;
  padding: 15px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s ease;
}

.mcq button:hover {
  background: #fff5f5;
  border-color: #b00020;
}

.correct-answer {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
}

.wrong-answer {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
}

.feedback {
  margin-top: 15px;
  font-weight: bold;
}

.correct-feedback {
  color: #15803d;
}

.wrong-feedback {
  color: #b00020;
}

.chinese-inline {
  color: #b00020;
  font-size: 1.4rem;
  font-weight: bold;
}

.finish-card {
  text-align: center;
}

.subtopic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.subtopic-card {
  background: white;
  border: 2px solid #b00020;
  border-radius: 20px;
  padding: 25px;
  text-decoration: none;
  color: #222;
  min-height: 160px;
  transition: 0.2s ease;
  box-shadow: 0 8px 20px rgba(176, 0, 32, 0.12);
}

.subtopic-card:hover {
  background: #b00020;
  color: white;
  transform: translateY(-5px);
}

.subtopic-card h3 {
  color: #b00020;
  margin-bottom: 10px;
}

.subtopic-card:hover h3 {
  color: white;
}

@media (max-width: 700px) {
  .subtopic-grid {
    grid-template-columns: 1fr;
  }
}

.back-button {
  margin: 20px 0;
}

.back-button a {
  text-decoration: none;
  color: #b00020;
  font-weight: bold;
  border: 2px solid #b00020;
  padding: 8px 14px;
  border-radius: 999px;
  transition: 0.2s;
}

.back-button a:hover {
  background: #b00020;
  color: white;
}

.image-box img {
  width: 100%;
  border-radius: 12px;
}

.image-box {
  padding: 0;
  overflow: hidden;
}

.image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.country-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  background: linear-gradient(135deg, #b00020, #7a0016);
  color: white;
  border-radius: 24px;
  padding: 34px;
  margin-bottom: 28px;
}

.country-hero h2 {
  font-size: 2.3rem;
  margin-bottom: 12px;
}

.map-card {
  background: white;
  color: #b00020;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}

.map-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.country-tile {
  background: #fff5f5;
  border: 2px solid #ffd6d6;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  transition: 0.2s;
}

.country-tile:hover {
  transform: translateY(-4px);
  border-color: #b00020;
}

.country-tile h3 {
  color: #b00020;
  font-size: 1.8rem;
}

.country-tile p {
  color: #666;
  font-style: italic;
}

.country-tile span {
  font-weight: bold;
}

.sentence-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.split-card {
  border-left: 10px solid #b00020;
}

@media (max-width: 750px) {
  .country-hero {
    grid-template-columns: 1fr;
  }
}
.sentence-hero {
  background: linear-gradient(135deg, #b00020, #7a0016);
  color: white;
  border-radius: 24px;
  padding: 34px;
  margin-bottom: 28px;
}

.sentence-hero h2 {
  font-size: 2.3rem;
  margin-bottom: 10px;
}

.fill-question {
  background: #fff5f5;
  border: 2px solid #ffd6d6;
  border-radius: 18px;
  padding: 20px;
  margin: 18px 0;
}

.fill-question button {
  background: white;
  border: 2px solid #b00020;
  color: #b00020;
  padding: 10px 16px;
  margin: 8px;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
}

.word-bank {
  margin: 18px 0;
}

.word-bank button {
  background: #b00020;
  color: white;
  border: none;
  padding: 12px 18px;
  margin: 8px;
  border-radius: 14px;
  font-size: 1.2rem;
  cursor: pointer;
}

.sentence-drop {
  min-height: 70px;
  background: #fff5f5;
  border: 2px dashed #b00020;
  border-radius: 18px;
  padding: 16px;
  margin: 16px 0;
}

.chosen-word {
  display: inline-block;
  background: white;
  border: 2px solid #b00020;
  color: #b00020;
  padding: 10px 14px;
  margin: 6px;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: bold;
}

.reset-btn {
  margin-top: 22px;
  background: white;
  color: #b00020;
  border: 2px solid #b00020;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: bold;
  cursor: pointer;
}

.correct-builder {
  border-color: #16a34a;
  background: #dcfce7;
}

.wrong-builder {
  border-color: #dc2626;
  background: #fee2e2;
}

.bottom-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0;
}

.bottom-buttons a {
  background: #b00020;
  color: white;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: bold;
}

.bottom-buttons a:hover {
  background: #7a0016;
}

@media (max-width: 700px) {
  .bottom-buttons {
    flex-direction: column;
  }
}
.results-box {
  background: #fff5f5;
  border: 2px solid #b00020;
  border-radius: 20px;
  padding: 20px;
  margin-top: 30px;
  text-align: center;
}

.results-box h3 {
  color: #b00020;
  margin-bottom: 10px;
}
/* spacing upgrade */
.lesson-card {
  padding: 32px;
  margin-bottom: 30px;
}

.vocab-grid {
  gap: 20px;
  margin-top: 20px;
}

.vocab-card {
  padding: 22px;
}

.sentence-block {
  margin-top: 20px;
}

.step {
  margin-top: 20px;
}

.sentence-hero {
  margin-bottom: 35px;
  padding: 40px;
}
/* proper quiz buttons */
.quiz-buttons {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.quiz-buttons button {
  background: white;
  border: 2px solid #b00020;
  color: #b00020;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-buttons button:hover {
  background: #fff5f5;
  border-color: #7a0016;
}

.correct-answer {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
  color: #166534 !important;
}

.wrong-answer {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #7f1d1d !important;
}
.end-topic-section {
  margin-top: 40px;
  padding: 30px;
  border-radius: 24px;
  background: linear-gradient(135deg, #b00020, #7a0016);
  color: white;
  text-align: center;
}

.end-topic-section h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.end-topic-section p {
  margin-bottom: 20px;
}

.end-topic-btn {
  display: inline-block;
  background: white;
  color: #b00020;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
}

.end-topic-btn:hover {
  background: #ffe5e5;
}
.topic-hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
  background: linear-gradient(135deg, #b00020, #7a0016);
  color: white;
  border-radius: 24px;
  padding: 35px;
  margin-bottom: 30px;
}

.topic-hero h2 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.topic-visual img {
  width: 100%;
  border-radius: 18px;
}

.label {
  font-weight: bold;
  opacity: 0.8;
}
.quiz-hub {
  max-width: 1150px;
  margin: 40px auto;
  padding: 20px;
}

.quiz-hero {
  background: linear-gradient(135deg, #121212, #263238);
  color: white;
  border-radius: 28px;
  padding: 50px;
  margin-bottom: 35px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.18);
}

.quiz-hero h2 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.quiz-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.quiz-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.quiz-mode-card {
  text-decoration: none;
  color: #102018;
  background: white;
  border-radius: 26px;
  padding: 30px;
  min-height: 230px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  border: 2px solid #e2efe9;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-mode-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.quiz-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.quiz-mode-card h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.quiz-mode-card p {
  font-size: 1rem;
  line-height: 1.5;
}

.quiz-tag {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #dff3ea;
  color: #1b5e40;
  font-weight: bold;
}

@media (max-width: 850px) {
  .quiz-mode-grid {
    grid-template-columns: 1fr;
  }

  .quiz-hero h2 {
    font-size: 2.2rem;
  }
}
.quiz-hub {
  max-width: 1150px;
  margin: 40px auto;
  padding: 20px;
}


/* HERO */
.quiz-hero {
  background: linear-gradient(135deg, #000000, #1a0000);
  color: white;
  border-radius: 28px;
  padding: 50px;
  margin-bottom: 35px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.quiz-hero h2 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.quiz-hero p {
  font-size: 1.2rem;
  opacity: 0.85;
}

/* GRID */
.quiz-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* DARK RED CARDS */
.quiz-mode-card {
  text-decoration: none;
  color: white;
  background: linear-gradient(145deg, #2a0000, #3a0000);
  border-radius: 26px;
  padding: 30px;
  min-height: 230px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  border: 2px solid #500000;
  transition: all 0.25s ease;
}

/* HOVER = GLOW */
.quiz-mode-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 45px rgba(255, 0, 0, 0.25);
  border-color: #aa0000;
}

/* REMOVE ICON STYLE COMPLETELY */
.quiz-icon {
  display: none;
}

/* TEXT */
.quiz-mode-card h3 {
  font-size: 1.9rem;
  margin-bottom: 12px;
}

.quiz-mode-card p {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* TAG */
.quiz-tag {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #660000;
  color: #fff;
  font-weight: bold;
  font-size: 0.85rem;
}

/* MOBILE */
@media (max-width: 850px) {
  .quiz-mode-grid {
    grid-template-columns: 1fr;
  }

  .quiz-hero h2 {
    font-size: 2.2rem;
  }
}
/* ===== QUIZ PAGES ONLY ===== */

.quiz-page {
  background: #0a0a0a;
  color: white;
}

/* Fix text colours */
.quiz-page h1,
.quiz-page h2,
.quiz-page h3 {
  color: white;
}

.quiz-page p {
  color: rgba(255,255,255,0.9);
}

.quiz-page a {
  color: white;
}

/* QUIZ CARDS (dark red) */
.quiz-page .quiz-mode-card {
  background: linear-gradient(145deg, #2a0000, #3a0000);
  border: 2px solid #500000;
  color: white;
  transition: all 0.25s ease;
}

.quiz-page .quiz-mode-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(255,0,0,0.25);
  border-color: #aa0000;
}

/* FADE IN */
.quiz-page {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
/* ===== QUIZ POLISH EFFECTS ===== */

/* slow pulsing glow */
.quiz-page .quiz-mode-card {
  position: relative;
  overflow: hidden;
  animation: slowGlow 3s ease-in-out infinite;
}

@keyframes slowGlow {
  0% {
    box-shadow: 0 12px 30px rgba(255,0,0,0.12);
  }
  50% {
    box-shadow: 0 18px 45px rgba(255,0,0,0.28);
  }
  100% {
    box-shadow: 0 12px 30px rgba(255,0,0,0.12);
  }
}

/* hover ripple */
.quiz-page .quiz-mode-card::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  top: var(--y, 50%);
  left: var(--x, 50%);
  pointer-events: none;
}

.quiz-page .quiz-mode-card:hover::after {
  animation: ripple 0.7s ease-out;
}

@keyframes ripple {
  from {
    transform: scale(0);
    opacity: 0.45;
  }
  to {
    transform: scale(18);
    opacity: 0;
  }
}

/* click animation */
.quiz-page .quiz-mode-card:active {
  transform: scale(0.96);
  box-shadow: 0 8px 20px rgba(255,0,0,0.2);
}

/* score pop animation for Rapid Fire */
.score-pop {
  position: fixed;
  font-size: 2rem;
  font-weight: bold;
  color: #ffdddd;
  background: #7a0000;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(255,0,0,0.35);
  animation: scorePop 0.8s ease forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes scorePop {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.7);
  }
  30% {
    opacity: 1;
    transform: translateY(0) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translateY(-35px) scale(1);
  }
}

.rf-menu {
  background: #100000;
  border: 2px solid #5a0000;
  border-radius: 28px;
  padding: 35px;
  color: white;
}

.rf-menu h2 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 25px;
}

.unit-card {
  text-align: left;
  background: linear-gradient(145deg, #2a0000, #4a0000);
  color: white;
  border: 2px solid #7a0000;
  border-radius: 22px;
  padding: 24px;
  cursor: pointer;
  transition: 0.2s ease;
}

.unit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(255,0,0,0.25);
}

.unit-card h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.unit-card p {
  opacity: 0.9;
  line-height: 1.5;
}

.unit-card span {
  display: inline-block;
  margin-top: 15px;
  background: #8a0000;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: bold;
}

.unit-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.unit-card.locked:hover {
  transform: none;
  box-shadow: none;
}

.hidden {
  display: none;
}
.mixed-card {
  background: linear-gradient(145deg, #300000, #7a0000);
  border-color: #c00000;
}
.rf-game-wrap {
  max-width: 1150px;
  margin: 30px auto;
  padding: 20px;
}

.rf-start-screen {
  background: radial-gradient(circle at top, #400000, #080000);
  border: 2px solid #700000;
  border-radius: 30px;
  padding: 40px;
  color: white;
  box-shadow: 0 0 35px rgba(255,0,0,0.22);
}

.rf-start-screen h2 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.rf-rules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 30px 0;
}

.rf-rules-grid div {
  background: rgba(120,0,0,0.45);
  border: 1px solid #900000;
  border-radius: 18px;
  padding: 18px;
}

.rf-start-btn {
  background: linear-gradient(145deg, #8b0000, #d00000);
  color: white;
  border: none;
  border-radius: 18px;
  padding: 18px 32px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
}

.rf-topbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.rf-topbar div {
  background: #130000;
  border: 2px solid #600000;
  color: white;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  font-weight: bold;
}

.rf-arena {
  position: relative;
  height: 340px;
  background: radial-gradient(circle at center, #260000, #050505);
  border: 2px solid #750000;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: inset 0 0 35px rgba(255,0,0,0.15);
}

.floating-word {
  position: absolute;
  top: 125px;
  left: -280px;
  font-size: 3.2rem;
  font-weight: bold;
  color: white;
  background: linear-gradient(145deg, #8a0000, #c00000);
  border: 2px solid #ff3333;
  padding: 18px 38px;
  border-radius: 24px;
  box-shadow: 0 0 30px rgba(255,0,0,0.45);
}

@keyframes floatAcross {
  from {
    left: -300px;
  }

  to {
    left: 115%;
  }
}

.rf-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.rf-options button {
  background: linear-gradient(145deg, #6f0000, #a80000);
  color: white;
  border: 2px solid #c40000;
  border-radius: 20px;
  padding: 22px;
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.18s ease;
}

.rf-options button:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(255,0,0,0.3);
}

.rf-options button:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.rf-options .rf-correct {
  background: linear-gradient(145deg, #006b2e, #00a84f);
  border-color: #00ff75;
}

.rf-options .rf-wrong {
  background: linear-gradient(145deg, #3a0000, #5a0000);
  border-color: #ff3333;
}

.rf-feedback {
  text-align: center;
  min-height: 35px;
  margin-top: 18px;
  font-size: 1.3rem;
  font-weight: bold;
}

.rf-good {
  color: #8cffb2;
}

.rf-bad {
  color: #ff8c8c;
}

.rf-end {
  background: radial-gradient(circle at top, #300000, #060000);
  border: 2px solid #800000;
  border-radius: 30px;
  padding: 40px;
  text-align: center;
  color: white;
}

.rf-end button,
.rf-end a {
  display: inline-block;
  margin: 10px;
  background: #9b0000;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 16px;
  padding: 14px 24px;
  font-weight: bold;
}

@media (max-width: 850px) {
  .rf-rules-grid,
  .rf-topbar,
  .rf-options {
    grid-template-columns: 1fr;
  }

  .floating-word {
    font-size: 2.2rem;
  }
}
/* ===== RAPID FIRE MENU ===== */

.rapid-fire-hero {
  background:
    radial-gradient(circle at top right, rgba(190, 0, 0, 0.35), transparent 35%),
    linear-gradient(135deg, #050505, #1b0000 55%, #330000);
}

.quiz-label {
  display: inline-block;
  background: #7a0000;
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: bold;
  margin-bottom: 14px;
}

.rapid-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.rapid-unit-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  padding: 28px;
  border-radius: 28px;
  text-decoration: none;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(255, 0, 0, 0.18), transparent 35%),
    linear-gradient(145deg, #220000, #4a0000);
  border: 2px solid #750000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.45);
  transition: 0.25s ease;
}

.rapid-unit-card:hover {
  transform: translateY(-7px);
  border-color: #d00000;
  box-shadow: 0 20px 45px rgba(255,0,0,0.22);
}

.unit-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.unit-badge {
  background: #8a0000;
  color: white;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: bold;
}

.unit-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.22);
}

.rapid-unit-card h3 {
  font-size: 2rem;
  margin-bottom: 12px;
  color: white;
}

.rapid-unit-card p {
  color: rgba(255,255,255,0.86);
  line-height: 1.5;
  margin-bottom: 24px;
}

.unit-action {
  position: absolute;
  bottom: 24px;
  left: 28px;
  font-weight: bold;
  color: white;
}

.rapid-unit-card.locked {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.rapid-unit-card.locked:hover {
  transform: none;
  border-color: #750000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.45);
}

.locked-badge {
  background: #333;
}

.rapid-unit-card.mixed {
  background:
    radial-gradient(circle at top right, rgba(255, 110, 110, 0.25), transparent 35%),
    linear-gradient(145deg, #320000, #7a0000);
  border-color: #c00000;
}

@media (max-width: 850px) {
  .rapid-unit-grid {
    grid-template-columns: 1fr;
  }

  .rapid-unit-card {
    min-height: 220px;
  }
}

/* ===== MASTERY MODE MENU ===== */

.mastery-hero {
  background:
    radial-gradient(circle at top right, rgba(190, 0, 0, 0.35), transparent 35%),
    linear-gradient(135deg, #050505, #1b0000 55%, #330000);
}

.mastery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.mastery-card {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  padding: 32px;
  border-radius: 30px;
  text-decoration: none;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(255, 0, 0, 0.18), transparent 35%),
    linear-gradient(145deg, #220000, #4a0000);
  border: 2px solid #750000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.45);
  transition: 0.25s ease;
}

.mastery-card:hover {
  transform: translateY(-7px);
  border-color: #d00000;
  box-shadow: 0 20px 45px rgba(255,0,0,0.22);
}

.mastery-icon {
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255,255,255,0.25);
  margin-bottom: 25px;
}

.mastery-card h3 {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.mastery-card p {
  color: rgba(255,255,255,0.86);
  line-height: 1.55;
  font-size: 1.05rem;
}

.mastery-card span {
  position: absolute;
  bottom: 28px;
  left: 32px;
  font-weight: bold;
}

@media (max-width: 850px) {
  .mastery-grid {
    grid-template-columns: 1fr;
  }
}
.writing-wrap {
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
}

.writing-hero {
  background: radial-gradient(circle at top right, rgba(190,0,0,0.35), transparent 35%),
              linear-gradient(135deg, #050505, #1b0000 55%, #330000);
  color: white;
  border-radius: 30px;
  padding: 38px;
  border: 2px solid #750000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.45);
}

.writing-hero h2 {
  font-size: 3rem;
}

.writing-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.writing-panel,
.writing-sidebar,
.mark-box {
  background: #100000;
  color: white;
  border: 2px solid #700000;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.4);
}

.prompt-box {
  background: linear-gradient(145deg, #240000, #4a0000);
  border: 1px solid #8a0000;
  border-radius: 20px;
  padding: 22px;
  margin: 15px 0;
}

.prompt-box h4 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.prompt-box li {
  margin: 8px 0;
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  background: #050505;
  color: white;
  border: 2px solid #700000;
  border-radius: 20px;
  padding: 18px;
  font-size: 1.1rem;
  margin-top: 12px;
}

.writing-btn {
  background: linear-gradient(145deg, #8b0000, #d00000);
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 22px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
}

.writing-btn.secondary {
  background: #333;
}

.writing-actions {
  display: flex;
  gap: 12px;
}

.vocab-help {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vocab-chip {
  background: #260000;
  border: 1px solid #7a0000;
  border-radius: 14px;
  padding: 10px 12px;
}

.vocab-chip span {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
}

.vocab-chip small {
  color: rgba(255,255,255,0.75);
}

.structure-list li {
  margin: 10px 0;
}

.score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(145deg, #7a0000, #d00000);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: bold;
  margin: 18px 0;
}

.feedback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feedback-grid div {
  background: #220000;
  border: 1px solid #700000;
  border-radius: 18px;
  padding: 18px;
}

.used-vocab {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.used-vocab span {
  background: #4a0000;
  border: 1px solid #900000;
  border-radius: 999px;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .writing-layout,
  .feedback-grid {
    grid-template-columns: 1fr;
  }
}
.reading-wrap {
  max-width: 1150px;
  margin: 30px auto;
  padding: 20px;
}

.reading-card,
.question-card {
  background: #100000;
  color: white;
  border: 2px solid #700000;
  border-radius: 28px;
  padding: 28px;
  margin-top: 24px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.4);
}

.chinese-text {
  background: #050505;
  border: 2px solid #700000;
  border-radius: 20px;
  padding: 24px;
  font-size: 1.35rem;
  line-height: 2;
}

.question-block {
  background: #220000;
  border: 1px solid #700000;
  border-radius: 18px;
  padding: 18px;
  margin: 16px 0;
}

.question-block label {
  display: block;
  margin: 10px 0;
}

.question-block input[type="text"] {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid #700000;
  background: #050505;
  color: white;
  font-size: 1rem;
}
.unit-tag {
  display: inline-block;
  background: #7a0000;
  color: white;
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: bold;
  margin: 10px 0 18px;
}
/* ===== QUESTION MATCH MODE ===== */

.match-wrap {
  max-width: 1150px;
  margin: 30px auto;
  padding: 20px;
}

.match-hero {
  background:
    radial-gradient(circle at top right, rgba(190,0,0,0.35), transparent 35%),
    linear-gradient(135deg, #050505, #1b0000 55%, #330000);
  color: white;
  border-radius: 30px;
  padding: 38px;
  border: 2px solid #750000;
  box-shadow: 0 14px 35px rgba(0,0,0,0.45);
}

.match-hero h2 {
  font-size: 3rem;
}

.match-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0;
}

.match-stats div {
  background: #100000;
  color: white;
  border: 2px solid #700000;
  border-radius: 20px;
  padding: 18px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.match-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.match-card {
  height: 135px;
  border: none;
  background: transparent;
  perspective: 1000px;
  cursor: pointer;
}

.match-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
  transform-style: preserve-3d;
}

.match-card.flipped .match-card-inner,
.match-card.matched .match-card-inner {
  transform: rotateY(180deg);
}

.match-card-front,
.match-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}

.match-card-front {
  background:
    radial-gradient(circle at top right, rgba(255,0,0,0.25), transparent 40%),
    linear-gradient(145deg, #250000, #690000);
  color: white;
  border: 2px solid #900000;
  font-size: 2.4rem;
}

.match-card-back {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), transparent 40%),
    linear-gradient(145deg, #060606, #260000);
  color: white;
  border: 2px solid #d00000;
  transform: rotateY(180deg);
  font-size: 1.35rem;
  padding: 14px;
  text-align: center;
}

.match-card.matched .match-card-back {
  border-color: #00ff75;
  box-shadow: 0 0 25px rgba(0,255,117,0.25);
}

.match-end {
  margin-top: 28px;
  background: #100000;
  color: white;
  border: 2px solid #700000;
  border-radius: 28px;
  padding: 28px;
  text-align: center;
}

@media (max-width: 900px) {
  .match-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .match-stats {
    grid-template-columns: 1fr;
  }
}
.auto-vocab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 20px;
}

.auto-vocab-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.auto-vocab-card span {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #7a0000;
}

.auto-vocab-card small {
  color: #333;
}

.sentence-builder-section,
.vocab-section,
.mini-practice {
  margin-top: 30px;
}

.builder-word-bank,
.builder-answer-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: white;
  padding: 18px;
  border-radius: 18px;
  margin: 15px 0;
}

.builder-word-bank button,
.builder-answer-box button {
  background: #7a0000;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: bold;
  cursor: pointer;
}

.correct-feedback {
  color: green;
  font-weight: bold;
}

.wrong-feedback {
  color: #b00000;
  font-weight: bold;
}

@media (max-width: 850px) {
  .auto-vocab-grid {
    grid-template-columns: 1fr;
  }
}
.learn-flow {
  max-width: 1000px;
  margin: 30px auto;
  padding: 20px;
}

.flow-hero,
.lesson-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  margin-bottom: 24px;
}

.flow-hero h2,
.lesson-card h2 {
  color: #7a0000;
  font-size: 2.4rem;
}

.step-label {
  display: inline-block;
  background: #f6dede;
  color: #7a0000;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: bold;
}

.seneca-vocab-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.seneca-word-card {
  background: #fff7f7;
  border: 2px solid #f0c7c7;
  border-radius: 18px;
  padding: 16px;
}

.seneca-word-card strong {
  display: block;
  font-size: 1.5rem;
  color: #7a0000;
}

.seneca-word-card span {
  color: #333;
}

.example-box {
  background: #fff7f7;
  border-left: 6px solid #7a0000;
  border-radius: 16px;
  padding: 18px;
  font-size: 1.3rem;
  margin: 18px 0;
}

.example-box span {
  color: #555;
  font-size: 1rem;
}

.flow-actions {
  text-align: right;
}

.flow-actions button,
.check-btn {
  background: #7a0000;
  color: white;
  border: none;
  border-radius: 16px;
  padding: 14px 24px;
  font-weight: bold;
  cursor: pointer;
}

.english-prompt {
  font-size: 1.3rem;
  font-weight: bold;
}

.builder-word-bank,
.builder-answer-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff7f7;
  border-radius: 18px;
  padding: 18px;
  margin: 18px 0;
  min-height: 70px;
}

.builder-word-bank button,
.builder-answer-box button {
  background: #7a0000;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
}

.test-question {
  background: #fff7f7;
  border: 2px solid #f0c7c7;
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
}

.test-question label {
  display: block;
  margin: 8px 0;
}

.essay-box textarea {
  width: 100%;
  min-height: 180px;
  border: 2px solid #f0c7c7;
  border-radius: 18px;
  padding: 16px;
  font-size: 1rem;
}

.correct-feedback {
  color: green;
  font-weight: bold;
}

.wrong-feedback {
  color: #b00000;
  font-weight: bold;
}

@media (max-width: 800px) {
  .seneca-vocab-grid {
    grid-template-columns: 1fr;
  }
}
.fill-question {
  background: #fff7f7;
  border: 2px solid #f0c7c7;
  border-radius: 20px;
  padding: 20px;
  margin: 18px 0;
}

.fill-question h3 {
  color: #7a0000;
  margin-bottom: 8px;
}

.quiz-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.quiz-buttons button,
.word-bank button,
.reset-btn {
  background: #7a0000;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: bold;
  cursor: pointer;
}

.type-answer {
  width: 100%;
  padding: 14px;
  border: 2px solid #f0c7c7;
  border-radius: 14px;
  margin: 12px 0;
  font-size: 1rem;
}

.word-bank,
.sentence-drop {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: white;
  border: 2px solid #f0c7c7;
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
  min-height: 65px;
}

.chosen-word {
  background: #7a0000;
  color: white;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: bold;
}

.correct-answer {
  background: #17803b !important;
}

.wrong-answer {
  background: #b00000 !important;
}

.correct-builder {
  border-color: #17803b;
}

.wrong-builder {
  border-color: #b00000;
}

.results-box {
  background: white;
  border: 2px solid #f0c7c7;
  border-radius: 20px;
  padding: 20px;
  margin-top: 24px;
}

.results-box h3 {
  color: #7a0000;
}

@media (max-width: 800px) {
  .quiz-buttons {
    grid-template-columns: 1fr;
  }
}
.light-essay {
  background: #fff7f7;
  border: 2px solid #f0c7c7;
  border-radius: 22px;
  padding: 22px;
  margin-top: 28px;
}

.light-essay textarea {
  width: 100%;
  min-height: 190px;
  background: white;
  color: #222;
  border: 2px solid #f0c7c7;
  border-radius: 18px;
  padding: 16px;
  font-size: 1rem;
  margin-top: 14px;
}
/* ===== FLASHCARDS HUB ===== */

.flashcards-page {
  background: #9b0000;
  color: #111;
}

.flash-header {
  background: #7a0000;
  color: #fff8e7;
  border-bottom: 3px solid #111;
}

.flash-header h1,
.flash-header p {
  color: #fff8e7;
}

.flashcards-hub {
  max-width: 1150px;
  margin: 35px auto;
  padding: 20px;
}

.flash-back-button {
  margin-bottom: 22px;
}

.flash-back-button a {
  display: inline-block;
  background: #fff8e7;
  color: #111;
  border: 2px solid #111;
  border-radius: 14px;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 5px 5px 0 #111;
}

.flash-hero {
  background: #fff8e7;
  color: #111;
  border: 3px solid #111;
  border-radius: 30px;
  padding: 38px;
  box-shadow: 8px 8px 0 #111;
  margin-bottom: 30px;
}

.flash-label {
  display: inline-block;
  background: #111;
  color: #fff8e7;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: bold;
  margin-bottom: 12px;
}

.flash-hero h2 {
  font-size: 3rem;
  margin: 8px 0;
  color: #111;
}

.flash-hero p {
  color: #111;
}

.flash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.flash-card {
  background: #fff8e7;
  color: #111;
  border: 3px solid #111;
  border-radius: 24px;
  padding: 24px;
  text-decoration: none;
  min-height: 230px;
  box-shadow: 7px 7px 0 #111;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.flash-card:hover {
  transform: translateY(-5px);
  box-shadow: 10px 10px 0 #111;
}

.flash-unit {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #111;
  color: #fff8e7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 18px;
}

.flash-card h3 {
  font-size: 1.7rem;
  color: #111;
  margin-bottom: 10px;
}

.flash-card p {
  color: #111;
  line-height: 1.5;
}

.flash-card span {
  display: inline-block;
  margin-top: 14px;
  font-weight: 900;
  color: #111;
}

.flash-footer {
  color: #fff8e7;
}

@media (max-width: 900px) {
  .flash-grid {
    grid-template-columns: 1fr;
  }

  .flash-hero h2 {
    font-size: 2.4rem;
  }
}
/* ===== FLASHCARD THEME (QUIZ STYLE) ===== */

.flashcards-page {
  background: linear-gradient(135deg, #7a0000, #b30000);
}

/* Header */
.flash-header {
  background: #5c0000;
  color: #fff8e7;
}

.flash-header h1,
.flash-header p {
  color: #fff8e7;
}

/* Intro box */
.flash-intro {
  background: #fff8e7;
  border: 3px solid #111;
  box-shadow: 6px 6px 0 #111;
}

/* Cards reuse quiz style but recolour */
.flash-card {
  background: #fff8e7;
  border: 3px solid #111;
  box-shadow: 6px 6px 0 #111;
}

/* Badge tweak */
.flash-card .unit-badge {
  background: #111;
  color: #fff8e7;
}

/* Unit letter box */
.flash-card .unit-number {
  background: #b30000;
  color: #fff8e7;
}

/* Hover = slightly punchier */
.flash-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 #111;
}
/* ===== FLASHCARDS PAGE, QUIZ STYLE ===== */

.flash-zone-page {
  background: #a71920;
  color: #111;
}

.flash-zone-page header {
  background: #a71920;
  color: #fff8e7;
}

.flash-zone-page header h1,
.flash-zone-page header p {
  color: #fff8e7;
}

.flash-zone-wrap {
  max-width: 1150px;
  margin: 35px auto;
  padding: 20px;
}

.flash-back a {
  background: #fff8e7;
  color: #111;
  border: 2px solid #111;
}

.flash-zone-hero {
  background: #fff8e7;
  color: #111;
  border-radius: 28px;
  padding: 38px;
  margin-bottom: 34px;
  box-shadow: 0 14px 35px rgba(0,0,0,0.22);
  border: 2px solid rgba(0,0,0,0.15);
}

.flash-zone-hero h2 {
  color: #111;
  font-size: 3rem;
  margin-bottom: 8px;
}

.flash-zone-hero p {
  color: #111;
}

.flash-unit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.flash-unit-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  background: #fff8e7;
  color: #111;
  text-decoration: none;
  border-radius: 24px;
  padding: 28px;
  border: 2px solid rgba(0,0,0,0.18);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.flash-unit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0,0,0,0.3);
}

.flash-badge {
  display: inline-block;
  background: #a71920;
  color: #fff8e7;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 900;
  margin-bottom: 26px;
}

.flash-letter {
  position: absolute;
  top: 26px;
  right: 30px;
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(0,0,0,0.16);
}

.flash-unit-card h3 {
  color: #111;
  font-size: 2rem;
  margin-bottom: 12px;
}

.flash-unit-card p {
  color: #111;
  max-width: 82%;
  line-height: 1.45;
  font-weight: 500;
}

.flash-unit-card strong {
  display: inline-block;
  margin-top: 16px;
  color: #111;
  font-weight: 900;
}

@media (max-width: 850px) {
  .flash-unit-grid {
    grid-template-columns: 1fr;
  }

  .flash-zone-hero h2 {
    font-size: 2.4rem;
  }
}
/* ===== FLASHCARDS HUB USING QUIZ STYLE ===== */

.rapid-grid {
  max-width: 1120px;
  margin: 30px auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.rapid-unit-card {
  position: relative;
  display: block;
  min-height: 180px;
  background: linear-gradient(145deg, #2a0000, #5c0904);
  color: white;
  text-decoration: none;
  border: 1px solid #b31b12;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rapid-unit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}

.unit-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.unit-badge {
  background: #d43b2a;
  color: white;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.75rem;
  font-weight: 800;
}

.unit-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.22);
}

.rapid-unit-card h3 {
  margin-top: 26px;
  font-size: 2rem;
  color: white;
}

.rapid-unit-card p {
  margin-top: 10px;
  color: #f6dede;
  max-width: 85%;
  line-height: 1.45;
}

.unit-action {
  display: inline-block;
  margin-top: 16px;
  color: white;
  font-weight: 900;
}

@media (max-width: 850px) {
  .rapid-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== FLASHCARD PLAYER ===== */

.flashcard-container {
  text-align: center;
  margin-top: 30px;
}

.flashcard {
  width: 420px;
  max-width: 90%;
  height: 240px;
  margin: 0 auto;
  background: linear-gradient(145deg, #2a0000, #5c0904);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
  color: white;
  font-size: 2rem;
  text-align: center;
  padding: 20px;
}

.flashcard .han {
  font-size: 3rem;
  font-weight: 900;
}

.flashcard .pin {
  font-size: 1.4rem;
  color: #f6dede;
  margin-top: 10px;
}

.flashcard .eng {
  font-size: 2.2rem;
  font-weight: 700;
}

.flashcard-controls {
  margin-top: 20px;
}

.flashcard-controls button {
  margin: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: #b31b12;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.flashcard-controls button:hover {
  background: #d43b2a;
}

.flash-progress {
  margin-top: 15px;
  color: #ccc;
}
.flashcard-scene {
  width: 420px;
  max-width: 90%;
  height: 240px;
  margin: 0 auto;
  perspective: 1000px;
  cursor: pointer;
}

.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a0000, #5c0904);
  color: white;
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
  padding: 20px;
}

.flashcard-back {
  transform: rotateY(180deg);
}

.flashcard .han {
  font-size: 3rem;
  font-weight: 900;
}

.flashcard .pin {
  font-size: 1.4rem;
  color: #f6dede;
  margin-top: 10px;
}

.flashcard .eng {
  font-size: 2.2rem;
  font-weight: 700;
}
.flashcard-controls button {
  margin: 6px;
}

/* ===== BIGGER CLEANER FLASHCARDS ===== */

.flashcard-container {
  text-align: center;
  margin: 45px auto;
}

.flashcard-scene {
  width: 620px;
  max-width: 92%;
  height: 360px;
  margin: 0 auto;
  perspective: 1400px;
  cursor: pointer;
}

.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), transparent 35%),
    linear-gradient(145deg, #250000, #5c0904);
  color: white;
  box-shadow: 0 24px 55px rgba(0,0,0,0.42);
  padding: 36px;
}

.flashcard-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.14), transparent 35%),
    linear-gradient(145deg, #3a0500, #7a1208);
}

.flashcard .han {
  font-size: 5rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.flashcard .pin {
  font-size: 1.8rem;
  color: #f6dede;
  margin-top: 18px;
  font-weight: 700;
}

.flashcard .eng {
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1.2;
}

.flashcard-controls {
  margin-top: 26px;
}

.flashcard-controls button {
  margin: 8px;
  padding: 14px 22px;
  border-radius: 14px;
  border: none;
  background: #b31b12;
  color: white;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.flashcard-controls button:hover {
  background: #d43b2a;
  transform: translateY(-2px);
}

.flash-progress {
  margin-top: 18px;
  color: #f6dede;
  font-weight: 700;
}

@media (max-width: 700px) {
  .flashcard-scene {
    height: 300px;
  }

  .flashcard .han {
    font-size: 3.8rem;
  }

  .flashcard .eng {
    font-size: 2.5rem;
  }
}
.flashcard-slide-left {
  animation: slideLeft 0.28s ease;
}

.flashcard-slide-right {
  animation: slideRight 0.28s ease;
}

@keyframes slideLeft {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  45% {
    transform: translateX(-45px) scale(0.96);
    opacity: 0.3;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  45% {
    transform: translateX(45px) scale(0.96);
    opacity: 0.3;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
.flashcard-slide-left {
  animation: slideLeft 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.flashcard-slide-right {
  animation: slideRight 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideLeft {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-90px) scale(0.94);
    opacity: 0.15;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(90px) scale(0.94);
    opacity: 0.15;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
.flashcard-slide-left {
  animation: slideLeft 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.flashcard-slide-right {
  animation: slideRight 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideLeft {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0px);
  }
  50% {
    transform: translateX(-80px) scale(0.96);
    opacity: 0.7; /* 🔥 key fix (no white flash) */
    filter: blur(2px); /* smoother than fade */
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes slideRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0px);
  }
  50% {
    transform: translateX(80px) scale(0.96);
    opacity: 0.7;
    filter: blur(2px);
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: blur(0px);
  }
}
.flashcard-slide-left {
  animation: slideLeft 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.flashcard-slide-right {
  animation: slideRight 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes slideLeft {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-80px) scale(0.97);
    opacity: 0.85;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideRight {
  0% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(80px) scale(0.97);
    opacity: 0.85;
  }
  100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}
.han, .eng {
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
  max-width: 100%;
}
.learn-section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  margin-top: 35px;
}

.learn-section-card {
  min-height: 170px;
  display: block;
  padding: 30px;
  border: 2px solid #b00020;
  border-radius: 24px;
  background: white;
  color: black;
  text-decoration: none;
  box-shadow: 0 15px 35px rgba(176, 0, 32, 0.12);
}

.learn-section-card h3 {
  color: #b00020;
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.learn-section-card p {
  color: black;
  font-size: 1.15rem;
}

.learn-test-card {
  min-height: 220px;
  display: block;
  padding: 36px;
  border-radius: 24px;
  background: #b00020;
  color: white;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 15px 35px rgba(176, 0, 32, 0.25);
}

.learn-test-card h3 {
  color: white;
  font-size: 2.3rem;
  margin-bottom: 16px;
}

.learn-test-card p {
  color: white;
  font-size: 1.1rem;
}

.learn-test-card span {
  display: inline-block;
  margin-top: 25px;
  background: white;
  color: #b00020;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: bold;
}

@media (max-width: 850px) {
  .learn-section-grid {
    grid-template-columns: 1fr;
  }
}
.learn-section-card {
  min-height: 170px;
  display: block;
  padding: 30px;
  border: 2px solid #b00020;
  border-radius: 24px;
  background: white;
  color: black;
  text-decoration: none;

  transition: all 0.25s ease;
}

.learn-section-card h3 {
  color: #b00020;
  transition: color 0.25s ease;
}

.learn-section-card p {
  color: black;
  transition: color 0.25s ease;
}.learn-section-card {
  min-height: 170px;
  display: block;
  padding: 30px;
  border: 2px solid #b00020;
  border-radius: 24px;
  background: white;
  color: black;
  text-decoration: none;

  transition: all 0.25s ease;
}

.learn-section-card h3 {
  color: #b00020;
  transition: color 0.25s ease;
}

.learn-section-card p {
  color: black;
  transition: color 0.25s ease;
}
.learn-section-card:hover {
  transform: translateY(-6px);
  background: #b00020;
  box-shadow:
    0 18px 40px rgba(176, 0, 32, 0.25),
    0 0 25px rgba(176, 0, 32, 0.35);
}

.learn-section-card:hover h3,
.learn-section-card:hover p {
  color: white;
}
.learn-section-card:hover {
  border-color: transparent;
}

.ssquared-button {
    display: inline-block;
    padding: 12px 22px;
    background: #111;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    transition: 0.2s ease;
}

.ssquared-button:hover {
    background: #333;
}
.ssquared-home-button {
    position: absolute;
    top: 20px;
    left: 20px;

    background: #c40000;
    color: white;

    padding: 12px 20px;
    border-radius: 10px;

    text-decoration: none;
    font-weight: bold;

    transition: 0.2s ease;
    z-index: 1000;
}

.ssquared-home-button:hover {
    background: #990000;
}
