/* =====================================================================
   English Master — Vocabulary section layout  (تخطيط قسم الكلمات)
   ---------------------------------------------------------------------
   خاص بهَب الكلمات. يعتمد على tokens ومكوّنات shared.css.
   كل كارت موضوع بياخد لونه من المتغيّر --accent (يتحدّد من الـ JS).
   ===================================================================== */

.vc-wrap { max-width: 860px; margin: 0 auto; }

/* ---------- هيدر القسم ---------- */
.vc-hero {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.05);
  text-align: center;
  padding: 26px 22px 24px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.vc-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--ink-teal), var(--ink-green), var(--ink-blue));
}
.vc-hero .vc-ico { font-size: 2.6rem; color: var(--ink-teal); display: inline-flex; line-height: 0; margin-bottom: 6px; }
.vc-hero h1 { font-family: var(--font-heading); font-size: clamp(1.5rem, 5vw, 2.1rem); color: var(--ink-blue); font-weight: 700; }
.vc-hero .vc-en { font-family: var(--font-english); color: var(--ink-pink); font-weight: 600; direction: ltr; display: block; margin-top: 4px; }
.vc-hero .vc-sub { font-family: var(--font-hand); font-size: 1.2rem; color: var(--ink-purple); margin-top: 8px; }

/* ---------- لوحة التقدّم ---------- */
.vc-dashboard {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 20px 22px;
  margin-bottom: 20px;
}

.vc-dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* زر «راجع النهاردة» */
.review-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--ink-teal), var(--ink-green));
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 30px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(13,148,136,0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}
.review-now:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(13,148,136,0.34); }
.review-now .rb-ico { font-size: 1.3rem; line-height: 0; display: flex; }
.review-now .rb-count {
  background: rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1px 10px;
  font-family: var(--font-english);
  font-weight: 800;
}
.review-now.is-disabled { background: #cbd5e1; box-shadow: none; cursor: default; }
.review-now.is-disabled:hover { transform: none; }

/* عدّاد السلسلة (نفس روح الكشكول) */
.vc-streak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid var(--ink-orange);
  border-radius: 30px;
  padding: 7px 16px;
}
.vc-streak .streak-fire { font-size: 1.5rem; line-height: 0; display: flex; color: var(--ink-orange); }
.vc-streak .streak-num { font-family: var(--font-english); font-size: 1.4rem; font-weight: 800; color: var(--ink-orange); line-height: 1; }
.vc-streak .streak-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.vc-streak.is-zero { filter: grayscale(0.6); opacity: 0.85; }

/* خلايا الإحصاء */
.vc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.vc-stat { text-align: center; background: #f8fafc; border-radius: 12px; padding: 14px 8px; }
.vc-stat .vs-num { font-family: var(--font-english); font-size: 1.7rem; font-weight: 800; line-height: 1; }
.vc-stat .vs-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 5px; }
.vc-stat.due .vs-num { color: var(--ink-orange); }
.vc-stat.mastered .vs-num { color: var(--ink-green); }
.vc-stat.learning .vs-num { color: var(--ink-blue-light); }

/* ---------- مدخل التمارين والألعاب ---------- */
.vc-games-cta {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  border: 2px solid var(--ink-purple); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 20px;
  text-decoration: none; color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
}
.vc-games-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(124,58,237,0.22); }
.vc-games-cta .vg-ico {
  flex: none; width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  color: white; background: var(--ink-purple);
}
.vc-games-cta .vg-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-games-cta .vg-text strong { font-family: var(--font-heading); color: var(--ink-purple); font-size: 1.15rem; }
.vc-games-cta .vg-text span { font-size: 0.82rem; color: var(--text-muted); }
.vc-games-cta .vg-arrow { flex: none; color: var(--ink-purple); font-size: 1.3rem; display: flex; transform: scaleX(-1); }

