/* Daily Learning module styles — aligned with LingoFantasy-home design system */
.daily-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(105deg, #f6f7fd 0%, #eef4fe 55%, #dcebfc 100%);
  border-bottom: 1px solid #e8edf6;
  padding: 54px 0 68px;
}

.daily-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 48%;
  background:
    linear-gradient(90deg, #eef4fe 0%, rgba(238, 244, 254, 0.72) 28%, rgba(220, 235, 252, 0.12) 100%),
    url("../../lessons/banner.webp") center right / cover no-repeat;
  pointer-events: none;
}

.daily-hero .container {
  position: relative;
  z-index: 1;
}

.daily-hero h1 {
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.18;
  letter-spacing: -1.4px;
  margin: 16px 0 12px;
  font-weight: 850;
  color: var(--ink);
}

.daily-hero-lead {
  font-size: 16px;
  color: #5b6a84;
  margin: 0;
  max-width: 560px;
  line-height: 1.85;
}

.daily-main {
  padding-bottom: 72px;
}

.daily-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e8edf6;
  margin-top: -32px;
  position: relative;
  z-index: 2;
}

.daily-tab {
  border: 1px solid #e8edf6;
  border-bottom: 0;
  background: #f5f7fc;
  color: #53617a;
  padding: 15px 30px;
  border-radius: 14px 14px 0 0;
  font-size: 15px;
  font-weight: 750;
  transition: background 0.18s, color 0.18s;
}

.daily-tab:hover {
  color: var(--primary);
  background: #fafbff;
}

.daily-tab.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.daily-filters {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 22px 0 18px;
}

.daily-chip {
  border: 1px solid #e6eaf4;
  background: #f6f8fd;
  color: #4b5973;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 650;
  transition: all 0.18s;
}

.daily-chip:hover {
  border-color: #cfcaff;
  color: var(--primary);
  background: #f3f2ff;
}

.daily-chip.is-active {
  background: linear-gradient(110deg, #6256e9, #4979f5);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(99, 85, 235, 0.22);
}

.daily-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 22px;
  flex-wrap: wrap;
}

.daily-section-head h2 {
  margin: 0;
  border-left: 4px solid var(--primary);
  padding-left: 13px;
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.daily-muted {
  color: var(--muted);
  font-size: 14px;
}

.daily-section-head .daily-cta,
.daily-section-head .daily-more {
  margin-left: auto;
}

.daily-more {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 14px;
  font-weight: 720;
  padding: 6px 10px;
  border-radius: 8px;
}

.daily-more:hover {
  background: #f2f1ff;
}

.daily-more[hidden] {
  display: none;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.daily-card {
  border-radius: 17px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e9edf6;
  box-shadow: 0 8px 24px rgba(40, 52, 100, 0.045);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s, box-shadow 0.22s;
}

.daily-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(54, 65, 126, 0.11);
}

.daily-cover-btn {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #eef1f7;
  padding: 0;
  background: linear-gradient(180deg, #f7f9fe 0%, #eef3fc 100%);
  position: relative;
  overflow: hidden;
  text-align: left;
}

.daily-cover-img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.daily-card:hover .daily-cover-img {
  transform: scale(1.025);
}

.daily-placeholder {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 18px 56px;
  background: linear-gradient(145deg, #eef3ff 0%, #f6f0ff 55%, #e8f5ff 100%);
  color: var(--ink);
}

.daily-placeholder-phrase {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.daily-placeholder-sub {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 650;
  color: #465775;
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 14px;
  border-radius: 999px;
}

/* Dynamic card overlays: EP badge, play button, duration */
.daily-ep-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6355eb, #4879f5);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(72, 100, 235, 0.28);
  font-variant-numeric: tabular-nums;
}

.daily-cover-views {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 29, 69, 0.64);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 10px rgba(10, 20, 50, 0.16);
}

.daily-cover-views[hidden] {
  display: none;
}

.daily-cover-views svg {
  width: 13px;
  height: 13px;
  display: block;
}

.daily-card-likes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #e84b6a;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.daily-card-likes[hidden] {
  display: none;
}

.daily-card-likes svg {
  width: 13px;
  height: 13px;
  display: block;
}

.daily-play-btn {
  position: absolute;
  bottom: 11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 29, 69, 0.56);
  border: 2px solid rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 20, 50, 0.28);
  transition: transform 0.2s, background 0.2s;
}

