* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

:root {
  --bg: #181818;
  --text-dark: #ffffff;
  --text-soft: #a0a0ab;

  /* Precise Prototype Colors from Profile */
  --color-mcq: #4b4eff;
  --color-enum: #fd3ff0;
  --color-iden: #d77e30;
  --gradient-auto-quiz: linear-gradient(90deg, #46a6ff 0%, #c45eff 100%);
  --gradient-auto-rev: linear-gradient(90deg, #4970fb 0%, #ed48db 100%);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f5f8;
  --text-dark: #111215;
  --text-soft: #5e606a;
  color-scheme: light;
}

[data-theme="light"] html,
[data-theme="light"] body {
  background-color: var(--bg);
  color-scheme: light;
}

[data-theme="light"] .back-icon {
  fill: #5e606a;
}

[data-theme="light"] .back-icon:hover {
  fill: #111215;
}

@font-face {
  font-family: "Poppins";
  src: url("../LAMBU-Fonts/Poppins-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../LAMBU-Fonts/Poppins-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../LAMBU-Fonts/Poppins-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../LAMBU-Fonts/Poppins-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color-scheme: dark;
}

body {
  padding: 0;
  margin: 0;
  background-color: var(--bg);
  color: var(--text-dark);
  color-scheme: dark;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.back-btn-wrapper {
  background-color: var(--bg);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin: 0;
  padding: 14px 14px 8px;
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 440px;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
}

.back-icon {
  display: block;
  fill: #ffffff;
  cursor: pointer;
  transition: transform 0.1s ease-in;
}

.back-icon:active {
  transform: scale(0.9);
}

.main-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  align-items: center;
  justify-content: center;
  margin-block: auto;
  padding: clamp(6px, 1.5vh, 12px) 14px clamp(20px, 2.5vh, 28px);
  gap: 14px;
}

h4 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  color: var(--text-dark, #ffffff);
  width: 100%;
  text-align: center;
}

/* Boxes / Cards Container (Exact Profile Style) */
.boxes-wrapper,
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.quiz-card,
.box {
  width: 100%;
  height: 114px;
  min-height: 114px;
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.16s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
  border: none;
}

.quiz-card:hover,
.box:hover {
  transform: translateY(-2px);
}

.quiz-card:active,
.box:active {
  transform: scale(0.985);
}

.card-label,
.box h2,
.box h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
}

.card-desc,
.box p {
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.35;
  margin-top: 5px;
}

/* Individual Card Colors (Pure Clean Typography & Surfaces - No Neon / Glows / Borders) */
.card-mcq,
.box.MCQ {
  background-color: var(--color-mcq);
}

.card-enumeration,
.box.ENUM {
  background-color: var(--color-enum);
}

.card-identification,
.box.IDEN {
  background-color: var(--color-iden);
}

.card-auto-quiz,
.box.AUTO-QUIZ {
  background: var(--gradient-auto-quiz);
}

.card-auto-reviewer,
.box.AUTO-REV {
  background: var(--gradient-auto-rev);
}

/* ============================================================
   RESPONSIVE LAYOUT (TABLET, LAPTOP & DESKTOP)
   Prevents single-column vertical stacking on wide viewports
   ============================================================ */

/* 1. Medium / Tablet Devices (640px - 959px) */
@media (min-width: 640px) {
  .back-btn-wrapper {
    max-width: 860px;
    padding: 20px 24px 8px;
  }

  .main-container {
    max-width: 860px;
    padding: 16px 24px 24px;
    gap: 18px;
  }

  h4 {
    font-size: 1.65rem;
    margin-bottom: 6px;
  }

  .boxes-wrapper,
  .cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Center 5th card neatly in the 2-column grid */
  .card-auto-reviewer,
  .box.AUTO-REV {
    grid-column: 1 / -1;
    max-width: 480px;
    width: 100%;
    justify-self: center;
  }
}

/* 2. Laptop & Desktop Devices (>= 960px) */
@media (min-width: 960px) {
  .back-btn-wrapper {
    max-width: 1060px;
    padding: 24px 28px 8px;
  }

  .main-container {
    max-width: 1060px;
    padding: 16px 28px 24px;
    gap: 20px;
  }

  h4 {
    font-size: 1.9rem;
    margin-bottom: 10px;
  }

  /* 6-Column Balanced Grid: 3 cards on Row 1, 2 cards centered on Row 2 */
  .boxes-wrapper,
  .cards-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }

  /* Row 1: The 3 Quiz Builder Modes (Span 2 of 6 = 1/3 each) */
  .card-mcq,
  .box.MCQ {
    grid-column: 1 / span 2;
  }

  .card-enumeration,
  .box.ENUM {
    grid-column: 3 / span 2;
  }

  .card-identification,
  .box.IDEN {
    grid-column: 5 / span 2;
  }

  /* Row 2: The 2 AI Automation Tools (Span 2 of 6 each, centered in columns 2 to 5) */
  .card-auto-quiz,
  .box.AUTO-QUIZ {
    grid-column: 2 / span 2;
  }

  .card-auto-reviewer,
  .box.AUTO-REV {
    grid-column: 4 / span 2;
    max-width: none;
    justify-self: auto;
  }

  .quiz-card,
  .box {
    height: 126px;
    min-height: 126px;
    padding: 22px 26px;
    border-radius: 22px;
  }

  .card-label,
  .box h2,
  .box h3 {
    font-size: 1.75rem;
  }

  .card-desc,
  .box p {
    font-size: 1rem;
  }
}