/* Scoped landing / entry (logged-in teacher) — aligned with iquiz_landing_sample.html */
.iquiz-home-entry {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  --ih-bg: #f6f8fc;
  --ih-surface: #ffffff;
  --ih-ink: #0f172a;
  --ih-muted: #5b6b88;
  --ih-line: #dbe3f0;
  --ih-brand: #1f4ed8;
  --ih-brand-2: #0ea5e9;
  --ih-brand-dark: #122b75;
  --ih-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
  --ih-radius: 18px;
  --ih-max: 1180px;
  color: var(--ih-ink);
  font-size: 16px;
  line-height: 1.5;
}

.iquiz-home-entry a {
  color: inherit;
}

.iquiz-home-entry .ih-container {
  width: min(var(--ih-max), calc(100% - 32px));
  margin: 0 auto;
}

.iquiz-home-entry .ih-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 40px;
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 165, 233, 0.13), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(31, 78, 216, 0.12), transparent 24%),
    linear-gradient(180deg, #eef5ff 0%, #f7faff 100%);
}

@media (min-width: 992px) {
  .iquiz-home-entry .ih-hero {
    padding: 56px 0 48px;
  }
}

.iquiz-home-entry .ih-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

@media (min-width: 992px) {
  .iquiz-home-entry .ih-hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
  }
}

.iquiz-home-entry .ih-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(31, 78, 216, 0.08);
  color: var(--ih-brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.iquiz-home-entry .ih-hero h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--ih-ink);
}

.iquiz-home-entry .ih-hero-lead {
  margin: 16px 0 0;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ih-muted);
  max-width: 640px;
}

.iquiz-home-entry .ih-points-pill {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--ih-line);
  font-weight: 700;
  color: #1f3561;
  font-size: 15px;
}

.iquiz-home-entry .ih-quick-create {
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ih-line);
  border-radius: 24px;
  padding: 10px 12px;
  box-shadow: var(--ih-shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 576px) {
  .iquiz-home-entry .ih-quick-create {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}

.iquiz-home-entry .ih-quick-create input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
  padding: 12px 10px;
  color: var(--ih-ink);
  min-width: 0;
}

.iquiz-home-entry .ih-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  font-size: 15px;
}

.iquiz-home-entry .ih-btn-pill--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--ih-brand), var(--ih-brand-2));
  box-shadow: 0 12px 26px rgba(31, 78, 216, 0.28);
}

.iquiz-home-entry .ih-btn-pill--primary:hover {
  color: #fff;
  transform: translateY(-1px);
  text-decoration: none;
  filter: brightness(1.03);
}

.iquiz-home-entry .ih-quick-hint {
  margin-top: 10px;
  color: var(--ih-muted);
  font-size: 14px;
}

.iquiz-home-entry .ih-hero-card {
  background: linear-gradient(180deg, #132e86, #0f225f);
  color: #fff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 22px 50px rgba(18, 43, 117, 0.28);
}

.iquiz-home-entry .ih-hero-card .ih-mini-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
}

/* Tiêu đề thẻ AI (“Tạo nhanh bằng AI”) — luôn trắng; H1 cột trái giữ màu ink */
.iquiz-home-entry .ih-hero-card h2 {
  margin: 14px 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  color: #fff !important;
}

@media (min-width: 992px) {
  .iquiz-home-entry .ih-hero-card h2 {
    font-size: 26px;
  }
}

.iquiz-home-entry .ih-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
}

.iquiz-home-entry .ih-pill-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.iquiz-home-entry .ih-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
}

.iquiz-home-entry .ih-hero-card .ih-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.iquiz-home-entry .ih-btn-pill--light {
  background: #fff;
  color: var(--ih-brand-dark);
  border: 1px solid #e8eef9;
}

.iquiz-home-entry .ih-btn-pill--light:hover {
  color: var(--ih-brand-dark);
  text-decoration: none;
}

.iquiz-home-entry .ih-btn-pill--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.iquiz-home-entry .ih-btn-pill--ghost:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.2);
}

.iquiz-home-entry .ih-section {
  padding: 48px 0 32px;
}

.iquiz-home-entry .ih-section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 1.2;
  font-weight: 800;
}

.iquiz-home-entry .ih-section-head p {
  margin: 10px 0 0;
  color: var(--ih-muted);
  max-width: 720px;
  font-size: 16px;
}

