/* System Design Challenge - Fully Scoped Styles */

/* ===========================================
   CHALLENGE PAGE RESET & ISOLATION
   All styles scoped under .challenge-page
   =========================================== */

/* Page-level overrides (need to be global for body/html) */
body:has(.challenge-page),
html:has(.challenge-page) {
  background: #1a1a2e !important;
}

/* Main container reset */
.challenge-page {
  /* Reset all inherited styles */
  all: initial;
  display: block;

  /* Base styles */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: white;
  background: #1a1a2e;
  min-height: 100vh;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reset all child elements */
.challenge-page *,
.challenge-page *::before,
.challenge-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Reset typography - Heading hierarchy */
.challenge-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
}

.challenge-page h2 {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
}

.challenge-page h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
}

.challenge-page h4,
.challenge-page h5,
.challenge-page h6 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: white;
}

.challenge-page p {
  margin: 0;
  line-height: 1.5;
}

.challenge-page a {
  color: #3498db;
  text-decoration: none;
}

.challenge-page a:hover {
  text-decoration: underline;
}

.challenge-page ul,
.challenge-page ol {
  list-style: none;
}

.challenge-page img {
  max-width: 100%;
  height: auto;
  display: block;
}

.challenge-page button {
  font-family: inherit;
  cursor: pointer;
}

.challenge-page input {
  font-family: inherit;
}

/* ===========================================
   GAME APP CONTAINER
   =========================================== */

.challenge-page .game-app {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 80px;
}

/* ===========================================
   INTRO SECTION
   =========================================== */

.challenge-page .game-intro {
  text-align: center;
  padding: 0.75rem 1rem 0.5rem;
}

.challenge-page .free-badge {
  display: inline-block;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.5px;
}

.challenge-page .game-intro h1 {
  margin: 0;
  /* Inherits 2rem from base h1 */
}

.challenge-page .game-intro p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}

.challenge-page .game-intro .intro-challenge {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3498db, #9b59b6, #e74c3c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 0.5rem;
}

.challenge-page .game-intro .intro-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
}

/* ===========================================
   GAME BODY
   =========================================== */

.challenge-page .game-body {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  gap: 0.75rem;
  overflow: hidden;
}

/* Requirement Display */
.challenge-page .requirement-display {
  text-align: center;
  padding: 0.75rem 1rem;
  background: rgba(52, 152, 219, 0.2);
  border: 1px solid rgba(52, 152, 219, 0.4);
  border-radius: 12px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.challenge-page .req-step {
  color: #3498db;
  font-weight: 700;
  font-size: 0.9rem;
}

.challenge-page .req-text {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.challenge-page .req-prompt {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

.challenge-page .instruction-hint {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin: 0.5rem 0 0 0;
  font-style: italic;
}

/* ===========================================
   PIPELINE (SLOTS)
   =========================================== */

.challenge-page .pipeline-area {
  display: flex;
  justify-content: center;
  align-items: center;
}

.challenge-page .pipeline {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.challenge-page .slot-wrapper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.challenge-page .slot {
  width: 52px;
  height: 52px;
  border: 2px dashed rgba(255,255,255,0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255,255,255,0.05);
}

.challenge-page .slot:hover {
  border-color: rgba(52, 152, 219, 0.6);
  background: rgba(52, 152, 219, 0.1);
}

.challenge-page .slot.selected {
  border-color: #3498db;
  border-style: solid;
  background: rgba(52, 152, 219, 0.2);
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.4);
}

.challenge-page .slot.filled {
  border: none;
  padding: 0;
  background: transparent;
}

.challenge-page .slot.correct {
  box-shadow: 0 0 12px rgba(39, 174, 96, 0.6);
}

.challenge-page .slot.incorrect {
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.6);
}

.challenge-page .slot-empty {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
}

.challenge-page .slot-block {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  gap: 0.15rem;
}

.challenge-page .slot-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.challenge-page .slot-name {
  font-size: 0.45rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
}

.challenge-page .arrow {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.3);
  font-weight: bold;
}

/* ===========================================
   BLOCK CARDS
   =========================================== */

.challenge-page .blocks-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0;
}

.challenge-page .blocks-scroll::-webkit-scrollbar {
  display: none;
}

.challenge-page .blocks-track {
  display: flex;
  gap: 0.75rem;
  padding: 0 0.5rem;
  min-width: min-content;
}