.daily-play-btn svg {
  width: 17px;
  height: 17px;
  margin-left: 2px;
}

.daily-cover-btn:hover .daily-play-btn {
  transform: translateX(-50%) scale(1.08);
  background: rgba(99, 85, 235, 0.88);
}

.daily-duration-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(16, 29, 69, 0.68);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.daily-duration-badge:empty {
  display: none;
}

.daily-card-info {
  padding: 15px 17px 17px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.daily-card-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 780;
  line-height: 1.45;
  color: var(--ink);
}

.daily-card-phrase {
  font-size: 13px;
  font-weight: 650;
  color: #4f5f7d;
  line-height: 1.45;
}

.daily-card-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
}

.daily-archive {
  margin-top: 48px;
}

.daily-empty {
  grid-column: 1 / -1;
  padding: 46px 20px;
  border: 1px dashed #d7dff0;
  border-radius: 16px;
  background: #fafbff;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* Video modal */
.daily-dialog {
  border: 0;
  border-radius: 20px;
  padding: 24px 26px 26px;
  width: min(94vw, 680px);
  max-height: 90vh;
  overflow-y: auto;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.daily-dialog::backdrop {
  background: rgba(11, 21, 57, 0.62);
  backdrop-filter: blur(3px);
}

.daily-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.daily-dialog-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}

.daily-dialog-close {
  border: 0;
  background: #f0effe;
  color: var(--primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.daily-dialog-close:hover {
  background: #e4e1ff;
}

.daily-dialog-video-wrap {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: #f3f6fc;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(24, 37, 61, 0.08);
}

.daily-dialog video {
  width: auto;
  max-width: 100%;
  max-height: 54vh;
  background: #0f172a;
  display: block;
}

.daily-dialog-notice {
  background: #f6f8fe;
  border: 1px solid #e8edf6;
  padding: 18px 20px;
  border-radius: 14px;
  line-height: 1.75;
  color: #53617a;
  font-size: 14px;
  margin: 0;
}

.daily-modal-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e8edf6;
}

.daily-modal-title-block h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.daily-modal-sub {
  margin: 0 0 8px;
  font-size: 13px;
  color: #53617a;
}

.daily-modal-tags {
  font-size: 12px;
  color: var(--primary);
  margin: 0 0 14px;
  line-height: 1.6;
}

.daily-scenes-heading {
  font-size: 13px;
  font-weight: 800;
  color: #4b5973;
  margin: 0 0 10px;
}

.daily-scene-list {
  display: grid;
  gap: 10px;
}

.daily-scene-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e9edf6;
  border-radius: 13px;
  background: #f9fbff;
}

.daily-scene-thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
  border: 1px solid #e6eaf4;
  flex-shrink: 0;
}

.daily-scene-body {
  min-width: 0;
  flex: 1;
}

.daily-scene-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-scene-idx {
  font-size: 11px;
  font-weight: 800;
  color: var(--primary);
  background: #eeecff;
  padding: 2px 7px;
  border-radius: 999px;
}

.daily-scene-sentence {
  font-size: 15px;
  font-weight: 780;
  color: var(--ink);
}

.daily-scene-ipa {
  font-size: 12px;
  color: #6b7a96;
}

