/* EduPlay Sains — fun facts + engagement polish */

.sf-fact-card {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #e0f7fa 55%, #fff8e1 100%);
  border: 2px solid rgba(46, 125, 80, 0.18);
  text-align: left;
  font-family: "Nunito", "Comic Neue", system-ui, sans-serif;
  box-shadow: 0 6px 18px rgba(27, 67, 50, 0.08);
  animation: ep-pop 0.4s ease;
}
.sf-fact-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1b5e20;
  background: rgba(255, 255, 255, 0.85);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.sf-fact-card__text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1b4332;
  line-height: 1.4;
}
.sf-fact-card__exp {
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #455a64;
  line-height: 1.35;
}
.sf-fact-card--ok {
  border-color: rgba(76, 175, 80, 0.45);
}
.sf-fact-card--bad {
  border-color: rgba(231, 111, 81, 0.4);
  background: linear-gradient(135deg, #ffebee 0%, #fff8e1 100%);
}

.sf-streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  color: #e65100;
  min-height: 1.3em;
  font-size: 0.95rem;
}
.sf-streak.is-hot {
  animation: ep-wiggle 0.5s ease-in-out infinite;
}

.sf-hub-fact {
  max-width: var(--ep-max, 1100px);
  margin: 0 auto 20px;
  padding: 0 20px;
}
.sf-hub-fact .sf-fact-card {
  text-align: center;
}
.sf-hub-fact .sf-fact-card__text {
  font-size: 1.05rem;
}

.sf-bonus {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffecb3;
  color: #e65100;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Planet / topic chips */
.sf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 8px 0;
}
.sf-chip {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(42, 157, 143, 0.12);
  color: #0d5c56;
}

/* Keep quiz explain boxes lively */
.sf-explain-boost {
  border-radius: 14px !important;
  padding: 12px !important;
  animation: ep-slide-up 0.35s ease;
}

/* ── Process story + image cards ── */
.sf-story {
  margin: 10px 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(42, 157, 143, 0.2);
  box-shadow: 0 8px 22px rgba(27, 67, 50, 0.1);
  text-align: left;
  font-family: "Nunito", "Comic Neue", system-ui, sans-serif;
  animation: ep-pop 0.4s ease;
}
.sf-story__img-wrap {
  position: relative;
  width: 100%;
  max-height: 200px;
  background: linear-gradient(145deg, #e8f5e9, #e0f7fa);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.sf-story__img-wrap img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #f4faf6;
}
.sf-story__emoji {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
}
.sf-story__body {
  padding: 12px 14px 14px;
}
.sf-story__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0d5c56;
  margin: 0 0 6px;
}
.sf-story__story {
  font-size: 0.92rem;
  font-weight: 600;
  color: #37474f;
  line-height: 1.45;
  margin: 0 0 10px;
}
.sf-story__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sf-story__steps li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1b4332;
  background: #f1f8f4;
  border-radius: 10px;
  padding: 8px 10px;
}
.sf-story__steps .n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2a9d8f;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sf-story__fact {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #fff8e1, #e8f5e9);
  font-size: 0.85rem;
  font-weight: 700;
  color: #5d4037;
  line-height: 1.35;
}
.sf-q-img {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  background: #e8f5e9;
}
.sf-q-img img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #f7fbf8;
}
.sf-learn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
  text-align: left;
}
@media (min-width: 520px) {
  .sf-learn-grid { grid-template-columns: 1fr 1fr; }
}
.sf-learn-card {
  border-radius: 16px;
  border: 2px solid rgba(42, 157, 143, 0.18);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.sf-learn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(27, 67, 50, 0.12);
}
.sf-learn-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: #e8f5e9;
}
.sf-learn-card__t {
  padding: 8px 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0d5c56;
}
.sf-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(8, 28, 21, 0.55);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: ep-pop 0.25s ease;
}
.sf-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.sf-modal .sf-story { border: none; box-shadow: none; margin: 0; }
.sf-modal__close {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px 14px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: #2a9d8f;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
