/* ==========================================================================
   XemLichAm Theme - Modern Design System (2025/2026 Edition)
   Tone màu: Emerald Green / Jade (#047857), Crimson (#dc2626), Purple (#7c3aed)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #047857;
  --primary-dark: #065f46;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;
  
  --good-day: #dc2626;
  --good-day-bg: #fef2f2;
  --good-day-border: #fecaca;
  
  --bad-day: #7c3aed;
  --bad-day-bg: #f5f3ff;
  --bad-day-border: #ddd6fe;

  --accent-gold: #d97706;
  --accent-gold-bg: #fffbeb;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.95);
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --font-sans: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1200px;
}

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

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.3);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--primary-dark);
}

.brand-text span {
  color: var(--good-day);
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.nav-menu > li > a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-menu .clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-menu .clock-badge .clock-time {
  font-family: monospace;
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 700;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown > a::after {
  content: "▾";
  margin-left: 5px;
  font-size: 11px;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  list-style: none;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 1050;
  max-height: 400px;
  overflow-y: auto;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.dropdown-menu li a:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* Header action button (Quick jump) */
.btn-quick-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25);
  transition: all 0.2s ease;
}

.btn-quick-jump:hover {
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb-wrapper {
  margin: 20px 0 15px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 8px;
  font-size: 13.5px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-light);
}

.breadcrumb li a {
  color: var(--text-muted);
}

.breadcrumb li a:hover {
  color: var(--primary);
}

.breadcrumb li[aria-current="page"] {
  font-weight: 600;
  color: var(--text-main);
}

/* ==========================================================================
   PAGE HERO & HEADINGS
   ========================================================================== */
.page-title-area {
  margin-bottom: 25px;
}

.page-title-area h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.page-title-area h2 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.badge-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: #e2e8f0;
  color: var(--text-main);
  margin-right: 6px;
  margin-top: 4px;
}

.lsi-keywords {
  font-size: 12.5px;
  color: var(--text-light);
  margin: 12px 0 20px;
  line-height: 1.5;
}

/* ==========================================================================
   CARD SYSTEM & SUMMARY CARDS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 25px;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f1f5f9;
}

.card-header-title h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Summary Grid 2 Cột */
.summary-dual-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px -4px rgba(4, 120, 87, 0.08);
}

.summary-col {
  padding: 16px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
}

.summary-col.solar {
  border-top: 4px solid var(--primary);
}

.summary-col.lunar {
  border-top: 4px solid var(--good-day);
}

.summary-col .col-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.summary-col.solar .col-heading { color: var(--primary-dark); }
.summary-col.lunar .col-heading { color: var(--good-day); }

.summary-col .huge-date {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  margin: 10px 0;
}

.summary-col.solar .huge-date { color: var(--primary-dark); }
.summary-col.lunar .huge-date { color: var(--good-day); }

.summary-col .date-sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.summary-col .date-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

.summary-details-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 10px;
  padding-top: 16px;
  border-top: 1px dashed var(--primary-border);
}

.summary-item {
  font-size: 14px;
}

.summary-item strong {
  color: var(--text-main);
}

/* ==========================================================================
   WIDGET LỊCH THÁNG (CALENDAR TABLE)
   ========================================================================== */
.calendar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 30px;
}

.cal-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cal-nav-bar h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.cal-btn:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

.calendar-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 6px;
  table-layout: fixed;
}

.calendar-table th {
  padding: 10px 4px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #f8fafc;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.calendar-table th:last-child {
  color: var(--good-day);
}

.calendar-table td {
  height: 80px;
  vertical-align: top;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  background: #fff;
  transition: all 0.2s ease;
  position: relative;
}

.calendar-table td.empty-cell {
  background: transparent;
  border: 1px dashed #f1f5f9;
}

.calendar-table td:hover:not(.empty-cell) {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.calendar-table td.good-day {
  border-color: var(--good-day-border);
  background: var(--good-day-bg);
}

.calendar-table td.bad-day {
  border-color: var(--bad-day-border);
  background: var(--bad-day-bg);
}

.calendar-table td.current-day {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

.cal-cell-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-decoration: none !important;
}

.cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-dot {
  font-size: 10px;
  line-height: 1;
}

.good-day .cal-dot { color: var(--good-day); }
.bad-day .cal-dot { color: var(--bad-day); }

.solar-day {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.good-day .solar-day { color: var(--good-day); }
.bad-day .solar-day { color: var(--bad-day); }

.cal-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.lunar-day {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.lunar-day.first-day {
  color: var(--good-day);
  font-weight: 800;
}

.canchi-day {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
}

.legend-good { color: var(--good-day); }
.legend-bad { color: var(--bad-day); }

/* Compact Calendar (Trang Năm) */
.calendar-table.compact td {
  height: 52px;
  padding: 4px;
}
.calendar-table.compact .solar-day { font-size: 15px; }
.calendar-table.compact .lunar-day { font-size: 11px; }
.calendar-table.compact .canchi-day { display: none; }

/* ==========================================================================
   BẢNG PHONG THỦY 11 DÒNG (XEM TỐT XẤU NGÀY)
   ========================================================================== */
/* ==========================================================================
   DAY SWITCHER & QUICK DATE STRIP (ĐIỀU HƯỚNG NHẢY NGÀY LẦN LƯỢT)
   ========================================================================== */
.day-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.day-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.day-switch-btn:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.day-switch-current {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
}

.date-strip-wrap {
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.date-strip {
  display: flex;
  gap: 8px;
  list-style: none;
  min-width: max-content;
}

.date-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  padding: 8px 4px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.date-strip-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}

.date-strip-item.active {
  background: var(--primary);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.3);
}

.date-strip-item .strip-weekday {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.date-strip-item.active .strip-weekday {
  color: rgba(255, 255, 255, 0.9);
}

.date-strip-item .strip-solar {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.date-strip-item.active .strip-solar {
  color: #fff;
}

.date-strip-item .strip-lunar {
  font-size: 11px;
  font-weight: 600;
  color: var(--good-day);
}

.date-strip-item.active .strip-lunar {
  color: #fef08a;
}

.keyboard-hint {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  margin-top: -10px;
  margin-bottom: 20px;
}

.fortune-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-bottom: 30px;
}

.fortune-table {
  width: 100%;
  border-collapse: collapse;
}

.fortune-table tr {
  border-bottom: 1px solid var(--border-color);
}

.fortune-table tr:last-child {
  border-bottom: none;
}

.fortune-table th {
  width: 220px;
  padding: 16px 14px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--primary-dark);
  background: #f8fafc;
  vertical-align: top;
  border-right: 1px solid var(--border-color);
}

.fortune-table td {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-main);
}

.badge-tag-good {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--good-day-bg);
  color: var(--good-day);
  border: 1px solid var(--good-day-border);
}

