/* DR Dragon - Daily Vocabulary Hub Stylesheet (/daily-vocab/) */

.daily-vocab-page {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg, 24px);
  max-width: 1080px;
  margin: 0 auto;
  padding-bottom: 48px;
}

/* KPI Summary */
.daily-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.daily-kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  background: var(--surface, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-num {
  display: block;
  font-size: 19px;
  font-weight: 800;
  color: var(--text, #111827);
  letter-spacing: -0.02em;
}

.kpi-label {
  font-size: 12px;
  color: var(--muted, #64748b);
  font-weight: 500;
}

/* 7-Day Tabs Switcher */
.daily-tabs-section {
  padding: 16px 20px;
  border-radius: var(--radius-lg, 14px);
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
}

.daily-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.daily-tabs-hint {
  font-size: 12px;
  color: var(--muted, #64748b);
}

.daily-days-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.daily-day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 14px;
  min-width: 96px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
  color: var(--text, #1e293b);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.daily-day-tab:hover {
  background: rgba(8, 127, 109, 0.06);
  border-color: rgba(8, 127, 109, 0.3);
  transform: translateY(-1px);
}

.daily-day-tab.is-active {
  background: linear-gradient(135deg, rgba(8, 127, 109, 0.12), rgba(8, 127, 109, 0.04));
  border-color: var(--jade, #087f6d);
  box-shadow: 0 0 0 1px var(--jade, #087f6d);
}

.daily-tab-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #64748b);
}

.daily-day-tab.is-active .daily-tab-day {
  color: var(--jade, #087f6d);
  font-weight: 700;
}

.daily-tab-hanzi {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-chinese, "Noto Serif SC", serif);
  color: var(--text, #1e293b);
}

.daily-tab-py {
  font-size: 11px;
  color: var(--muted, #64748b);
}

/* Main Bento Hero Card */
.daily-bento-hero {
  padding: 28px;
  border-radius: var(--radius-xl, 20px);
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.daily-bento-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--jade, #087f6d), #10b981, #d97706);
}

.daily-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.daily-date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  background: var(--bg-subtle, rgba(0, 0, 0, 0.04));
  padding: 4px 10px;
  border-radius: 8px;
}

.daily-level-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(8, 127, 109, 0.12);
  color: var(--jade, #087f6d);
}

.daily-pos-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.daily-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Centerpiece Layout */
.daily-centerpiece {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 768px) {
  .daily-centerpiece {
    grid-template-columns: 1fr;
  }
}

/* Mizige Showcase Box */
.daily-mizige-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 240px;
  margin: 0 auto;
  border-radius: 18px;
  border: 2px solid var(--jade, #087f6d);
  background: var(--bg-subtle, #fcfbf9);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(8, 127, 109, 0.08);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.daily-mizige-box:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(8, 127, 109, 0.16);
}

.mizige-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mizige-line {
  position: absolute;
  border-color: rgba(8, 127, 109, 0.18);
  border-style: dashed;
}

.line-h {
  top: 50%;
  left: 0;
  right: 0;
  border-top-width: 1px;
}

.line-v {
  left: 50%;
  top: 0;
  bottom: 0;
  border-left-width: 1px;
}

.line-d1 {
  top: 0;
  left: 0;
  width: 141.4%;
  height: 0;
  border-top-width: 1px;
  transform-origin: top left;
  transform: rotate(45deg);
}

.line-d2 {
  top: 0;
  right: 0;
  width: 141.4%;
  height: 0;
  border-top-width: 1px;
  transform-origin: top right;
  transform: rotate(-45deg);
}

.daily-large-hanzi {
  font-size: 88px;
  font-weight: 800;
  font-family: var(--font-chinese, "Noto Serif SC", serif);
  color: var(--jade, #087f6d);
  position: relative;
  z-index: 2;
  user-select: none;
  line-height: 1;
}

.mizige-listen-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--jade, #087f6d);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease;
}

.mizige-listen-badge:hover {
  transform: scale(1.1);
}

/* Word Meta Box */
.daily-meta-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.daily-pinyin-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.daily-pinyin {
  font-size: 32px;
  font-weight: 800;
  color: var(--text, #111827);
  letter-spacing: -0.01em;
  margin: 0;
}

.daily-hanviet {
  font-size: 14px;
  color: var(--muted, #64748b);
}

.daily-hanviet strong {
  color: var(--text, #111827);
  font-weight: 700;
}

.daily-meaning-banner {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(8, 127, 109, 0.06);
  border-left: 4px solid var(--jade, #087f6d);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.meaning-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meaning-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--jade, #087f6d);
}

.daily-etymology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.etymology-card {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--line, rgba(0, 0, 0, 0.06));
}

.etymology-label {
  display: block;
  font-size: 11px;
  color: var(--muted, #64748b);
  margin-bottom: 2px;
}

.etymology-card strong {
  font-size: 13px;
  color: var(--text, #111827);
}

.daily-mnemonic-card {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.mnemonic-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #b45309;
  font-size: 13px;
}

.daily-mnemonic-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text, #1e293b);
}

.daily-dragon-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--line, rgba(0, 0, 0, 0.06));
  font-size: 13px;
  line-height: 1.6;
}

.daily-dragon-tip p {
  margin: 0;
}

/* Examples Section */
.daily-examples-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line, rgba(0, 0, 0, 0.1));
}

.section-title-sm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.section-title-sm span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  text-transform: uppercase;
}

.section-title-sm small {
  font-size: 12px;
  color: var(--muted, #64748b);
}

.daily-examples-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-example-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
  border: 1px solid var(--line, rgba(0, 0, 0, 0.06));
  transition: background 0.15s ease;
}

.daily-example-item:hover {
  background: rgba(8, 127, 109, 0.03);
}

.daily-ex-content {
  flex: 1;
}

.daily-ex-zh {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-chinese, "Noto Serif SC", serif);
  color: var(--text, #111827);
  margin: 0 0 2px 0;
}

.daily-ex-py {
  font-size: 12px;
  color: var(--jade, #087f6d);
  margin: 0 0 4px 0;
  font-weight: 600;
}

.daily-ex-vi {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin: 0;
}

/* AI Copilot Section */
.daily-copilot-section {
  padding: 24px;
  border-radius: var(--radius-xl, 20px);
  background: linear-gradient(135deg, rgba(8, 127, 109, 0.06), rgba(217, 119, 6, 0.04));
  border: 1px solid rgba(8, 127, 109, 0.2);
}

.copilot-head {
  margin-bottom: 16px;
}

.copilot-title h3 {
  font-size: 18px;
  margin: 6px 0;
  color: var(--text, #111827);
}

.copilot-title p {
  font-size: 13px;
  color: var(--muted, #64748b);
  margin: 0;
}

.copilot-chips-wrap {
  margin-bottom: 14px;
}

.chips-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  margin-bottom: 8px;
}

.copilot-chips-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.copilot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.1));
  color: var(--text, #1e293b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.copilot-chip:hover {
  background: rgba(8, 127, 109, 0.1);
  border-color: var(--jade, #087f6d);
  color: var(--jade, #087f6d);
  transform: translateY(-1px);
}

.copilot-input-box {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.copilot-text-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.15));
  background: var(--surface, #ffffff);
  font-size: 14px;
  color: var(--text, #111827);
}

.copilot-text-input:focus {
  outline: none;
  border-color: var(--jade, #087f6d);
  box-shadow: 0 0 0 3px rgba(8, 127, 109, 0.15);
}

.copilot-send-btn {
  padding: 0 20px;
  border-radius: 12px;
  white-space: nowrap;
}

.copilot-response-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface, #ffffff);
  border: 1px solid rgba(8, 127, 109, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.copilot-res-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jade, #087f6d);
}

.copilot-res-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--muted, #64748b);
}

.copilot-res-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text, #1e293b);
}

/* Dark Mode Overrides */
[data-theme="dark"] .daily-kpi-card,
[data-theme="dark"] .daily-tabs-section,
[data-theme="dark"] .daily-bento-hero,
[data-theme="dark"] .copilot-chip,
[data-theme="dark"] .copilot-text-input,
[data-theme="dark"] .copilot-response-box {
  background: var(--surface-dark, #1e293b);
  border-color: var(--line-dark, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .daily-mizige-box {
  background: rgba(15, 23, 42, 0.6);
  border-color: var(--jade, #087f6d);
}

[data-theme="dark"] .daily-day-tab {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .daily-day-tab:hover {
  background: rgba(8, 127, 109, 0.15);
}

[data-theme="dark"] .daily-example-item,
[data-theme="dark"] .etymology-card,
[data-theme="dark"] .daily-dragon-tip {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
