:root {
  --pink-50: #fdf3f8;
  --pink-100: #fbe3ee;
  --pink-200: #f7c9dc;
  --pink-400: #e89bbd;
  --pink-600: #c2648f;
  --sky-100: #e3f2fa;
  --sky-300: #aed9ec;
  --sky-600: #4a90b8;
  --white: #ffffff;
  --ink: #5a4353;
  --green: #2e8b57;
  --green-bg: #e3f5ec;
  --red: #c0392b;
  --red-bg: #fdeaea;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(194, 100, 143, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(180deg, var(--pink-50) 0%, var(--sky-100) 100%);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.9;
  position: relative;
  overflow-x: hidden;
}

h1,
h2 {
  font-family: 'Amiri', 'Tajawal', serif;
  font-weight: 700;
  color: var(--pink-600);
}

.hero {
  text-align: center;
  padding: 2.2rem 1rem 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
  border: 1px solid var(--pink-100);
}

.small-card {
  text-align: center;
}

.welcome-card {
  text-align: center;
}

.welcome-title {
  font-family: 'Amiri', 'Tajawal', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--pink-600);
  margin-bottom: 1rem;
}

.students-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: .9rem;
}

.students-list span {
  background: var(--pink-50);
  border: 1px solid var(--pink-200);
  border-radius: 999px;
  padding: .45rem .9rem;
  color: var(--ink);
  font-weight: 700;
}

.teacher-line {
  color: var(--sky-600);
  font-weight: 800;
  margin-bottom: 1rem;
}

.welcome-message {
  color: var(--ink);
  margin-bottom: .8rem;
  font-size: 1.03rem;
}

.welcome-message.strong {
  color: var(--pink-600);
  font-weight: 800;
}

.video-caption {
  margin-top: 1rem;
  margin-bottom: .5rem;
  font-weight: 800;
  color: var(--sky-600);
}

.video-box {
  margin-top: .2rem;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid var(--pink-100);
  box-shadow: var(--shadow);
}

.video-box video {
  display: block;
  width: 100%;
  max-height: 420px;
  background: #000;
}

.subtitle {
  color: var(--sky-600);
  font-weight: 700;
  font-size: 1.15rem;
}

.intro {
  margin: .4rem 0 1.2rem;
  color: var(--ink);
}

.btn {
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: .8rem 1.8rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 48px;
}

.btn:focus-visible,
input:focus-visible {
  outline: 3px solid var(--sky-300);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
}

.btn.primary {
  background: var(--pink-400);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 155, 189, .4);
}

.btn.primary:active {
  background: #d77ca1;
}

.btn.secondary {
  background: var(--sky-100);
  color: var(--sky-600);
  border: 1px solid var(--sky-300);
}