.badge-tag-bad {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--bad-day-bg);
  color: var(--bad-day);
  border: 1px solid var(--bad-day-border);
}

.day-nav-prev-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-color);
}

.day-nav-prev-next a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-main);
}

.day-nav-prev-next a:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ==========================================================================
   MONTH & YEAR PAGE COMPONENTS
   ========================================================================== */
.pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0 25px;
}

.pills-grid a {
  display: inline-block;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.pills-grid a:hover {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.pills-grid.good a {
  border-left: 3px solid var(--good-day);
}

.pills-grid.bad a {
  border-left: 3px solid var(--bad-day);
}

.months-12-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.month-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.month-card-header {
  margin-bottom: 12px;
  text-align: center;
}

.month-card-header h4 a {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
}

.zodiac-card {
  display: flex;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 25px;
}

.zodiac-icon-box {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}

.zodiac-info h4 {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

/* ==========================================================================
   CONVERTER & TIENG VIET MOI APPS
   ========================================================================== */
.converter-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.form-group-radio {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.date-inputs-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.select-control {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background: #fff;
}

.btn-convert-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 28px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
  transition: all 0.2s ease;
}

.btn-convert-submit:hover {
  background: var(--primary-dark);
}

.result-card {
  margin-top: 25px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
}

.result-card .result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.result-card .result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: center;
  margin-bottom: 18px;
}

.result-card .big-date {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary-dark);
}

.result-card .lunar-col .big-date {
  color: var(--good-day);
}

/* Tiếng Việt mới */
.tv-app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.tv-textarea {
  width: 100%;
  min-height: 180px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}

.tv-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

.tv-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-action {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: #fff;
  transition: all 0.2s ease;
}

.btn-action.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

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

.toast-msg {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--text-main);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 2000;
}

.toast-msg.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Quick Jump Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 440px;
  padding: 28px;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: all 0.2s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 50px 0 30px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h5 {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #334155;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #94a3b8;
  font-size: 13.5px;
}

.footer-col ul li a:hover {
  color: #38bdf8;
  text-decoration: none;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}

.footer-about {
  max-width: 700px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 12px;
  list-style: none;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #1e293b;
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
}

.social-links a:hover {
  background: var(--primary);
  text-decoration: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 992px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-toggle {
    display: block;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 15px;
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }

  .months-12-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tv-app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-title-area h1 {
    font-size: 24px;
  }

  .summary-dual-card {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .summary-col .huge-date {
    font-size: 48px;
  }

  .calendar-table {
    border-spacing: 2px;
  }

  .calendar-table th {
    font-size: 11px;
    padding: 6px 2px;
  }

  .calendar-table td {
    height: 60px;
    padding: 3px;
  }

  .solar-day {
    font-size: 16px;
  }

  .lunar-day {
    font-size: 11px;
  }

  .canchi-day {
    display: none;
  }

  .fortune-table th {
    width: 100%;
    display: block;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .fortune-table td {
    display: block;
  }

  .months-12-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   HTML SITEMAP BEAUTIFUL STYLES
   ========================================================================== */
.sitemap-section {
  margin-bottom: 24px;
}

.sitemap-grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.sitemap-card-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.sitemap-card-link:hover {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sitemap-card-icon {
  font-size: 26px;
  flex-shrink: 0;
  line-height: 1;
}

.sitemap-card-link h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.sitemap-card-link p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.sitemap-years-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sitemap-year-block {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  transition: var(--transition);
}

.sitemap-year-block:hover {
  border-color: var(--primary-light);
}

.sitemap-year-header {
  margin-bottom: 10px;
}

.sitemap-year-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sitemap-year-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.sitemap-months-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sitemap-months-pills a {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition);
}

.sitemap-months-pills a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.sitemap-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}

.sitemap-posts-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 14px;
  color: var(--text-main);
  transition: var(--transition);
}

.sitemap-posts-list li a:hover {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.sitemap-posts-list .post-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 10px;
}

.sitemap-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.sitemap-pages-grid a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.sitemap-pages-grid a:hover {
  background: #ffffff;
  border-color: var(--primary);
}

.sitemap-pages-grid a strong {
  font-size: 14.5px;
  color: var(--primary-dark);
}

.sitemap-pages-grid a span {
  font-size: 12.5px;
  color: var(--text-muted);
}

.sitemap-xml-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.xml-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  background: #ffffff;
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius-full);
  color: var(--primary-dark);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.xml-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.xml-pill.main {
  background: var(--primary);
  border-color: var(--primary-dark);
  color: #ffffff;
}

