/* ========== Grade/Standards Badges ========== */
:root{
  --badge-bg: linear-gradient(135deg,#b522c5 0%, #5f2551 100%);
  --badge-text: #0b2b16;
  --chip-bg: #f1f5f9;
  --chip-text: #0f172a;
  --chip-border: #e2e8f0;
  --badge-ring: rgba(34,197,94,.25);
  --shadow-soft: 0 6px 16px rgba(0,0,0,.06);
}
.skills-label {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .3rem;
  color: #6b7280;
  text-align:center;
}

.chip-purple { background:#ede9fe; color:#5b21b6; }
.chip-blue   { background:#e0f2fe; color:#075985; }
.chip-yellow { background:#fef9c3; color:#854d0e; }
.chip-pink   { background:#fce7f3; color:#9d174d; }

@media (prefers-color-scheme: dark){
  :root{
    --chip-bg: #0f172a;
    --chip-text: #e2e8f0;
    --chip-border: #1f2937;
    --badge-text: #052e1a;
  }
}

.badge-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin: .25rem 0 1rem;
  flex-wrap: wrap;
}

.grade-badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.45rem .8rem;
  font-weight:700;
  font-size:.95rem;
  letter-spacing:.2px;
  color:var(--badge-text);
  background:var(--badge-bg);
  border-radius:999px;
  box-shadow: var(--shadow-soft), 0 0 0 4px var(--badge-ring);
  border:1px solid rgba(0,0,0,.06);
  transform: translateZ(0); /* crisp edges */
}

.grade-badge .badge-emoji{
  font-size:1.05rem;
  line-height:1;
}

.meta-chips{
  display:flex;
  align-items:center;
  gap:.4rem;
  flex-wrap: wrap;
}

.chip{
  display:inline-flex;
  align-items:center;
  padding:.3rem .6rem;
  font-size:.85rem;
  font-weight:600;
  background:var(--chip-bg);
  color:var(--chip-text);
  border:1px solid var(--chip-border);
  border-radius:999px;
}

@media (max-width: 640px){
  .badge-row{ gap:10px; }
  .grade-badge{ font-size:.9rem; padding:.4rem .7rem; }
  .chip{ font-size:.8rem; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: no-preference){
  .grade-badge{
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .grade-badge:hover{
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,0,0,.08), 0 0 0 6px var(--badge-ring);
  }
}


#ibook_app{
    border: #333 solid 1px;
}

img{
    width: 60%;
}


.home_screen{
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
    padding: 30px 0px;
}

#bookCover{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px 0px;
}

.main-title{
    font-size: 4rem !important;
}

.subtitle{
    color: #ff7105;

}

.subtitle span{
    font-style: italic;
    font-weight: 300;
    color: #333;

}

#bookCover img{
    width: 60%;
}

#bookCover button{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgb(0, 34, 255);
    color: white;
    font-size: 2.5rem;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    margin-top: 10px;
    cursor: pointer;
}

#bookCover button:hover{
    background-color: rgb(3, 25, 169);
}

#bookScreen{
}

.book{
    color: #333;
    padding: 50px 0;
    width: 95%;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto;
}

.left-page{
    font-size: 2.8rem;
    text-align: center;
}

.story-image{
    margin-top: 10px;
}

.right-page{
    text-align: center;
}

.question-text{
    font-weight: 700;
    font-size: 2.5rem;
}

.choices-container{
    font-size: 2rem;
    display: flex;
    flex-direction: column;
}

.choices-container button{
    font-size: 2rem;
    padding: 10px 10px;
    margin-bottom: 20px;
    cursor: pointer;
    background-color: #0059ff;
    color: azure;
    border: 1px solid #333;
}

.choices-container button:hover{
    background-color: #02379a;
}


/* End Screen */
#endScreen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, #8254EA 0%, #E86DEC 100%);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
  }
  
  #endScreen h1 {
    font-size: 3.5rem;
    color: rgb(255, 255, 255);
    font-weight: 900;
  }
  
  #endScreen h2 {
    font-size: 2rem;
    color: #ffd900;
    font-weight: 700;
  }
  
  .end-gif {
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    margin: 20px 0;
  }

  .start-button{
    background-color: rgb(233, 36, 161) !important;
  }
  
 .restart-button{
background-color: #009df7;
color: white;
padding: 10px 10px;
font-weight: 700;
font-size: 2rem;
 }

  /* Explore Resources Button */
  .explore-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.5rem;
    background: #ba0089; 
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.3s;
  }
  
  .explore-button:hover {
    background:  #820460; 
    transform: translateY(-2px);
  }

  .enjoyed_a_sample_text{
    color: white;
    font-size: 3rem !important;
    font-weight: 500;
    margin-bottom: 15px;
  }

  .freemium-option-card_subscribe{
    margin: auto;
  }

  /* ===== Shell & Hero ===== */