.challenge-page .block-card {
  flex: 0 0 140px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
  border: 2px solid transparent;
}

.challenge-page .block-card.selectable {
  cursor: pointer;
  border-color: rgba(39, 174, 96, 0.5);
}

.challenge-page .block-card.selectable:hover {
  transform: translateY(-2px);
  border-color: #27ae60;
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
}

.challenge-page .block-card.used {
  opacity: 0.4;
}

.challenge-page .card-top {
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: white;
}

.challenge-page .card-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.challenge-page .card-name {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
}

.challenge-page .card-body {
  padding: 0.5rem;
  background: rgba(0,0,0,0.2);
}

.challenge-page .card-desc {
  margin: 0;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
  text-align: center;
}

.challenge-page .card-used {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 20px;
  height: 20px;
  background: #27ae60;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
}

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

.challenge-page .game-actions {
  display: flex;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.challenge-page .btn-check {
  flex: 1;
  padding: 0.9rem;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.challenge-page .btn-check:hover:not(:disabled) {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-1px);
}

.challenge-page .btn-check:disabled {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.3);
  cursor: not-allowed;
}

.challenge-page .btn-reset {
  width: 50px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border: none;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.challenge-page .btn-reset:hover {
  background: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.challenge-page .btn-buy {
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.challenge-page .btn-buy:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-1px);
}

.challenge-page .btn-buy-bundle {
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.challenge-page .btn-buy-bundle:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.challenge-page .btn-cta-primary {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s ease;
  text-align: center;
  border: none;
  cursor: pointer;
}

.challenge-page .btn-cta-primary:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-2px);
  text-decoration: none;
}

.challenge-page .btn-price-primary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.challenge-page .btn-price-primary:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
}

.challenge-page .btn-next-challenge {
  width: 100%;
  max-width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.challenge-page .btn-next-challenge:hover {
  background: linear-gradient(135deg, #2980b9, #1a5276);
  transform: translateY(-2px);
}

/* ===========================================
   PRICING BAR (Mobile sticky)
   =========================================== */

.challenge-page .pricing-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0));
  background: linear-gradient(135deg, #0f0f1a, #1a1a2e);
  border-top: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
  z-index: 1000;
}

.challenge-page .pricing-bar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.challenge-page .guarantee-badge {
  display: inline-block;
  background: rgba(39, 174, 96, 0.2);
  border: 1px solid rgba(39, 174, 96, 0.5);
  color: #27ae60;
  font-size: 0.55rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.challenge-page .pricing-bar-options {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 400px;
}

.challenge-page .pricing-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
}

.challenge-page .pricing-option .price-label {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-align: center;
}

.challenge-page .pricing-option .early-bird-badge {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #000;
  font-size: 0.5rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Course 1 option - equally prominent */
.challenge-page .pricing-option.course1-option {
  flex: 1;
  min-width: 80px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.2));
  border: 1.5px solid rgba(52, 152, 219, 0.5);
}