.iquiz-home-entry .ih-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .iquiz-home-entry .ih-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1100px) {
  .iquiz-home-entry .ih-cards:not(.ih-cards--four) {
    grid-template-columns: repeat(3, 1fr);
  }
  .iquiz-home-entry .ih-cards--four {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .iquiz-home-entry .ih-cards--four {
    grid-template-columns: repeat(2, 1fr);
  }
}

.iquiz-home-entry .ih-card {
  background: #fff;
  border: 1px solid var(--ih-line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  transition: 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.iquiz-home-entry .ih-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ih-shadow);
  border-color: rgba(31, 78, 216, 0.22);
  text-decoration: none;
}

.iquiz-home-entry .ih-card--featured {
  background: linear-gradient(180deg, #17358f 0%, #10255f 100%);
  color: #fff;
  border: none;
  grid-column: 1 / -1;
}

.iquiz-home-entry .ih-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: linear-gradient(135deg, rgba(31, 78, 216, 0.12), rgba(14, 165, 233, 0.15));
}

.iquiz-home-entry .ih-card--featured .ih-card-icon {
  background: rgba(255, 255, 255, 0.14);
}

.iquiz-home-entry .ih-tag {
  display: inline-flex;
  margin-top: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(31, 78, 216, 0.08);
  color: var(--ih-brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.iquiz-home-entry .ih-card--featured .ih-tag {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.iquiz-home-entry .ih-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
}

.iquiz-home-entry .ih-card p {
  margin: 0;
  color: var(--ih-muted);
  font-size: 15px;
  flex: 1;
}

.iquiz-home-entry .ih-card--featured p {
  color: rgba(255, 255, 255, 0.82);
}

.iquiz-home-entry .ih-meta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.iquiz-home-entry .ih-points {
  color: var(--ih-brand-dark);
  font-size: 15px;
  font-weight: 800;
}

.iquiz-home-entry .ih-card--featured .ih-points {
  color: #fff;
}

.iquiz-home-entry .ih-mini {
  color: var(--ih-muted);
  font-size: 13px;
}

.iquiz-home-entry .ih-card--featured .ih-mini {
  color: rgba(255, 255, 255, 0.75);
}

.iquiz-home-entry .ih-card-cta {
  margin-top: 14px;
}

.iquiz-home-entry .ih-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ih-brand);
  background: rgba(31, 78, 216, 0.08);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.iquiz-home-entry .ih-btn-ghost:hover {
  background: rgba(31, 78, 216, 0.14);
  text-decoration: none;
  color: var(--ih-brand-dark);
}

.iquiz-home-entry .ih-card--featured .ih-btn-ghost {
  background: #fff;
  color: var(--ih-brand-dark);
}

.iquiz-home-entry .ih-card--featured .ih-btn-ghost:hover {
  filter: brightness(0.98);
  color: var(--ih-brand-dark);
}

/* Đề thi cộng đồng — nền nhẹ, bảng bo góc giống “đề gần đây” */
.iquiz-home-entry .ih-community-section {
  padding: 12px 0 48px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 55%, #f6f8fc 100%);
}

.iquiz-home-entry .ih-community-section .ih-recent-head-row {
  margin-bottom: 20px;
}

.iquiz-home-entry .ih-recent {
  padding: 8px 0 40px;
}

.iquiz-home-entry .ih-recent-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.iquiz-home-entry .ih-recent-list {
  background: #fff;
  border: 1px solid var(--ih-line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.iquiz-home-entry .ih-recent-head,
.iquiz-home-entry .ih-recent-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 72px 72px 80px 88px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  font-size: 14px;
}

@media (max-width: 767px) {
  .iquiz-home-entry .ih-recent-head {
    display: none;
  }
  .iquiz-home-entry .ih-recent-row {
    grid-template-columns: 1fr;
    gap: 8px;
    border-bottom: 1px solid #edf2fb;
  }
}

.iquiz-home-entry .ih-recent-head {
  background: #f8fbff;
  color: #45608e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.iquiz-home-entry .ih-recent-row {
  border-top: 1px solid #edf2fb;
}

.iquiz-home-entry .ih-recent-row:first-of-type {
  border-top: none;
}

.iquiz-home-entry .ih-quiz-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.iquiz-home-entry .ih-quiz-badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(31, 78, 216, 0.08);
  color: var(--ih-brand);
  flex: none;
  font-size: 18px;
}

.iquiz-home-entry .ih-quiz-title strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 700;
}

.iquiz-home-entry .ih-quiz-title span {
  display: block;
  color: var(--ih-muted);
  font-size: 12px;
  margin-top: 2px;
}

.iquiz-home-entry .ih-muted-cell {
  color: var(--ih-muted);
  font-size: 14px;
}

.iquiz-home-entry .ih-recent-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--ih-muted);
}

.iquiz-home-entry .ih-stats {
  background: linear-gradient(180deg, #102458, #0b183b);
  color: #fff;
  padding: 28px 0;
  margin-top: 8px;
}

.iquiz-home-entry .ih-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 768px) {
  .iquiz-home-entry .ih-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.iquiz-home-entry .ih-stat {
  text-align: center;
  padding: 18px 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.iquiz-home-entry .ih-stat-icon {
  font-size: 22px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1;
}

.iquiz-home-entry .ih-stat .ih-num {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.1;
}

.iquiz-home-entry .ih-stat .ih-label {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 13px;
}

.iquiz-home-entry .ih-footer-cta {
  padding: 56px 0 36px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  text-align: center;
}

.iquiz-home-entry .ih-footer-cta h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.15;
  font-weight: 800;
}

.iquiz-home-entry .ih-footer-cta > .ih-container > p {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--ih-muted);
  font-size: 17px;
}

.iquiz-home-entry .ih-footer-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.iquiz-home-entry .ih-btn-secondary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  background: #fff;
  color: var(--ih-brand-dark);
  border: 1px solid var(--ih-line);
  text-decoration: none;
  transition: 0.2s;
}

.iquiz-home-entry .ih-btn-secondary-outline:hover {
  text-decoration: none;
  border-color: rgba(31, 78, 216, 0.35);
  color: var(--ih-brand-dark);
}