.btn.danger {
  background: #f8d7da;
  color: var(--red);
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.q-counter {
  color: var(--sky-600);
  font-weight: 700;
}

.q-text {
  font-size: 1.2rem;
  font-weight: 700;
  margin: .8rem 0 1rem;
}

.options {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.option {
  text-align: right;
  background: var(--pink-50);
  border: 2px solid var(--pink-200);
  border-radius: 14px;
  padding: .8rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  min-height: 48px;
}

.option:hover:not(:disabled) {
  background: var(--sky-100);
  border-color: var(--sky-300);
}

.option:focus-visible {
  outline: 3px solid var(--sky-300);
}

.option:disabled {
  cursor: not-allowed;
}

.option.correct {
  background: var(--green-bg);
  border-color: var(--green);
}

.option.wrong {
  background: var(--red-bg);
  border-color: var(--red);
}

.feedback {
  margin: 1rem 0;
  font-weight: 700;
  border-radius: 12px;
  padding: .7rem 1rem;
}

.feedback.correct {
  background: var(--green-bg);
  color: var(--green);
}

.feedback.wrong {
  background: var(--red-bg);
  color: var(--red);
}

.score-line {
  font-size: 1.3rem;
  font-weight: 800;
  margin: .8rem 0 1.2rem;
}

.tracker-title {
  font-size: 1.5rem;
}

.tracker-sub {
  color: var(--sky-600);
  font-weight: 700;
}

.day-tabs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .4rem 0 1rem;
}

.day-tab {
  flex: 0 0 auto;
  border: 2px solid var(--pink-200);
  background: var(--white);
  border-radius: 14px;
  padding: .5rem .9rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  min-height: 48px;
}

.day-tab small {
  display: block;
  font-weight: 500;
  color: var(--sky-600);
  font-size: .75rem;
}

.day-tab[aria-selected="true"] {
  background: var(--pink-100);
  border-color: var(--pink-400);
}

.day-tab.locked {
  opacity: .55;
  cursor: not-allowed;
}

.challenge {
  border: 1.5px dashed var(--sky-300);
  border-radius: 16px;
  padding: 1.1rem;
  margin-bottom: 1.1rem;
  background: var(--pink-50);
}

.challenge h3 {
  color: var(--pink-600);
  margin-bottom: .2rem;
}

.challenge .desc {
  color: var(--sky-600);
  font-weight: 700;
  margin-bottom: .8rem;
}

.item {
  background: var(--white);
  border-radius: 12px;
  padding: .8rem 1rem;
  margin-bottom: .7rem;
}

.item-title {
  font-weight: 800;
}

.item-text {
  font-size: .95rem;
  margin-bottom: .6rem;
}

.eval-btns {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.eval-btn {
  flex: 1 1 140px;
  border: 2px solid var(--pink-200);
  background: var(--white);
  border-radius: 999px;
  padding: .55rem 1rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  color: var(--ink);
}

.eval-btn:focus-visible {
  outline: 3px solid var(--sky-300);
}

.eval-btn.sel-done {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}

.eval-btn.sel-not {
  background: var(--red-bg);
  border-color: var(--red);
  color: var(--red);
}

.eval-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.motto {
  text-align: center;
  color: var(--pink-600);
  font-weight: 700;
  margin-top: .4rem;
}

.summary {
  border-top: 2px solid var(--pink-100);
  padding-top: 1rem;
  margin-top: 1rem;
}

.progress {
  background: var(--pink-100);
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
  margin: .4rem 0 1rem;
}

.progress-fill {
  background: linear-gradient(90deg, var(--pink-400), var(--sky-300));
  height: 100%;
  width: 0%;
  transition: width .3s ease;
  border-radius: 999px;
}

.status-msg {
  font-weight: 700;
  color: var(--sky-600);
}

.points-note {
  margin-top: .8rem;
  font-size: .85rem;
  color: var(--pink-600);
}

.final-result-box {
  background: linear-gradient(180deg, var(--pink-50), var(--sky-100));
  border: 1px solid var(--pink-200);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
  box-shadow: var(--shadow);
}

.final-result-box h3 {
  margin-bottom: .8rem;
  color: var(--pink-600);
}

.final-result-box p {
  margin-bottom: .45rem;
  font-size: 1rem;
}

.note {
  font-size: .85rem;
  color: var(--sky-600);
  margin-top: .5rem;
}

.note.success {
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(46, 139, 87, 0.2);
  border-radius: 10px;
  padding: .6rem .8rem;
  font-weight: 700;
}

.error {
  color: var(--red);
  font-weight: 700;
  font-size: .9rem;
  margin-top: .3rem;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .8rem;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
  background: #ebf9f1;
  border: 1px solid rgba(46, 139, 87, 0.2);
  border-radius: 999px;
  padding: .5rem .9rem;
}

.whatsapp-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.hidden {
  display: none !important;
}

form label {
  font-weight: 700;
  display: block;
  margin-top: .8rem;
}

form input[type="text"],
form input[type="tel"] {
  width: 100%;
  padding: .8rem 1rem;
  border: 2px solid var(--pink-200);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  margin-top: .3rem;
}

.field-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500 !important;
}

.checkbox-line input {
  width: 20px;
  height: 20px;
  accent-color: var(--pink-400);
}

.admin-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--pink-600);
  font-weight: 700;
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--pink-600);
  font-weight: 700;
}

.butterflies {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bf {
  width: 42px;
  position: absolute;
  opacity: .55;
  animation: floaty 9s ease-in-out infinite;
}

.bf1 {
  top: 12%;
  right: 6%;
}

.bf2 {
  top: 55%;
  left: 4%;
  animation-delay: -3s;
  width: 34px;
}

.bf3 {
  top: 30%;
  left: 10%;
  animation-delay: -6s;
  width: 26px;
}

@keyframes floaty {

  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }

  50% {
    transform: translateY(-18px) rotate(6deg);
  }
}

main,
header,
footer {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .bf {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }

  .progress-fill {
    transition: none;
  }
}