/* ---------- صندوق الكلمات الصعبة ---------- */
.vc-weakbox-cta {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid var(--ink-orange); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 20px;
  text-decoration: none; color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
}
.vc-weakbox-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(234,88,12,0.22); }
.vc-weakbox-cta.is-empty { opacity: 0.55; pointer-events: none; }
.vc-weakbox-cta .wb-ico {
  flex: none; width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: var(--ink-orange); color: white;
}
.vc-weakbox-cta .wb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vc-weakbox-cta .wb-text strong { font-family: var(--font-heading); color: var(--ink-orange); font-size: 1.15rem; }
.vc-weakbox-cta .wb-text span { font-size: 0.82rem; color: var(--text-muted); }
.vc-weakbox-cta .wb-badge {
  flex: none;
  min-width: 34px; height: 34px;
  border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-english); font-size: 1.05rem; font-weight: 800;
  background: var(--ink-orange); color: white;
  padding: 0 10px;
}

/* ---------- مجموعات الموضوعات ---------- */
.vocab-group-title {
  font-family: var(--font-heading);
  color: var(--ink-blue);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 22px 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vocab-group-title::before {
  content: '';
  width: 18px; height: 3px;
  background: var(--ink-red);
  border-radius: 2px;
}

.vocab-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---------- كارت موضوع ---------- */
.vocab-topic {
  --accent: var(--ink-blue);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 18px;
  text-align: right;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  position: relative;
  font: inherit;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}
.vocab-topic:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(30,58,138,0.14); }

.vocab-topic .vt-top { display: flex; align-items: center; gap: 12px; }
.vocab-topic .vt-ico {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, white);
}
@supports not (background: color-mix(in srgb, red, white)) {
  .vocab-topic .vt-ico { background: #eef2ff; }
}
.vocab-topic .vt-name { font-family: var(--font-heading); font-size: 1.08rem; font-weight: 700; color: var(--accent); line-height: 1.3; }
.vocab-topic .vt-en { font-family: var(--font-english); font-size: 0.76rem; color: var(--text-muted); direction: ltr; }

.vocab-topic .vt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.vocab-topic .vt-count { font-weight: 600; }
.vocab-topic .vt-done { font-family: var(--font-english); font-weight: 700; color: var(--accent); }

.vocab-topic .vt-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; display: flex; }
.vocab-topic .vt-fill { height: 100%; width: 0%; transition: width 0.6s cubic-bezier(0.22,1,0.36,1); }
.vocab-topic .vt-fill-master { background: var(--accent); }
.vocab-topic .vt-fill-learn  { background: color-mix(in srgb, var(--accent) 38%, white); }
@supports not (background: color-mix(in srgb, red, white)) {
  .vocab-topic .vt-fill-learn { background: #cbd5e1; }
}
.vocab-topic .vt-mastered-lbl { font-family: var(--font-english); font-weight: 700; color: var(--ink-green); }
.vocab-topic .vt-learning-lbl { font-family: var(--font-english); font-weight: 700; color: var(--ink-orange); }

/* شارة «قريباً» */
.vocab-topic.locked { cursor: default; }
.vocab-topic.locked:hover { transform: none; box-shadow: var(--shadow); }
.vocab-topic.locked .vt-ico { color: var(--text-muted); background: #f1f5f9; }
.vocab-topic.locked .vt-name { color: var(--text-muted); }
.vocab-topic .vt-soon {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.68rem; font-weight: 700;
  color: var(--ink-orange); background: #fff7ed;
  border: 1px solid var(--ink-orange);
  border-radius: 10px; padding: 1px 8px;
}
/* شارة عدد الكلمات المستحقّة للمراجعة */
.vocab-topic .vt-due {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.68rem; font-weight: 700;
  color: white; background: var(--ink-orange);
  border-radius: 10px; padding: 1px 9px;
}

@media (max-width: 620px) {
  .vocab-topics { grid-template-columns: 1fr; }
  .vc-stats { grid-template-columns: repeat(3, 1fr); }
  .vc-dash-top { justify-content: center; }
}