.challenge-page .pricing-option.course1-option .btn-buy {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.challenge-page .pricing-option.course1-option .btn-buy:hover {
  background: linear-gradient(135deg, #2980b9, #1f6dad);
  color: white;
}

/* Bundle option - featured */
.challenge-page .pricing-option.bundle {
  flex: 1;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border: 1.5px solid rgba(102, 126, 234, 0.5);
  position: relative;
}

.challenge-page .pricing-option.bundle .btn-buy-bundle {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* ===========================================
   INSTRUCTOR SECTION
   =========================================== */

/* ===========================================
   VIDEO SECTION
   =========================================== */

.challenge-page .video-section {
  background: #1a1a2e;
  padding: 2rem 1rem;
}

.challenge-page .video-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.challenge-page .video-header h2 {
  margin: 0 0 0.5rem 0;
}

.challenge-page .video-header p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: 0;
}

.challenge-page .video-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto 2rem;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.challenge-page .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===========================================
   INSTRUCTOR SECTION
   =========================================== */

.challenge-page .instructor-section {
  background: #1a1a2e;
  padding: 2rem 1rem;
}

/* ===========================================
   INSTRUCTOR BOX
   =========================================== */

.challenge-page .instructor-box {
  max-width: 500px;
  margin: 0 auto 2rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.challenge-page .instructor-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.challenge-page .instructor-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.challenge-page .instructor-text h3 {
  margin: 0 0 0.25rem 0;
  /* Inherits 1.25rem from base h3 */
}

.challenge-page .instructor-text p {
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  margin: 0;
}

.challenge-page .instructor-bio {
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

.challenge-page .instructor-links {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
}

.challenge-page .instructor-links a {
  color: #3498db;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.challenge-page .instructor-links a:hover {
  color: #5dade2;
  text-decoration: underline;
}

/* ===========================================
   TESTIMONIALS
   =========================================== */

.challenge-page .testimonials-section {
  padding: 2rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: #1a1a2e;
}

.challenge-page .testimonials-section h2 {
  text-align: center;
  margin: 0 0 1.5rem 0;
  /* Inherits 1.6rem from base h2 */
}

.challenge-page .testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.challenge-page .testimonial {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid #3498db;
  padding: 1rem;
  border-radius: 8px;
}

.challenge-page .testimonial:nth-child(1) { border-left-color: #e74c3c; }
.challenge-page .testimonial:nth-child(2) { border-left-color: #1abc9c; }
.challenge-page .testimonial:nth-child(3) { border-left-color: #2980b9; }
.challenge-page .testimonial:nth-child(4) { border-left-color: #8e44ad; }
.challenge-page .testimonial:nth-child(5) { border-left-color: #f39c12; }
.challenge-page .testimonial:nth-child(6) { border-left-color: #27ae60; }
.challenge-page .testimonial:nth-child(7) { border-left-color: #3498db; }
.challenge-page .testimonial:nth-child(8) { border-left-color: #d35400; }
.challenge-page .testimonial:nth-child(9) { border-left-color: #16a085; }
.challenge-page .testimonial:nth-child(10) { border-left-color: #9b59b6; }
.challenge-page .testimonial:nth-child(11) { border-left-color: #e67e22; }
.challenge-page .testimonial:nth-child(12) { border-left-color: #34495e; }

.challenge-page .testimonial p {
  color: rgba(255,255,255,0.9);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.5rem 0;
}

.challenge-page .testimonial span {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

/* ===========================================
   VALUE PROPS
   =========================================== */

.challenge-page .value-props {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-radius: 16px;
  margin: 1rem;
}

.challenge-page .value-props h2 {
  text-align: center;
  margin: 0 0 1.5rem 0;
}

.challenge-page .props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.challenge-page .prop {
  background: rgba(255,255,255,0.1);
  padding: 1.25rem;
  border-radius: 10px;
  text-align: center;
}

.challenge-page .prop h3 {
  color: #3498db;
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
}

.challenge-page .prop p {
  color: white;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}

.challenge-page .prop p.sub {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ===========================================
   WHY SECTION
   =========================================== */

.challenge-page .why-section {
  padding: 2rem 1rem;
  background: #1a1a2e;
}

.challenge-page .why-section h2 {
  text-align: center;
  margin: 0 0 1.5rem 0;
}

.challenge-page .why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.challenge-page .why-item {
  background: rgba(255,255,255,0.05);
  padding: 1.25rem;
  border-radius: 10px;
}

.challenge-page .why-item h3 {
  margin: 0 0 0.5rem 0;
  /* Inherits 1.25rem from base h3 */
}

.challenge-page .why-item p {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

/* ===========================================
   PRICING SECTION
   =========================================== */

.challenge-page .pricing-section {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.15), rgba(34, 153, 84, 0.15));
  border-radius: 16px;
  margin: 1rem;
  text-align: center;
}

.challenge-page .pricing-section h2 {
  text-align: center;
  margin: 0 0 1.5rem 0;
}

.challenge-page .pricing-intro {
  color: rgba(255,255,255,0.8);
  margin: 0 0 1.5rem 0;
}

.challenge-page .pricing-cards {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.challenge-page .price-card {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 160px;
  position: relative;
}

.challenge-page .price-card.featured {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
  border: 2px solid #27ae60;
}

.challenge-page .price-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  background: #27ae60;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.challenge-page .price-label {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  margin: 0 0 0.25rem 0;
}

.challenge-page .price-amount {
  color: white;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
}

.challenge-page .price-strike {
  font-size: 0.9rem;
  text-decoration: line-through;
  opacity: 0.6;
}

.challenge-page .price-note {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  margin: 0.5rem 0 0 0;
}

.challenge-page .guarantee {
  color: #27ae60;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

/* ===========================================
   FAQ SECTION
   =========================================== */

.challenge-page .faq-section {
  padding: 2rem 1rem;
  background: #1a1a2e;
}

.challenge-page .faq-section h2 {
  text-align: center;
  margin: 0 0 1.5rem 0;
}

.challenge-page .faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.challenge-page .faq-item {
  background: rgba(255,255,255,0.05);
  padding: 1.25rem;
  border-radius: 10px;
}

.challenge-page .faq-item h3 {
  margin: 0 0 0.5rem 0;
  /* Inherits 1.25rem from base h3 */
}

.challenge-page .faq-item p {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

/* ===========================================
   FINAL CTA
   =========================================== */

.challenge-page .final-cta-wrapper {
  background: #1a1a2e;
  padding: 2rem 1rem;
}

.challenge-page .final-cta {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(155, 89, 182, 0.2));
  border-radius: 16px;
  max-width: 500px;
  margin: 0 auto;
}

.challenge-page .final-cta h3 {
  margin: 0 0 0.5rem 0;
  /* Inherits 1.25rem from base h3 */
}

.challenge-page .final-cta p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* ===========================================
   RESULTS MODAL
   =========================================== */

.challenge-page #result-area {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.7);
}

.challenge-page #result-area:empty {
  display: none;
}

/* Hide sticky pricing bar when modal is active */
.challenge-page:has(#result-area:not(:empty)) .pricing-bar {
  display: none !important;
}

.challenge-page .result-box {
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  background: #1a1a2e;
  border-radius: 20px;
  padding: 1.5rem;
  padding-bottom: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: popIn 0.3s ease;
  display: flex;
  flex-direction: column;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.challenge-page .score-display {
  text-align: center;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.challenge-page .score-display.great {
  background: linear-gradient(135deg, #27ae60, #229954);
}

.challenge-page .score-display.good {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.challenge-page .score-display.needs-work {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.challenge-page .score-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
}

.challenge-page .score-label {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Answer comparison - scrollable if needed */
.challenge-page .answer-comparison {
  margin-bottom: 0.75rem;
  max-height: 45vh;
  overflow-y: auto;
  flex-shrink: 1;
}

.challenge-page .answer-comparison h3 {
  margin: 0 0 0.75rem 0;
  text-align: center;
  font-size: 1.1rem;
}

.challenge-page .answer-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-page .answer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  border-left: 3px solid #bdc3c7;
}

.challenge-page .answer-row.correct {
  background: rgba(39, 174, 96, 0.15);
  border-left-color: #27ae60;
}

.challenge-page .answer-row.incorrect {
  background: rgba(231, 76, 60, 0.15);
  border-left-color: #e74c3c;
}

.challenge-page .answer-number {
  width: 22px;
  height: 22px;
  background: #3498db;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.challenge-page .answer-req {
  flex: 1;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.3;
}

.challenge-page .answer-row .answer-block {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: white;
  flex-shrink: 0;
}

.challenge-page .answer-row .answer-block .block-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.challenge-page .answer-row .answer-block .block-name {
  font-size: 0.6rem;
  font-weight: 600;
}

.challenge-page .answer-indicator {
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.challenge-page .answer-row.correct .answer-indicator {
  color: #27ae60;
}

.challenge-page .answer-row.incorrect .answer-indicator {
  color: #e74c3c;
}

.challenge-page .user-chose {
  font-size: 0.65rem;
  color: #e74c3c;
  font-style: italic;
}

/* Explanation */
.challenge-page .explanation-box {
  background: rgba(52, 152, 219, 0.15);
  border-left: 3px solid #3498db;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
}

/* Next actions - sticky at bottom of modal */
.challenge-page .next-actions {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0 1.5rem;
  background: #1a1a2e;
  position: sticky;
  bottom: 0;
  margin-top: auto;
}

.challenge-page .next-challenges {
  margin-bottom: 1.25rem;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.challenge-page .completion-badge {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.challenge-page .completion-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  margin: 0;
}

/* Email capture */
.challenge-page .email-capture-box {
  text-align: center;
  padding: 1.25rem;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
}

.challenge-page .email-capture-box h3 {
  margin: 0 0 0.5rem 0;
  /* Inherits 1.25rem from base h3 */
}

.challenge-page .email-capture-box p {
  color: rgba(255,255,255,0.7);
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
}

.challenge-page .email-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-page .email-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem;
}

.challenge-page .email-form input::placeholder {
  color: rgba(255,255,255,0.4);
}

.challenge-page .email-form input:focus {
  outline: none;
  border-color: #3498db;
}

.challenge-page .email-form input.error {
  border-color: #e74c3c;
}

.challenge-page .btn-submit-email {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.challenge-page .btn-skip {
  display: block;
  width: 100%;
  margin-top: 1rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.challenge-page .email-success {
  text-align: center;
  padding: 1rem;
}

.challenge-page .email-success .success-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #27ae60, #229954);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.challenge-page .email-success h3 {
  margin: 0 0 0.5rem;
  color: #27ae60;
}

.challenge-page .email-success p {
  margin: 0;
  color: rgba(255,255,255,0.7);
}

.challenge-page .unlocked-challenges {
  margin-top: 1rem;
}

/* ===========================================
   HINT OFFER BOX (Cheatsheet)
   =========================================== */

.challenge-page .hint-offer-box {
  text-align: center;
  padding: 1.25rem;
  background: rgba(243, 156, 18, 0.1);
  border: 2px solid rgba(243, 156, 18, 0.4);
  border-radius: 16px;
  margin-bottom: 0.75rem;
}

.challenge-page .hint-offer-box .hint-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.challenge-page .hint-offer-box h3 {
  margin: 0 0 0.5rem 0;
  color: #f39c12;
}

.challenge-page .hint-offer-box p {
  color: rgba(255,255,255,0.8);
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.challenge-page .hint-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.challenge-page .hint-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem;
}

.challenge-page .hint-form input::placeholder {
  color: rgba(255,255,255,0.4);
}

.challenge-page .hint-form input:focus {
  outline: none;
  border-color: #f39c12;
}

.challenge-page .hint-form input.error {
  border-color: #e74c3c;
}

.challenge-page .btn-hint-submit {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.challenge-page .btn-hint-submit:hover {
  background: linear-gradient(135deg, #e67e22, #d35400);
  transform: translateY(-1px);
}

.challenge-page .btn-hint-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.challenge-page .btn-hint-skip {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.challenge-page .btn-hint-skip:hover {
  color: rgba(255,255,255,0.7);
}

.challenge-page .hint-success {
  text-align: center;
  padding: 1rem;
}

.challenge-page .hint-success .success-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #27ae60, #229954);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.challenge-page .hint-success h3 {
  margin: 0 0 0.5rem;
  color: #27ae60;
}

.challenge-page .hint-success p {
  margin: 0 0 1rem 0;
  color: rgba(255,255,255,0.7);
}

.challenge-page .btn-cheatsheet-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.challenge-page .btn-cheatsheet-link:hover {
  background: linear-gradient(135deg, #e67e22, #d35400);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ===========================================
   PATTERN EXPLANATION (Inline breakdown)
   =========================================== */

.challenge-page .pattern-explanation {
  background: rgba(52, 152, 219, 0.1);
  border: 2px solid rgba(52, 152, 219, 0.3);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}

.challenge-page .pattern-explanation strong {
  color: #3498db;
}

/* ===========================================
   CHEATSHEET BOX (After all challenges)
   =========================================== */

.challenge-page .cheatsheet-box {
  text-align: center;
  padding: 1.25rem;
  background: rgba(39, 174, 96, 0.1);
  border: 2px solid rgba(39, 174, 96, 0.4);
  border-radius: 16px;
  margin: 1rem 0;
}

.challenge-page .cheatsheet-box h3 {
  margin: 0 0 0.5rem 0;
  color: #27ae60;
  font-size: 1.2rem;
}

.challenge-page .cheatsheet-box p {
  color: rgba(255,255,255,0.8);
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===========================================
   INLINE CTAs (Desktop only)
   =========================================== */

.challenge-page .inline-cta {
  display: flex;
}

.challenge-page .inline-cta h3 {
  font-size: 1.4rem;
  color: white;
  margin: 0;
}

.challenge-page .inline-cta p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.7);
}

/* ===========================================
   RESPONSIVE - TABLET
   =========================================== */

@media (min-width: 768px) {
  .challenge-page .game-body {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
  }

  .challenge-page .slot {
    width: 70px;
    height: 70px;
  }

  .challenge-page .slot-icon {
    width: 36px;
    height: 36px;
  }

  .challenge-page .slot-name {
    font-size: 0.55rem;
  }

  .challenge-page .block-card {
    flex: 0 0 160px;
  }

  .challenge-page .card-icon {
    width: 44px;
    height: 44px;
  }

  .challenge-page .card-desc {
    font-size: 0.7rem;
  }
}

/* ===========================================
   RESPONSIVE - DESKTOP
   =========================================== */

@media (min-width: 1024px) {
  .challenge-page .game-app {
    padding-bottom: 0;
  }

  .challenge-page .game-body {
    max-width: 1200px;
    padding: 2rem 3rem;
  }

  .challenge-page .slot {
    width: 80px;
    height: 80px;
  }

  .challenge-page .slot-icon {
    width: 42px;
    height: 42px;
  }

  .challenge-page .slot-name {
    font-size: 0.6rem;
  }

  .challenge-page .block-card {
    flex: 0 0 180px;
  }

  .challenge-page .card-icon {
    width: 52px;
    height: 52px;
  }

  .challenge-page .card-name {
    font-size: 0.75rem;
  }

  .challenge-page .card-desc {
    font-size: 0.75rem;
  }

  .challenge-page .video-section {
    padding: 3rem 2rem;
  }

  .challenge-page .video-wrapper {
    max-width: 1000px;
  }

  .challenge-page .instructor-section {
    padding: 3rem 2rem;
  }

  .challenge-page .instructor-box {
    max-width: 800px;
  }

  .challenge-page .final-cta {
    max-width: 800px;
  }

  /* Hide sticky pricing bar on desktop */
  .challenge-page .pricing-bar {
    display: none;
  }

  /* Wider results modal on desktop */
  .challenge-page .result-box {
    max-width: 700px;
  }

  /* Larger headings on desktop (maintain hierarchy: h1 > h2 > h3) */
  .challenge-page h1 {
    font-size: 2.5rem;
  }

  .challenge-page h2 {
    font-size: 2rem;
  }

  .challenge-page h3 {
    font-size: 1.5rem;
  }

  /* Inline CTA headers prominent but < h2 */
  .challenge-page .inline-cta h3 {
    font-size: 1.8rem;
  }

  /* Larger intro challenge on desktop */
  .challenge-page .game-intro .intro-challenge {
    font-size: 2rem;
  }
}

/* Hide inline CTAs on mobile */
@media (max-width: 1023px) {
  .challenge-page .inline-cta {
    display: none !important;
  }
}

/* ===========================================
   RESPONSIVE - SMALL SCREENS
   =========================================== */

@media (max-width: 360px) {
  .challenge-page .slot {
    width: 46px;
    height: 46px;
  }

  .challenge-page .slot-icon {
    width: 22px;
    height: 22px;
  }

  .challenge-page .slot-name {
    display: none;
  }

  .challenge-page .arrow {
    font-size: 0.75rem;
  }

  .challenge-page .block-card {
    flex: 0 0 120px;
  }

  .challenge-page .card-icon {
    width: 28px;
    height: 28px;
  }

  .challenge-page .card-name {
    font-size: 0.55rem;
  }

  .challenge-page .card-desc {
    font-size: 0.6rem;
  }

  .challenge-page .btn-check {
    font-size: 0.9rem;
  }

  .challenge-page .pricing-bar {
    gap: 0.35rem;
    padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom, 0));
  }

  .challenge-page .pricing-bar-options {
    gap: 0.4rem;
  }

  .challenge-page .pricing-option {
    gap: 0.2rem;
    padding: 0.35rem 0.4rem;
  }

  .challenge-page .pricing-option.course1-option {
    min-width: 75px;
  }

  .challenge-page .pricing-option.course1-option .btn-buy {
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
  }

  .challenge-page .pricing-option.bundle .btn-buy-bundle {
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
  }

  .challenge-page .pricing-option .price-label {
    font-size: 0.5rem;
  }

  .challenge-page .pricing-option .early-bird-badge {
    font-size: 0.45rem;
    padding: 0.1rem 0.3rem;
  }

  .challenge-page .guarantee-badge {
    font-size: 0.5rem;
    padding: 0.15rem 0.4rem;
  }

  .challenge-page .guarantee-badge {
    font-size: 0.5rem;
    padding: 0.2rem 0.5rem;
  }
}