.page, #ibook_app { max-width: 1080px; margin: 0 auto; }
#bookCover { width: 100%; }

.hero-meta{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.6rem;
  margin: .25rem 0 1.25rem;
}

/* Title tweaks for balance under big H1 */
.main-title{
  font-size: clamp(2.2rem, 4.5vw, 3.5rem) !important;
  line-height: 1.1;
  text-align:center;
  margin: .25rem 0 .6rem;
}

/* Grade badge */
.grade-badge{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.5rem .9rem;
  font-weight:800;
  font-size:.95rem;
  letter-spacing:.2px;
  color:#052e1a;
  background: rgb(255, 185, 236);
  border-radius:999px;
  box-shadow: 0 6px 16px rgba(0,0,0,.06), 0 0 0 4px rgba(34,197,94,.18);
  border:1px solid rgba(0,0,0,.06);
}

/* Label + chips */
.skills-label{
  font-size:.75rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.6px;
  color:#9ca3af;
  margin-top:.2rem;
}

.meta-chips{
  display:flex;
  align-items:center;
  gap:.4rem;
  flex-wrap:wrap;
  justify-content:center;
}

.chip{
  display:inline-flex;
  align-items:center;
  padding:.28rem .6rem;
  font-size:.82rem;
  font-weight:700;
  border-radius:999px;
  border:none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.chip-purple { background:#ede9fe; color:#4c1d95; }
.chip-blue   { background:#e0f2fe; color:#075985; }
.chip-yellow { background:#fef9c3; color:#854d0e; }
.chip-pink   { background:#ffe4e6; color:#9f1239; }

/* Cover card */
.cover-card{
  margin: 1rem 0 1.25rem;
  width: min(920px, 92vw);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
  background: #fff;
}
.cover-card .cover_img{
  width:100%;
  display:block;
}

/* CTA button refinement */
.cta{
  margin-top:.2rem;
  padding: .9rem 1.25rem !important;
  font-size: 1.25rem !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg,#2563eb, #1d4ed8) !important;
  border: none !important;
  box-shadow: 0 10px 22px rgba(29,78,216,.25);
}
.cta:hover{ transform: translateY(-1px); background: linear-gradient(135deg,#1d4ed8,#1e40af) !important; }
.cta:focus-visible{ outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Dark mode polish */
@media (prefers-color-scheme: dark){
  .skills-label{ color:#a3a3a3; }
  .cover-card{ background:#0b1220; box-shadow: 0 10px 28px rgba(0,0,0,.45); }
  .chip{ box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
}

/* Motion respect */
@media (prefers-reduced-motion: reduce){
  .cta{ transition:none !important; }
}

/* Keep your existing responsive rules; minor tune-ups */
@media (max-width: 768px){
  .grade-badge{ font-size:.9rem; padding:.45rem .8rem; }
  .chip{ font-size:.78rem; }
}


  /* Media Queries */
@media (max-width: 1024px) {
    .main-title {
      font-size: 4rem;
    }
  
    #bookCover img {
      width: 70%;
    }
  
    .choices-container button {
      font-size: 1.8rem;
      padding: 10px 15px;
    }
  
    .question-text {
      font-size: 2.2rem;
    }
  }
  
  @media (max-width: 768px) {
    .main-title {
      font-size: 3.5rem;
    }
  
    #bookCover img {
      width: 80%;
    }
  
    .left-page {
      font-size: 2.4rem;
    }
  
    .choices-container button {
      font-size: 1.6rem;
      padding: 8px 12px;
    }
  
    .question-text {
      font-size: 2rem;
    }
  
    #endScreen h1 {
      font-size: 3rem;
    }
  
    #endScreen h2 {
      font-size: 1.8rem;
    }
  }
  
  @media (max-width: 480px) {
    .main-title {
      font-size: 2.5rem;
      text-align: center;
    }
  
    .subtitle {
      font-size: 1.5rem;
    }
  
    #bookCover img {
      width: 90%;
    }
  
    #bookCover button {
      font-size: 2rem;
      padding: 8px 16px;
    }
  
    .left-page {
      font-size: 2rem;
    }
  
    .choices-container button {
      font-size: 1.4rem;
      padding: 6px 10px;
    }
  
    .question-text {
      font-size: 1.8rem;
    }
  
    #endScreen h1 {
      font-size: 2.5rem;
    }
  
    #endScreen h2 {
      font-size: 1.5rem;
    }
  }