.daily-scene-meaning {
  margin-top: 4px;
  font-size: 13px;
  color: #53617a;
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .daily-hero {
    padding: 40px 0 56px;
  }

  .daily-hero::before {
    inset: 0 0 0 30%;
    opacity: 0.42;
  }

  .daily-hero-lead {
    font-size: 14px;
  }

  .daily-tabs {
    margin-top: -26px;
  }

  .daily-tab {
    padding: 12px 18px;
    font-size: 14px;
    flex: 1;
    text-align: center;
  }

  .daily-filters {
    gap: 7px;
    padding: 18px 0 14px;
  }

  .daily-chip {
    padding: 7px 13px;
    font-size: 12px;
  }

  .daily-section-head h2 {
    font-size: 20px;
  }

  .daily-section-head .daily-cta {
    margin-left: 0;
  }

  .daily-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .daily-ep-badge {
    top: 8px;
    left: 8px;
    font-size: 11px;
    padding: 3px 9px;
  }

  .daily-cover-views {
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 11px;
  }

  .daily-cover-views svg,
  .daily-card-likes svg {
    width: 11px;
    height: 11px;
  }

  .daily-play-btn {
    bottom: 8px;
    width: 34px;
    height: 34px;
  }

  .daily-play-btn svg {
    width: 13px;
    height: 13px;
  }

  .daily-duration-badge {
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    padding: 2px 7px;
  }

  .daily-card-info {
    padding: 11px 12px 13px;
  }

  .daily-card-info h3 {
    font-size: 13px;
  }

  .daily-card-meta {
    font-size: 11px;
  }
}

/* Card bottom meta + live stats */
.daily-card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.daily-card-stats {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #6b7a96;
  font-variant-numeric: tabular-nums;
}

.daily-card-stats:empty {
  display: none;
}

/* Engagement bar (Like, Share, Comments, Views) */
.daily-engage {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8edf6;
}

.daily-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.daily-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e3e8f4;
  background: #f8faff;
  color: #465470;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.18s;
  text-decoration: none;
}

.daily-action-btn:hover {
  border-color: #c8c3fb;
  background: #f2f1ff;
  color: var(--primary);
}

.daily-like-btn.is-liked {
  background: linear-gradient(110deg, #ff5e7d, #f0486c);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(240, 72, 108, 0.24);
}

.daily-action-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

.daily-view-stat {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.daily-share-toast {
  display: block;
  min-height: 20px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
}

/* Standalone video.php page */
.daily-video-page {
  padding: 34px 0 76px;
  background: #fafbff;
}

.daily-video-container {
  max-width: 820px;
}

.daily-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.daily-back-link {
  font-size: 14px;
  font-weight: 750;
  color: var(--primary);
}

.daily-back-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.daily-lang-pill {
  background: #eef1fc;
  color: #4b55c8;
  font-size: 12px;
  font-weight: 750;
  padding: 4px 12px;
  border-radius: 999px;
}

.daily-ep-inline {
  background: linear-gradient(135deg, #6355eb, #4879f5);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}

.daily-video-article {
  background: #fff;
  border: 1px solid #e8edf6;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 12px 36px rgba(40, 52, 100, 0.05);
}

.daily-video-header {
  margin-top: 20px;
}

.daily-video-header h1 {
  margin: 0 0 6px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
  color: var(--ink);
}

.daily-video-sub {
  margin: 0 0 12px;
  font-size: 14px;
  color: #5b6a84;
}

.daily-quiz-callout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f5f4ff;
  border: 1px solid #e4e1ff;
  border-radius: 12px;
  padding: 9px 14px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--ink);
}

.daily-quiz-label {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.daily-related-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e8edf6;
}

.daily-related-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.daily-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.daily-related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e8edf6;
  border-radius: 14px;
  background: #fafbff;
  transition: transform 0.18s, box-shadow 0.18s;
}

.daily-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(54, 65, 126, 0.08);
}

.daily-related-card img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.daily-related-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

@media (max-width: 640px) {
  .daily-video-article {
    padding: 16px;
    border-radius: 16px;
  }

  .daily-related-grid {
    grid-template-columns: 1fr;
  }

  .daily-view-stat {
    margin-left: 0;
    width: 100%;
  }
}
