/* ========================================================
   GLOBAL CLAVIS - NỀN TẢNG TIỆN ÍCH TOÀN NĂNG & ĐỜI SỐNG SỐ
   MÀU CHỦ ĐẠO: VÀNG CAM & TÍM (GOLDEN AMBER & ROYAL PURPLE)
   ======================================================== */
:root {
  --bg-dark: #090c15;
  --bg-card: #111726;
  --bg-card-hover: #192237;
  --border-color: #242c42;
  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --primary: #a855f7; /* Tím hoàng gia rực rỡ */
  --primary-hover: #9333ea;
  --accent: #f59e0b; /* Vàng cam hổ phách */
  --accent-hover: #d97706;
  --purple: #a855f7;
  --purple-light: #c084fc;
  --purple-dark: #6b21a8;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #b45309;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 10% 12%, rgba(168, 85, 247, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 90% 18%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(168, 85, 247, 0.06) 0%, transparent 55%);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==================== HEADER ==================== */
.app-header {
  background-color: rgba(18, 24, 36, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.header-nav-bar {
  display: flex;
  width: 100%;
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-badge {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav {
  display: flex;
  align-items: center;
  background-color: #0d121c;
  padding: 4px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  gap: 4px;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

/* ==================== CHUẨN HÓA 10 NÚT TAB CÙNG 1 KIỂU ĐỒNG NHẤT ==================== */
.nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font-size: 11.2px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  flex: 0 0 auto;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  user-select: none;
}

.nav-btn:hover {
  filter: brightness(1.25);
  transform: translateY(-1px);
}

/* 1. Quét Link Lừa Đảo */
.nav-btn.tab-btn-antiscam {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(168, 85, 247, 0.14));
  border-color: rgba(239, 68, 68, 0.55);
  color: #f87171;
}

/* 2. Tiện Ích Tài Chính */
.nav-btn.tab-btn-tools {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(56, 189, 248, 0.14));
  border-color: rgba(16, 185, 129, 0.55);
  color: #34d399;
}

/* 3. Ghép & Nén File A4 */
.nav-btn.tab-btn-file_tools {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.14));
  border-color: rgba(14, 165, 233, 0.55);
  color: #38bdf8;
}

/* 4. Standee Biển QR */
.nav-btn.tab-btn-standee {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.14));
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}

/* 5. Kho 50+ Hợp Đồng */
.nav-btn.tab-btn-resources {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.14));
  border-color: rgba(99, 102, 241, 0.55);
  color: #a5b4fc;
}

/* 7. Chữa Lành & Tâm Sự */
.nav-btn.tab-btn-healing {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(56, 189, 248, 0.14));
  border-color: rgba(20, 184, 166, 0.55);
  color: #2dd4bf;
}

/* 8. Sàn Rao Vặt (VIP) */
.nav-btn.tab-btn-classifieds {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(239, 68, 68, 0.14));
  border-color: rgba(249, 115, 22, 0.55);
  color: #fb923c;
}

/* 9. Lịch Âm & Tử Vi */
.nav-btn.tab-btn-horoscope {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(236, 72, 153, 0.14));
  border-color: rgba(168, 85, 247, 0.55);
  color: #c084fc;
}

/* 10. Đi Chùa Online */
.nav-btn.tab-btn-pagoda {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.16));
  border-color: rgba(245, 158, 11, 0.6);
  color: #fef08a;
}

/* Trạng thái Tab Đang Được Chọn (ACTIVE) */
.nav-btn.active {
  background: linear-gradient(135deg, #a855f7, #f59e0b) !important;
  color: #ffffff !important;
  border-color: #fef08a !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.55), 0 2px 8px rgba(168, 85, 247, 0.45) !important;
  transform: translateY(-1px);
}

@media (max-width: 1360px) {
  .main-nav {
    gap: 3px;
    padding: 4px;
  }
  .nav-btn {
    font-size: 10.8px;
    padding: 5px 6px;
    gap: 3px;
    border-radius: 5px;
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #a855f7, #f59e0b);
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #9333ea, #d97706);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background-color: var(--success-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-card-hover);
  border-color: #3b4860;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.btn-icon:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* ==================== LAYOUT & CONTAINERS ==================== */
.main-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 20px 40px 20px;
  flex: 1;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px auto;
}

.section-hero h1 {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.section-hero p {
  color: var(--text-muted);
  font-size: 15px;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(245, 158, 11, 0.18));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.hero-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Sub-nav for tools */
.sub-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.sub-nav-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-nav-btn:hover {
  background-color: var(--bg-card-hover);
  color: #fff;
}

.sub-nav-btn.active {
  background-color: rgba(56, 139, 253, 0.15);
  border-color: var(--primary);
  color: #fff;
}

.tool-sub-pane {
  display: none;
}
.tool-sub-pane.active {
  display: block;
}

/* Grid Layouts */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-2-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.max-w-700 {
  max-width: 700px;
  margin: 0 auto;
}

.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ccd6e6;
  margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  background-color: #0d121c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 139, 253, 0.2);
}

.input-lg {
  font-size: 16px !important;
  padding: 14px 18px !important;
}

.input-with-badge {
  position: relative;
}

.input-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(56, 139, 253, 0.15);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
}

.quick-chips {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quick-chips button {
  background: #182030;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-chips button:hover {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--primary);
}

/* Loan summary cards */
.summary-stat-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  background: #0d121c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-box.primary {
  background: rgba(56, 139, 253, 0.08);
  border-color: rgba(56, 139, 253, 0.35);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* Bank Affiliate Banner */
.bank-affiliate-box {
  background: linear-gradient(135deg, rgba(240, 136, 62, 0.12), rgba(18, 24, 36, 0.6));
  border: 1px solid rgba(240, 136, 62, 0.35);
  border-radius: var(--radius-md);
  padding: 18px;
}

.affiliate-badge {
  display: inline-block;
  background: rgba(240, 136, 62, 0.2);
  color: #ff9933;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.bank-affiliate-box h4 {
  font-size: 15px;
  color: #fff;
  margin-bottom: 6px;
}

.bank-affiliate-box p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Data Table */
.table-responsive {
  overflow-x: auto;
  max-height: 480px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: right;
}

.data-table th, .data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: #0d121c;
  color: var(--text-muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table td:first-child, .data-table th:first-child {
  text-align: center;
}

.data-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Result box (Num2Words) */
.result-box {
  background-color: #0d121c;
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.result-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.result-text {
  font-size: 18px;
  font-weight: 700;
  color: #4ade80;
  line-height: 1.6;
}

/* Salary result */
.net-salary-highlight {
  font-size: 32px;
  font-weight: 800;
  color: #4ade80;
  margin-bottom: 16px;
  text-align: center;
  padding: 16px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: var(--radius-md);
}

.salary-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: #0d121c;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ==================== TAB 2: STANDEE GENERATOR ==================== */
.grid-standee-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: start;
}

.theme-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.theme-choice-btn {
  background-color: #0d121c;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-choice-btn:hover {
  background-color: var(--bg-card-hover);
  color: #fff;
}

.theme-choice-btn.active {
  background-color: rgba(56, 139, 253, 0.15);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 139, 253, 0.25);
}

.standee-actions-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.standee-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.canvas-container {
  background-color: #0d121c;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

#standee-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* ==================== TAB 3: RESOURCE STORE ==================== */
.resource-control-bar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.category-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cat-pill {
  background-color: #0d121c;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.cat-pill:hover {
  color: #fff;
  border-color: #3b4860;
}

.cat-pill.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.resource-item-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.resource-item-card:hover {
  transform: translateY(-2px);
  border-color: #3b4860;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.resource-item-card.vip-card {
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.98));
}
.resource-item-card.vip-card:hover {
  border-color: #fbbf24;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.resource-item-card.basic-card {
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.res-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.res-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.res-icon.docx { background: rgba(56, 139, 253, 0.15); color: #388bfd; }
.res-icon.xlsx { background: rgba(46, 160, 67, 0.15); color: #2ea043; }

.res-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.res-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.res-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

.res-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.res-badge {
  font-size: 11px;
  background-color: rgba(46, 160, 67, 0.15);
  color: #4ade80;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==================== MODALS ==================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  padding: 16px;
  overflow-y: auto;
  cursor: pointer;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 520px;
  max-width: 95%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: modalScale 0.25s ease;
  cursor: default;
  position: relative;
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Payment Modal Specifics */
.payment-modal-content {
  width: 520px;
  text-align: center;
}

.payment-header {
  margin-bottom: 20px;
}

.pay-badge {
  display: inline-block;
  background: rgba(240, 136, 62, 0.15);
  color: #ff9933;
  border: 1px solid rgba(240, 136, 62, 0.35);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.payment-header h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 6px;
}

.pay-amount {
  font-size: 26px;
  font-weight: 800;
  color: #4ade80;
}

.payment-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.qr-box {
  background-color: #fff;
  padding: 14px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  max-width: 250px;
}

#pay-qr-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: block;
}

.qr-instruction {
  font-size: 11px;
  color: #333;
  margin-top: 8px;
  font-weight: 600;
  line-height: 1.4;
}

.transfer-info-box {
  width: 100%;
  background-color: #0d121c;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  text-align: left;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.info-row.highlight {
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
  margin-bottom: 0;
  font-size: 13px;
}

.payment-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Bank Loan Offers List (High CPA Affiliate) */
.bank-loan-offers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.loan-offer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  gap: 12px;
}

.loan-bank-info {
  font-size: 13px;
  color: #fff;
}

.deal-tag {
  display: inline-block;
  background: rgba(255, 75, 43, 0.18);
  color: #ff5252;
  border: 1px solid rgba(255, 75, 43, 0.4);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.deal-tag.hot {
  background: rgba(255, 153, 0, 0.18);
  color: #ffaa00;
  border-color: rgba(255, 153, 0, 0.4);
}

.deal-tag.green {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border-color: rgba(0, 230, 118, 0.3);
}

.deal-tag.blue {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  border-color: rgba(0, 242, 254, 0.3);
}

.loan-sub-text {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* AdSense Mockup Container */
.adsense-banner-wrap {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px dashed rgba(56, 139, 253, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.ads-label {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.adsense-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Affiliate card small (Standee MB Bank) */
.card-affiliate-small {
  background: linear-gradient(135deg, rgba(56, 139, 253, 0.12), rgba(18, 24, 36, 0.6));
  border: 1px solid rgba(56, 139, 253, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.aff-icon {
  font-size: 26px;
}

.aff-text {
  flex: 1;
}

.aff-text strong {
  font-size: 13px;
  color: #fff;
}

.aff-text p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom Contract Drafting Service Card */
.card-custom-service {
  background: linear-gradient(135deg, rgba(46, 160, 67, 0.12), rgba(18, 24, 36, 0.8));
  border: 1px solid rgba(46, 160, 67, 0.35);
}

.custom-service-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* ==================== FOOTER ==================== */
.app-footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-card);
  padding: 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 12px;
}

/* ==================== MOBILE BOTTOM NAVIGATION BAR & DRAWER ==================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 9999;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 8px;
  cursor: pointer;
  flex: 1;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.mob-nav-item .mob-icon {
  font-size: 19px;
  line-height: 1.2;
}

.mob-nav-item .mob-label {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
}

.mob-nav-item.active {
  color: #f59e0b;
}

.mob-nav-item.active .mob-icon {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
  color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.7);
}

.mob-nav-item.active .mob-label {
  color: #c084fc;
  font-weight: 700;
}

.mob-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 18px;
  height: 3px;
  background: linear-gradient(90deg, #a855f7, #f59e0b);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

/* Mobile Drawer (Menu trượt chuyên nghiệp cho mobile) */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.active {
  display: block;
  opacity: 1;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 25px rgba(0, 0, 0, 0.6);
}

.mobile-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #1e293b;
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mob-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mob-drawer-link:hover, .mob-drawer-link.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.mob-drawer-link .mob-drawer-icon {
  font-size: 18px;
}

/* ==================== RESPONSIVE RULES ==================== */
@media (max-width: 1024px) {
  .header-container {
    padding: 10px 16px;
    gap: 10px;
  }
  .main-nav {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .grid-2-col, .grid-standee-layout {
    grid-template-columns: 1fr;
  }
  
  /* Show Mobile Bottom Bar */
  .mobile-bottom-nav {
    display: flex;
  }
  
  /* Show Hamburger in header */
  .mobile-menu-toggle {
    display: inline-flex;
  }
  
  /* Hide desktop horizontal menu on smaller screens to keep header ultra clean */
  .main-nav {
    display: none;
  }
  
  /* Header right: compact view */
  .header-right {
    gap: 8px;
  }
  .header-right .btn-outline,
  .header-right .btn-primary {
    display: none; /* Accessible via mobile drawer */
  }
  
  /* Add safe padding for fixed bottom nav */
  body {
    padding-bottom: 70px;
  }
  .main-container {
    padding: 16px 12px 30px 12px;
  }
  
  /* Standee Preview Column Responsive */
  .standee-preview-container {
    padding: 20px 10px;
  }
  
  /* Tu Vi 12 Palaces: 2 columns on mobile instead of 4 */
  #tuvi-grid-12 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Calendar bloc: full width stack */
  #horo-panel-calendar > div {
    grid-template-columns: 1fr !important;
  }
  
  .section-hero {
    padding: 16px 14px;
    margin-bottom: 16px;
  }
  .section-hero h1 {
    font-size: 20px;
  }
}

#btn-header-vip-39k .vip-short-text {
  display: none;
}
#btn-header-vip-39k .vip-full-text {
  display: inline;
}

@media (max-width: 600px) {
  .header-container {
    padding: 8px 10px;
  }
  .header-top-bar {
    gap: 8px;
    padding-right: 6px;
  }
  .header-right {
    gap: 6px;
  }
  .logo img {
    width: 30px !important;
    height: 30px !important;
  }
  .logo-badge {
    font-size: 15px !important;
  }
  .logo-sub {
    display: none;
  }
  #btn-header-vip-39k {
    font-size: 11px !important;
    padding: 6px 8px !important;
  }
  #btn-header-vip-39k .vip-full-text {
    display: none;
  }
  #btn-header-vip-39k .vip-short-text {
    display: inline;
  }
  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    font-size: 18px;
    flex-shrink: 0;
  }
  .grid-2-inputs {
    grid-template-columns: 1fr;
  }
  .modal-content {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto;
    padding: 14px !important;
  }
}

/* ==================== PREVIEW A4 PAPER MODAL ==================== */
.preview-a4-paper {
  background: #ffffff;
  color: #111111;
  padding: 35px 45px;
  border-radius: 4px;
  max-height: 480px;
  overflow-y: auto;
  font-family: "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.65;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid #ddd;
}

.prev-p {
  margin-bottom: 10px;
  color: #111;
}

.prev-p.heading {
  font-weight: bold;
  color: #000;
}

.prev-p.center {
  text-align: center;
}

/* ==================== REWARDED ADS & AD STYLES ==================== */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
}
.btn-warning:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.ad-countdown-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 16px;
  text-align: center;
}

.ad-timer-badge {
  display: inline-block;
  background: #f59e0b;
  color: #111;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 14px;
}

.ad-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.ad-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  transition: width 1s linear;
}

.ad-sponsor-display {
  background: #0f172a;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.ad-sponsor-tag {
  position: absolute;
  top: 8px;
  left: 10px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ad-banner-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  cursor: pointer;
  transition: transform 0.2s;
}
.ad-banner-link:hover {
  transform: scale(1.01);
}

.ad-banner-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
}

.standee-bank-grid {
  display: grid;
  grid-template-columns: 1fr 145px;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .standee-bank-grid {
    grid-template-columns: 1fr;
  }
}

.bank-deal-pill {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}
.bank-deal-pill:hover {
  color: #fff;
  border-color: #38bdf8;
}
.bank-deal-pill.active {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
  font-weight: 700;
}

/* ==================== HEALING & WOODEN FISH STYLES ==================== */
.wooden-fish-wrapper {
  width: 140px;
  height: 140px;
  margin: 10px auto;
  background: radial-gradient(circle, #78350f, #451a03);
  border: 4px solid #b45309;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.3);
  user-select: none;
  transition: transform 0.08s ease-in-out;
}
.wooden-fish-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(245, 158, 11, 0.5);
}
.wooden-fish-wrapper:active {
  transform: scale(0.92);
}

.wooden-fish-icon {
  font-size: 52px;
  line-height: 1;
}
.wooden-fish-sub {
  font-size: 10px;
  font-weight: 700;
  color: #fef3c7;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Floating merit/peace text animation */
.floating-merit-text {
  position: fixed;
  color: #facc15;
  font-weight: 800;
  font-size: 17px;
  pointer-events: none;
  animation: floatUpFade 1.3s forwards cubic-bezier(0.22, 1, 0.36, 1);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 15px rgba(250, 204, 21, 0.6);
  z-index: 999999;
  white-space: nowrap;
  user-select: none;
}

@keyframes floatUpFade {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translateY(-20px) scale(1.15);
  }
  70% {
    opacity: 0.95;
    transform: translateY(-60px) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateY(-95px) scale(0.9);
  }
}

/* Confession Card */
.confess-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s;
}
.confess-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.confess-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.confess-mood-tag {
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 2px 8px;
  border-radius: 12px;
}

.confess-content-text {
  font-size: 13.5px;
  color: #f8fafc;
  line-height: 1.6;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.confess-comments-list {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.confess-comment-item {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
}

.confess-comment-author {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 6px;
}

/* ======================================================== */
/* FILE TOOLS: PAGE THUMBNAILS GRID & DRAG-AND-DROP REORDER */
/* ======================================================== */
.tool-page-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transition: transform 0.2s ease;
}

.tool-page-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.414;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.25);
  border: 2px solid transparent;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  user-select: none;
}

.tool-page-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 10px rgba(56,189,248,0.35);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
}

.tool-page-card:active {
  cursor: grabbing;
}

.tool-page-card.dragging {
  opacity: 0.35;
  transform: scale(0.92);
  border: 2px dashed #94a3b8;
}

.tool-page-card.drag-over {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.8) !important;
  transform: scale(1.05);
}

.tool-page-card-overlay {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  z-index: 10;
  transition: opacity 0.15s ease;
}

.tool-page-nav-overlay {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.tool-page-nav-btn {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.tool-page-nav-btn:hover {
  background: #0ea5e9;
  border-color: #38bdf8;
}

/* ======================================================== */
/* LỊCH THÁNG ÂM DƯƠNG (MONTHLY LUNAR-SOLAR CALENDAR GRID)  */
/* ======================================================== */
.month-calendar-container {
  background: linear-gradient(180deg, #111726 0%, #0d121f 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

.month-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.month-weekday-cell {
  text-align: center;
  padding: 8px 2px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}

.month-weekday-cell.saturday {
  color: #fbbf24;
}

.month-weekday-cell.sunday {
  color: #ef4444;
}

.month-day-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  min-height: 56px;
  padding: 5px 3px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  user-select: none;
}

.month-day-cell:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

.month-day-cell.other-month {
  opacity: 0.28;
}

.month-day-cell.today {
  border: 2px solid #a855f7 !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.6);
  background: rgba(168, 85, 247, 0.14);
}

.month-day-cell.selected {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.16);
}

.month-day-solar {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.month-day-lunar {
  font-size: 10.5px;
  color: #94a3b8;
  font-weight: 600;
}

.month-day-lunar.special {
  color: #f59e0b;
  font-weight: 800;
}

.month-day-badge {
  font-size: 9px;
  color: #34d399;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ======================================================== */
/* 🛕 CHÙA TẠI TÂM: CỔNG TAM QUAN, ĐẠI PHẬT, HÀO QUANG & SÂN THIỀN */
/* ======================================================== */
.pagoda-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, #201726 0%, #0d0914 70%, #06040a 100%);
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 80px rgba(245, 158, 11, 0.05);
  min-height: 750px;
  color: #f8fafc;
}

/* CẢNH 1: CỔNG TAM QUAN (CỬA CHÙA) */
.pagoda-gate-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  min-height: 720px;
  background: radial-gradient(circle at 50% 30%, rgba(245, 158, 11, 0.12), transparent 70%);
}

.pagoda-roof {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: 90px;
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 60%, #450a0a 100%);
  border-radius: 120px 120px 0 0;
  border-top: 4px solid #fbbf24;
  box-shadow: 0 12px 30px rgba(0,0,0,0.7), 0 0 25px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagoda-roof::before, .pagoda-roof::after {
  content: "🏮";
  position: absolute;
  top: 15px;
  font-size: 26px;
  filter: drop-shadow(0 0 10px #f59e0b);
}
.pagoda-roof::before { left: 24px; }
.pagoda-roof::after { right: 24px; }

.pagoda-board {
  background: #450a0a;
  border: 2px solid #f59e0b;
  border-radius: 8px;
  padding: 6px 28px;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  display: inline-block;
}

.pagoda-board-text {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #fef08a, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
}

.pagoda-pillars-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 680px;
  position: relative;
  min-height: 400px;
}

.pagoda-pillar {
  width: 70px;
  background: linear-gradient(90deg, #7f1d1d, #991b1b, #450a0a);
  border: 1px solid rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 8px;
}

.pagoda-couplet {
  writing-mode: vertical-rl;
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 700;
  color: #fef08a;
  letter-spacing: 6px;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

/* CÁNH CỬA CHÙA TẠI TÂM */
.pagoda-gate-doors {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #2a1622 0%, #150917 100%);
  border-top: 6px solid #b45309;
  border-bottom: 8px solid #78350f;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.9);
  transition: all 0.3s ease;
}

.pagoda-gate-doors:hover {
  box-shadow: inset 0 0 50px rgba(245, 158, 11, 0.25), 0 0 30px rgba(245, 158, 11, 0.3);
}

.pagoda-door-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  z-index: 5;
  transition: transform 0.4s ease;
}

.pagoda-door-icon {
  font-size: 72px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.7));
  animation: pulse-aura 3s infinite ease-in-out;
}

.btn-enter-pagoda {
  background: linear-gradient(135deg, #f59e0b, #d97706, #b45309);
  color: #fff;
  border: 2px solid #fef08a;
  border-radius: 30px;
  padding: 14px 34px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5), 0 0 15px rgba(245, 158, 11, 0.4);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-enter-pagoda:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.8), 0 0 25px #fef08a;
}

/* THANH PHÁT NHẠC THIỀN */
.pagoda-zen-audio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 20, 40, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  margin-top: 24px;
  width: 100%;
  max-width: 680px;
  backdrop-filter: blur(8px);
}

/* ======================================================== */
/* CẢNH 2: SÂN THIỀN LỘ THIÊN NGOÀI TRỜI TRÊN ĐỈNH NÚI */
/* ======================================================== */
.pagoda-sanctuary-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 40px 12px;
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  box-sizing: border-box;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 20%, #334155 50%, #475569 80%, #64748b 100%);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
}

/* KHỐI ĐẠI TƯỢNG PHẬT LỘ THIÊN NÚI CAO (CĂN GIỮA TOÀN BỘ) */
.pagoda-altar-fixed {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0;
  flex-shrink: 0;
}

.buddha-scenery-container {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  background: #020617;
}

.buddha-statue-photo {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 10s ease;
}

.buddha-scenery-container:hover .buddha-statue-photo {
  transform: scale(1.02);
}

.buddha-sunbeam-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 25%, rgba(254, 240, 138, 0.25) 0%, rgba(245, 158, 11, 0.15) 35%, transparent 70%),
              linear-gradient(to bottom, transparent 65%, rgba(15, 23, 42, 0.85) 100%);
}

.buddha-title-plate {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 20px 10px 20px;
  text-align: center;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.65) 70%, transparent 100%);
  pointer-events: none;
}

.buddha-title-main {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.9), 0 2px 4px rgba(0,0,0,0.9);
}

.buddha-title-sub {
  font-size: 12.5px;
  color: #e2e8f0;
  margin-top: 4px;
  font-style: italic;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* KHỐI LƯ HƯƠNG ĐỒNG KHỔNG LỒ & HÒM CÔNG ĐỨC TRÊN BỆ SÂN (CÁCH BIỆT RÕ RÀNG) */
.pagoda-burner-row {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.incense-burner-main {
  position: relative;
  background: radial-gradient(circle, #78350f 0%, #451a03 70%, #1c0a00 100%);
  border: 3px solid #fbbf24;
  border-radius: 20px 20px 40px 40px;
  padding: 12px 28px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.7), 0 0 20px rgba(245, 158, 11, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 250px;
}

.incense-burner-smoke {
  position: absolute;
  top: -30px;
  font-size: 26px;
  animation: smoke-rise 2.5s infinite ease-in-out;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(254, 240, 138, 0.8));
}

.donation-box-card {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 15px rgba(245, 158, 11, 0.3);
  transition: all 0.25s ease;
}

.donation-box-card:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: #fef08a;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.6);
}

/* KHỐI SÂN THIỀN ĐÁ LỘ THIÊN NGOÀI TRỜI (THEO ĐÚNG MẶT SÂN ĐÁ VÀ BỒ ĐOÀN TRONG ẢNH) */
.pagoda-courtyard-section {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  box-sizing: border-box;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 25%, #cbd5e1 75%, #b0bec5 100%);
  border: 4px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 20px 16px 30px 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.5), inset 0 2px 10px rgba(255,255,255,0.6);
  overflow-x: auto;
  position: relative;
}

.courtyard-persp-container {
  min-width: 680px;
  max-width: 880px;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.courtyard-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  transition: all 0.3s ease;
}

.courtyard-half-wing {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  flex: 1;
}

.courtyard-center-walkway {
  width: 52px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
  border-left: 2px dashed #94a3b8;
  border-right: 2px dashed #94a3b8;
  border-radius: 4px;
  height: 100%;
  min-height: 86px;
  user-select: none;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.06);
}

.walkway-lotus-tile {
  font-size: 16px;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  filter: drop-shadow(0 1px 3px rgba(180, 83, 9, 0.4));
  animation: gentle-pulse 4s infinite ease-in-out;
}

.walkway-label {
  font-size: 9px;
  color: #78350f;
  letter-spacing: 1px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  margin-top: 2px;
  font-weight: 800;
  opacity: 0.85;
}

/* Ô BỒ ĐOÀN THIỀN TỌA TRÊN NỀN SÂN ĐÁ NGOÀI TRỜI */
.pagoda-seat-item {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 8px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 86px;
  transition: all 0.25s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12), inset 0 1px 2px #fff;
}

.pagoda-seat-item:hover {
  background: #ffffff;
  border-color: #f59e0b;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(180, 83, 9, 0.35);
}

/* Ô trống mô phỏng bồ đoàn nâu đồng như trong ảnh mẫu thật */
.seat-cushion-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, #632d15 0%, #3e1b0c 100%);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 1px 2px rgba(254, 215, 170, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #78350f;
  margin-bottom: 3px;
  transition: all 0.2s ease;
}

.pagoda-seat-item:hover .seat-cushion-wrapper {
  border-color: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
}

.seat-cushion-inner {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, #b45309 0%, #78350f 70%, #451a03 100%);
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(254, 240, 138, 0.5), 0 2px 4px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  color: #fef08a;
}

.seat-badge-num {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 9.5px;
  font-weight: 800;
  color: #475569;
  font-family: monospace;
}

.seat-action-prompt {
  font-size: 9.5px;
  color: #78350f;
  font-weight: 800;
  text-align: center;
}

/* Ô ĐANG CÓ NGƯỜI NGỒI */
.pagoda-seat-item.occupied {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.pagoda-seat-item.is-me {
  border: 2.5px solid #059669 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.7) !important;
  background: #ecfdf5 !important;
}

.seat-occupant-avatar {
  position: relative;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.seat-incense-smoke {
  position: absolute;
  top: -12px;
  right: -10px;
  font-size: 14px;
  animation: smoke-rise 2s infinite ease-in-out;
}

.seat-occupant-name {
  font-size: 10.5px;
  font-weight: 800;
  color: #9a3412;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95%;
}

.seat-countdown {
  font-size: 9.5px;
  color: #b45309;
  font-weight: 800;
  margin-top: 2px;
  font-family: monospace;
}

.btn-leave-seat {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 4px;
  font-size: 8.5px;
  padding: 1px 4px;
  margin-top: 3px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-leave-seat:hover {
  background: #ef4444;
  color: #fff;
}

.seat-timer {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: rgba(0,0,0,0.5);
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.seat-empty-label {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

/* ANIMATIONS */
@keyframes spin-halo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse-aura {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.6)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 35px rgba(245, 158, 11, 0.9)); }
}

@keyframes float-buddha {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes smoke-rise {
  0% { opacity: 0; transform: translateY(5px) scale(0.8); }
  50% { opacity: 0.9; transform: translateY(-10px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-25px) scale(1.4); }
}









/* ==================== SEO ARTICLES, FAQ & POLICY STYLES (ADSENSE HIGH VALUE CONTENT) ==================== */
.tool-seo-guide {
  margin-top: 36px;
  padding: 30px 24px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #cbd5e1;
  line-height: 1.75;
}
.tool-seo-guide h3 {
  font-size: 19px;
  color: #f8fafc;
  margin-bottom: 12px;
  font-weight: 700;
}
.tool-seo-guide h4 {
  font-size: 16px;
  color: #38bdf8;
  margin: 20px 0 12px 0;
  font-weight: 700;
}
.tool-seo-guide p {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 14px;
  line-height: 1.7;
}
.tool-seo-guide ol, .tool-seo-guide ul {
  padding-left: 22px;
  margin-bottom: 18px;
}
.tool-seo-guide li {
  font-size: 13.5px;
  color: #cbd5e1;
  margin-bottom: 8px;
  line-height: 1.6;
}
.tool-seo-guide .guide-faq {
  margin-top: 26px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 20px;
}
.tool-seo-guide .faq-item {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.tool-seo-guide .faq-item:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(30, 41, 59, 0.75);
}
.tool-seo-guide .faq-item strong {
  display: block;
  color: #fbbf24;
  font-size: 14.5px;
  margin-bottom: 6px;
  font-weight: 600;
}
.tool-seo-guide .faq-item p {
  margin-bottom: 0;
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.65;
}

/* ==================== WOODEN FISH SAFE ZONE (INVALID TRAFFIC DEFENSE) ==================== */
.wooden-fish-safe-zone {
  position: relative;
  isolation: isolate;
  transition: transform 0.2s ease;
}
.adsense-safe-boundary {
  position: relative;
  clear: both;
}
.adsense-safe-boundary .safe-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
}

/* ==================== POLICY PAGES VIEW ==================== */
.policy-page-pane {
  display: none;
  animation: fadeInPolicy 0.3s ease;
}
@keyframes fadeInPolicy {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.policy-container {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
.policy-content h3 {
  font-size: 17px;
  font-weight: 700;
}
.policy-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}
.policy-content li {
  margin-bottom: 8px;
}

/* ==================== FOOTER POLICY LINKS ==================== */
.footer-policy-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-policy-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}


/* ==================== GLOBAL BIZKIT BRAND LOCKUP (MẪU CHUẨN ĐỒNG BỘ) ==================== */
.logo-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  transition: transform 0.2s ease;
  line-height: 1.15;
}
.logo-lockup:hover {
  transform: translateY(-1px);
}
.logo-top-tag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 3px;
  line-height: 1;
  text-align: center;
}
.logo-center-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1;
}
.logo-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.5));
  border-radius: 8px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.logo-lockup:hover .logo-icon-img {
  transform: scale(1.05);
}
.logo-badge-text {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.brand-global {
  color: #c084fc;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(192, 132, 252, 0.45);
}
.brand-bizkit {
  color: #f59e0b;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
}
.logo-bottom-slogan {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.8px;
  margin-top: 3px;
  line-height: 1;
  text-align: center;
}

@media (max-width: 768px) {
  .logo-top-tag {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .logo-icon-img {
    width: 28px !important;
    height: 28px !important;
  }
  .logo-badge-text {
    font-size: 17px !important;
  }
  .logo-bottom-slogan {
    font-size: 9.5px;
  }
}


/* ===== BẢN THỰC TẾ: LƯ HƯƠNG ĐỒNG, QUE HƯƠNG, NGƯỜI HÀNH LỄ ===== */
.incense-burner-main {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  min-width: 300px;
}
.incense-burner-art { width: 320px; max-width: 90vw; margin: 0 auto; }
.incense-burner-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.45)); }
.incense-ember { filter: drop-shadow(0 0 3px #ff9a3c); animation: ember-glow 1.6s ease-in-out infinite; }
@keyframes ember-glow { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.incense-smoke-line {
  fill: none; stroke: rgba(235, 235, 235, 0.55); stroke-width: 1.4; stroke-linecap: round;
  stroke-dasharray: 90; stroke-dashoffset: 90;
  animation: smoke-curl 5s ease-in-out infinite;
}
@keyframes smoke-curl {
  0% { stroke-dashoffset: 90; opacity: 0; }
  25% { opacity: 0.8; }
  100% { stroke-dashoffset: -90; opacity: 0; transform: translateY(-14px); }
}

/* Ô ngồi: bỏ khung thẻ, người ngồi trực tiếp trên bồ đoàn giữa sân đá */
.pagoda-seat-item, .pagoda-seat-item.occupied, .pagoda-seat-item.is-me {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.pagoda-seat-item.is-me .seat-occupant-name { color: #047857; text-shadow: 0 0 6px rgba(16,185,129,0.6); }
.real-worshipper { position: relative; width: 58px; height: 58px; font-size: 0; filter: none !important; }
.seat-cushion-under {
  position: absolute; left: 4px; right: 4px; bottom: 0; height: 22px;
  background: linear-gradient(145deg, #632d15, #3e1b0c); border-radius: 7px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.35);
}
.worshipper-svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform-origin: 50% 90%; animation: worship-bow 7s ease-in-out infinite;
}
@keyframes worship-bow {
  0%, 55%, 100% { transform: rotate(0) translateY(0); }
  65% { transform: rotate(0) translateY(5px) scaleY(0.88); }
  78% { transform: rotate(0) translateY(0); }
}
.seat-mini-incense { position: absolute; right: -6px; bottom: 2px; width: 10px; height: 38px; overflow: visible; }
.seat-mini-incense .incense-smoke-line { stroke-dasharray: 40; stroke-dashoffset: 40; }

.courtyard-half-wing { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.pagoda-seat-item { min-width: 0; overflow: visible; }
.seat-occupant-name { max-width: 100%; }
.incense-burner-art { overflow: visible; }

.courtyard-half-wing { align-items: stretch; }
.pagoda-seat-item { justify-content: flex-start; padding-top: 14px; min-height: 112px; }
.btn-leave-seat { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; }

/* ===== V9: PHẬT + LƯ HƯƠNG + SÂN HÀNH LỄ LIỀN MỘT CẢNH NGOÀI TRỜI ===== */
.pagoda-sanctuary-wrap { padding: 12px 0 30px 0 !important; background: linear-gradient(180deg,#0f172a,#1e293b) !important; }
.pagoda-sanctuary-wrap > div:not(.pagoda-altar-fixed):not(.pagoda-courtyard-section) { max-width: 920px; width: 100%; box-sizing: border-box; padding-left: 10px; padding-right: 10px; }
.pagoda-altar-fixed { max-width: 920px !important; }
.buddha-scenery-container { border: none !important; border-radius: 0 !important; box-shadow: none !important; max-width: 920px !important; }
.buddha-statue-photo { max-height: none !important; object-fit: fill !important; width: 100%; height: auto; }
.buddha-scenery-container:hover .buddha-statue-photo { transform: none !important; }
.buddha-sunbeam-overlay { background: radial-gradient(circle at 50% 28%, rgba(254,240,138,0.18) 0%, transparent 55%) !important; }
.buddha-title-plate { top: 10px !important; bottom: auto !important; background: none !important; padding: 0 12px !important; }
.buddha-title-main { color: #7c2d12 !important; font-size: clamp(13px, 2.4vw, 20px) !important; text-shadow: 0 0 10px #fff, 0 0 18px #fff !important; }
.buddha-title-sub { color: #44403c !important; text-shadow: 0 0 8px #fff !important; font-size: clamp(10px, 1.6vw, 12.5px) !important; }
.burner-on-plaza { position: absolute; left: 50.4%; bottom: -1.5%; width: 17%; transform: translateX(-50%); z-index: 4; pointer-events: none; }
.burner-on-plaza .incense-burner-art { width: 100%; margin: 0; }
.donation-box-on-plaza {
  position: absolute; left: 66.5%; bottom: -0.5%; width: 13.5%; z-index: 5;
  cursor: pointer; pointer-events: auto; text-align: center;
  transition: transform .22s ease, filter .22s ease;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
}
.donation-box-on-plaza:hover, .donation-box-on-plaza:focus-visible {
  transform: translateY(-4px) scale(1.04);
  filter: drop-shadow(0 10px 18px rgba(245,158,11,0.55));
  outline: none;
}
.donation-box-svg { width: 100%; height: auto; display: block; }
.donation-plaza-tag {
  display: inline-block; margin-top: -6px; padding: 2px 7px; border-radius: 999px;
  font-size: clamp(8px, 1.05vw, 10.5px); font-weight: 800; letter-spacing: 0.4px; white-space: nowrap;
  color: #fef08a; background: rgba(69, 10, 10, 0.9); border: 1px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}
@media (max-width: 560px) {
  .donation-box-on-plaza { left: 65%; width: 16%; }
  .donation-plaza-tag { padding: 1px 5px; font-size: 7.5px; }
}
.pagoda-courtyard-section {
  max-width: 920px !important; margin: 0 auto !important; border: none !important; border-radius: 0 0 14px 14px !important;
  background: linear-gradient(180deg, #c0c2bf 0%, #c9c7c1 40%, #bdbbb4 100%) !important;
  box-shadow: inset 0 14px 18px -14px rgba(0,0,0,0.25) !important;
}
.courtyard-persp-container { gap: 0 !important; min-width: 640px; }
.courtyard-row { width: 100%; margin: 0 auto; padding-bottom: 10px; align-items: stretch !important; }
.courtyard-center-walkway {
  width: 56px !important; min-height: 0 !important; height: auto !important;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.55) 0 46%, rgba(120,113,108,0.18) 46% 50%) !important;
  border-left: 3px double #8d8a83 !important; border-right: 3px double #8d8a83 !important; border-radius: 0 !important;
}
.walkway-label { display: none !important; }
.walkway-lotus-tile { color: #8d8a83; opacity: 0.8; animation: none !important; }
.pagoda-seat-item { padding-bottom: 6px; }

/* V10: nối liền ảnh và sân, sửa chồng nút Rời chiếu */
.buddha-scenery-container::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7%;
  background: linear-gradient(180deg, rgba(192,194,191,0) 0%, #c0c2bf 100%); pointer-events: none; z-index: 3;
}
.pagoda-courtyard-section { background: linear-gradient(180deg, #c0c2bf 0%, #c9c7c1 35%, #bdbbb4 100%) !important; }
.pagoda-seat-item { min-height: 128px !important; padding-bottom: 24px !important; }
.btn-leave-seat { bottom: 2px !important; z-index: 5; background: #fee2e2 !important; }

/* V11: NỀN SÂN ĐÁ HOA CƯƠNG BÓNG PHẢN CHIẾU */
.pagoda-courtyard-section {
  background:
    linear-gradient(112deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 28%, rgba(255,255,255,0.22) 52%, rgba(255,255,255,0) 78%, rgba(255,255,255,0.3) 100%),
    linear-gradient(180deg, rgba(90,92,90,0.55) 1px, rgba(0,0,0,0) 1px) 0 0 / 100% 138px,
    linear-gradient(90deg, rgba(90,92,90,0.4) 1px, rgba(0,0,0,0) 1px) 0 0 / 150px 100%,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0.33  0 0 0 0 0.33  0 0 0 0 0.34  0 0 0 1.6 -0.55'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") 0 0 / 220px 220px,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='300'><filter id='v' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.03' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.46  0 0 0 0 0.47  0 0 0 1.2 -0.45'/></filter><rect width='100%' height='100%' filter='url(%23v)'/></svg>") 0 0 / 400px 300px,
    linear-gradient(180deg, #c3c5c2 0%, #b4b6b3 55%, #a9aba8 100%) !important;
  box-shadow: inset 0 16px 20px -14px rgba(0,0,0,0.3), inset 0 -2px 14px rgba(255,255,255,0.4) !important;
}
/* phản chiếu bóng loáng như mặt đá mài */
.seat-cushion-wrapper, .real-worshipper {
  -webkit-box-reflect: below 1px linear-gradient(transparent 62%, rgba(255,255,255,0.28));
}
.seat-occupant-name, .seat-action-prompt { text-shadow: 0 1px 0 rgba(255,255,255,0.55); }
.courtyard-center-walkway {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 50%, rgba(255,255,255,0.35)),
    repeating-linear-gradient(180deg, rgba(235,236,234,0.9) 0 46%, rgba(120,122,120,0.35) 46% 48%) !important;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.5);
}

/* V12: dễ đọc nút Rời chiếu và nhãn Quỳ Lạy */
.btn-leave-seat { color: #991b1b !important; border: 1px solid #dc2626 !important; font-size: 10px !important; font-weight: 800; padding: 2px 6px !important; }
.seat-action-prompt { color: #44403c !important; font-weight: 800 !important; }

/* V13: GẠCH NHỎ THEO TỶ LỆ NGƯỜI/BỒ ĐOÀN, CO THEO PHỐI CẢNH TỪNG HÀNG */
.pagoda-courtyard-section {
  background:
    linear-gradient(112deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 28%, rgba(255,255,255,0.22) 52%, rgba(255,255,255,0) 78%, rgba(255,255,255,0.3) 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0.33  0 0 0 0 0.33  0 0 0 0 0.34  0 0 0 1.6 -0.55'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>") 0 0 / 220px 220px,
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='300'><filter id='v' x='0' y='0' width='100%' height='100%'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.03' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.45  0 0 0 0 0.46  0 0 0 0 0.47  0 0 0 1.2 -0.45'/></filter><rect width='100%' height='100%' filter='url(%23v)'/></svg>") 0 0 / 400px 300px,
    linear-gradient(180deg, #c3c5c2 0%, #b4b6b3 55%, #a9aba8 100%) !important;
}
.courtyard-persp-container { min-width: 880px !important; max-width: 880px !important; }
.courtyard-row {
  zoom: 1 !important; width: 100%; padding-bottom: 0 !important; justify-content: center; gap: 6px;
  background-image:
    linear-gradient(0deg, rgba(95,97,95,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95,97,95,0.42) 1px, transparent 1px);
  background-size: calc(34px * var(--z, 1)) calc(34px * var(--z, 1));
  background-position: 50% 100%;
  border-bottom: 1px solid rgba(95,97,95,0.5);
}
.courtyard-row > * { zoom: var(--z, 1); }
.courtyard-half-wing { flex: 0 0 400px !important; width: 400px; }
.courtyard-center-walkway { flex: 0 0 56px; }

/* V14: NỀN ĐÁ SẠCH NÉT NHƯ SÂN TRONG ẢNH + CỔNG TAM QUAN MỚI */
.pagoda-courtyard-section {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #c0c2bf 0%, #c7c8c4 45%, #c4c5c1 100%) !important;
  box-shadow: none !important;
}
.courtyard-row { background-image: none !important; border-bottom: none !important; }
.seat-cushion-wrapper, .real-worshipper { -webkit-box-reflect: none !important; }
.courtyard-center-walkway {
  background: linear-gradient(90deg, #d3d4d0, #dcdcd8 50%, #d3d4d0) !important;
  border-left: 3px double #9a9993 !important; border-right: 3px double #9a9993 !important; box-shadow: none !important;
}
.seat-cushion-wrapper { box-shadow: 0 6px 5px -2px rgba(40,40,40,0.45) !important; }
.seat-occupant-name, .seat-action-prompt { text-shadow: none !important; }

.pagoda-gate-wrap { padding: 8px 0 24px; }
.tam-quan-scene { max-width: 780px; margin: 0 auto; cursor: pointer; text-align: center; }
.tam-quan-svg { width: 100%; height: auto; display: block; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,0.55); transition: transform .4s ease, filter .4s ease; }
.tam-quan-scene:hover .tam-quan-svg { transform: translateY(-3px); filter: brightness(1.05); }
.door-leaf { transition: transform 0.9s cubic-bezier(.6,.05,.3,1); transform-box: fill-box; }
.door-left { transform-origin: left center; }
.door-right { transform-origin: right center; }
.tam-quan-scene:hover .door-left, .tam-quan-scene:hover .door-right { transform: scaleX(0.93); }
.tam-quan-scene.opening .door-left, .tam-quan-scene.opening .door-right { transform: scaleX(0.1) !important; }
.lantern { animation: lantern-sway 4s ease-in-out infinite; }
@keyframes lantern-sway { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.tam-quan-cta { margin-top: 14px; }
.tam-quan-cta span {
  display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #5a0f0f;
  background: linear-gradient(135deg, #ffe08a, #f2a900); box-shadow: 0 6px 20px rgba(245,158,11,0.5); animation: cta-pulse 2.2s ease-in-out infinite;
}
@keyframes cta-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.tam-quan-quote { margin: 10px auto 0; max-width: 520px; font-size: 12px; color: #cbd5e1; font-style: italic; line-height: 1.5; }

/* Modal QR VIP không tràn ngang */
#modal-classified-vip-qr .modal-content { max-width: min(460px, 94vw) !important; overflow-x: hidden; box-sizing: border-box; }
#modal-classified-vip-qr .modal-content * { max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }

/* Modal thanh toán: tự cuộn khi màn hình thấp, không cắt nút dưới */
#modal-payment .modal-content { max-height: 92vh; overflow-y: auto; }

@media (max-height: 860px) {
  #modal-payment .modal-content { padding-top: 12px; padding-bottom: 12px; }
  #modal-payment #pay-qr-img { max-height: 220px; width: auto; max-width: 100%; }
  #modal-payment .payment-header h3 { font-size: 15px; margin: 4px 0; }
}

/* ===== HỘP THOẠI THÔNG BÁO ĐẸP ===== */
.biz-dialog-overlay {
  position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 30%, rgba(40, 24, 66, 0.75), rgba(5, 3, 10, 0.88));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: biz-fade-in .18s ease-out;
}
.biz-dialog-overlay.closing { animation: biz-fade-out .16s ease-in forwards; }
.biz-dialog {
  position: relative; width: min(440px, 94vw); max-height: 90vh; overflow-y: auto; text-align: center;
  padding: 44px 26px 22px; border-radius: 22px;
  background: radial-gradient(ellipse at 50% 0%, #2a1b3d 0%, #160f1f 55%, #0d0812 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(245, 158, 11, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  color: #e5e7eb; margin-top: 34px;
  animation: biz-pop .26s cubic-bezier(.2, 1.1, .3, 1);
}
.biz-dialog-icon {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  min-width: 68px; height: 68px; padding: 0 10px; display: flex; align-items: center; justify-content: center;
  font-size: 32px; line-height: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3b2557, #150e20);
  border: 2px solid #f59e0b; box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45), inset 0 0 14px rgba(245, 158, 11, 0.25);
  font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
.biz-dialog.ok .biz-dialog-icon { border-color: #34d399; box-shadow: 0 6px 22px rgba(52, 211, 153, 0.45), inset 0 0 14px rgba(52, 211, 153, 0.22); }
.biz-dialog.warn .biz-dialog-icon { border-color: #f87171; box-shadow: 0 6px 22px rgba(248, 113, 113, 0.45), inset 0 0 14px rgba(248, 113, 113, 0.22); }
.biz-dialog.warn { border-color: rgba(248, 113, 113, 0.55); }
.biz-dialog.ok { border-color: rgba(52, 211, 153, 0.5); }
.biz-dialog-brand { font-size: 10.5px; letter-spacing: 3px; font-weight: 800; color: rgba(251, 191, 36, 0.8); margin: 4px 0 12px; }
.biz-dialog-body p { margin: 0 0 9px; font-size: 14.5px; line-height: 1.65; color: #d1d5db; }
.biz-dialog-body p.biz-dialog-title { font-size: 17px; font-weight: 800; color: #fde68a; margin-bottom: 12px; }
.biz-dialog-actions { margin-top: 18px; }
.biz-dialog-ok {
  min-width: 170px; padding: 12px 28px; border: none; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 14px; color: #3b1d00;
  background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 8px 22px rgba(245, 158, 11, 0.45); transition: transform .15s ease, box-shadow .15s ease;
}
.biz-dialog-ok:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(245, 158, 11, 0.6); }
.biz-dialog-ok:focus-visible { outline: 3px solid rgba(253, 230, 138, 0.7); outline-offset: 2px; }
.biz-dialog.ok .biz-dialog-ok { background: linear-gradient(135deg, #a7f3d0, #10b981); color: #052e1c; box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45); }
.biz-dialog.warn .biz-dialog-ok { background: linear-gradient(135deg, #fecaca, #f87171); color: #450a0a; box-shadow: 0 8px 22px rgba(248, 113, 113, 0.45); }
@keyframes biz-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes biz-fade-out { to { opacity: 0; } }
@keyframes biz-pop { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }

/* Thẻ lời chúc dâng hương */
.biz-dialog .blessing-wrap { padding: 2px 4px; }
.biz-dialog .blessing-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 800; color: #fde68a; letter-spacing: 1px; text-shadow: 0 0 18px rgba(245, 158, 11, 0.55); }
.biz-dialog .blessing-sub { margin-top: 4px; font-size: 13.5px; color: #a7f3d0; font-weight: 700; }
.biz-dialog .blessing-seat { display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 6px; padding: 7px 16px; border-radius: 999px; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.45); font-size: 12.5px; color: #fed7aa; }
.biz-dialog .blessing-seat b { font-size: 18px; color: #fde68a; }
.biz-dialog .blessing-name { font-size: 16px; font-weight: 800; color: #fff; margin: 4px 0 10px; word-break: break-word; }
.biz-dialog .blessing-note { font-size: 12.5px; line-height: 1.6; color: #9ca3af; }
.biz-dialog .blessing-note b { color: #fde68a; }
.biz-dialog .blessing-incense { width: 64px; height: 72px; overflow: visible; }
.biz-dialog-icon:has(.blessing-incense) { top: -42px; min-width: 84px; height: 84px; border-radius: 50%; }
.biz-dialog-icon .incense-smoke-line { stroke-dasharray: 40; stroke-dashoffset: 40; }
@media (max-width: 480px) { .biz-dialog { padding: 42px 18px 18px; } .biz-dialog-ok { width: 100%; } }

/* V2: icon không bị cắt, cuộn nội dung bên trong, nút Hủy */
.biz-dialog { overflow: visible !important; max-height: none !important; }
.biz-dialog-body { max-height: min(52vh, 420px); overflow-y: auto; padding: 2px 4px; }
.biz-dialog-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.biz-dialog-cancel {
  min-width: 110px; padding: 12px 22px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px; color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.2); transition: background .15s ease;
}
.biz-dialog-cancel:hover { background: rgba(255, 255, 255, 0.12); }
.biz-dialog-ok { min-width: 150px; }
@media (max-width: 480px) { .biz-dialog-actions { flex-direction: column-reverse; } .biz-dialog-cancel, .biz-dialog-ok { width: 100%; } }

/* ===== TAB TUNG ĐỒNG XU SOI LÒNG ===== */
.nav-btn.tab-btn-coin {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(245, 158, 11, 0.14));
  border-color: rgba(250, 204, 21, 0.55);
  color: #fde047;
}
.coin-wrap { max-width: 760px; margin: 0 auto; padding: 8px 4px 40px; }
.coin-hidden { display: none !important; }
.coin-hero { text-align: center; padding: 18px 8px 8px; }
.coin-hero h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; }
.coin-hero h2 span { color: #fbbf24; }
.coin-hero p { margin: 0 auto; max-width: 560px; color: #cbd5e1; font-size: 14.5px; line-height: 1.7; }
.coin-hero p b { color: #fde68a; }
.coin-card {
  margin: 14px 0; padding: 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 24, 48, 0.9), rgba(16, 12, 28, 0.92));
  border: 1px solid rgba(251, 191, 36, 0.28); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.coin-label { display: block; margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: #fde68a; }
.coin-card input[type=text] {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 10px; font-size: 14.5px; color: #fff;
  background: #0d0812; border: 1px solid rgba(251, 191, 36, 0.35); margin-bottom: 12px;
}
.coin-card input[type=text]:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2); }
.coin-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coin-option input { margin-bottom: 0 !important; }
.coin-badge { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; font-weight: 800; color: #3b1d00; margin-right: 4px; }
.coin-badge.a, .coin-landed-badge.a { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.coin-badge.b, .coin-landed-badge.b { background: linear-gradient(135deg, #bae6fd, #38bdf8); }

.coin-stage { text-align: center; padding: 6px 0 4px; }
.coin-scene { position: relative; height: 270px; perspective: 900px; display: flex; justify-content: center; align-items: flex-end; }
.coin-toss { position: absolute; bottom: 44px; left: 50%; margin-left: -80px; width: 160px; height: 160px; }
.coin-toss.tossing { animation: coin-toss-arc 2.4s cubic-bezier(.3, .6, .4, 1); }
@keyframes coin-toss-arc {
  0% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-170px) scale(1.18); }
  72% { transform: translateY(0) scale(1); }
  82% { transform: translateY(-16px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}
.coin { position: relative; width: 160px; height: 160px; transform-style: preserve-3d; transform: rotateX(0deg); }
.coin-face {
  position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 32% 28%, #fff3b0 0%, #f5c542 38%, #c8901a 72%, #8a5a10 100%);
  box-shadow: inset 0 0 0 4px #e8b730, inset 0 0 0 8px #a8730f, inset 0 6px 14px rgba(255, 255, 255, 0.45), 0 8px 18px rgba(0, 0, 0, 0.5);
}
.coin-face.front { transform: translateZ(4px); }
.coin-face.back { transform: rotateX(180deg) translateZ(4px); background: radial-gradient(circle at 32% 28%, #e3f4ff 0%, #8ccbf0 38%, #3d8fc2 72%, #1f5a82 100%); box-shadow: inset 0 0 0 4px #5db0e0, inset 0 0 0 8px #2b6f9c, inset 0 6px 14px rgba(255, 255, 255, 0.45), 0 8px 18px rgba(0, 0, 0, 0.5); }
.coin-ring { width: 118px; height: 118px; border-radius: 50%; border: 2px dashed rgba(90, 55, 5, 0.55); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.coin-face.back .coin-ring { border-color: rgba(10, 50, 85, 0.55); }
.coin-letter { font-family: 'Playfair Display', serif; font-size: 52px; font-weight: 800; line-height: 1; color: #6b4309; text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5); }
.coin-face.back .coin-letter { color: #0e3a5e; }
.coin-face-label { margin-top: 4px; max-width: 92px; font-size: 11.5px; font-weight: 800; line-height: 1.2; text-align: center; color: #5a3a06; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.coin-face.back .coin-face-label { color: #0d3350; }
.coin-shadow { position: absolute; bottom: 22px; left: 50%; width: 120px; height: 18px; margin-left: -60px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%); }
.coin-shadow.tossing { animation: coin-shadow-arc 2.4s cubic-bezier(.3, .6, .4, 1); }
@keyframes coin-shadow-arc { 0% { transform: scale(1); opacity: 1; } 38% { transform: scale(.55); opacity: .4; } 72% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.coin-hint { min-height: 44px; margin: 4px auto 10px; max-width: 520px; color: #cbd5e1; font-size: 14px; line-height: 1.6; }
.coin-hint b { color: #fde68a; }
.coin-hint.pulsing { animation: coin-pulse 1.1s ease-in-out infinite; }
@keyframes coin-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.coin-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.coin-btn-flip, .coin-btn-card {
  border: none; cursor: pointer; border-radius: 999px; font-weight: 800; color: #3b1d00;
  background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 8px 22px rgba(245, 158, 11, 0.45); transition: transform .15s ease, box-shadow .15s ease;
}
.coin-btn-flip { padding: 14px 34px; font-size: 16px; }
.coin-btn-card { padding: 11px 24px; font-size: 14px; }
.coin-btn-flip:hover:not(:disabled), .coin-btn-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(245, 158, 11, 0.6); }
.coin-btn-flip:disabled { opacity: .6; cursor: wait; }
.coin-sound { font-size: 13px; color: #94a3b8; cursor: pointer; user-select: none; }
.coin-result-line { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.coin-landed-badge { display: inline-flex; padding: 5px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #3b1d00; }
.coin-landed-text { font-size: 19px; font-weight: 800; color: #fff; word-break: break-word; }
.coin-ask { text-align: center; color: #e5e7eb; font-size: 15px; margin-bottom: 14px; }
.coin-ask b { color: #fde68a; }
.coin-feelings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.coin-feelings button {
  padding: 14px 8px; border-radius: 14px; cursor: pointer; font-size: 14px; font-weight: 800; color: #f1f5f9; line-height: 1.4;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.16); transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.coin-feelings button span { display: block; font-size: 30px; margin-bottom: 4px; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.coin-feelings button small { font-weight: 500; color: #94a3b8; }
.coin-feelings button:hover { transform: translateY(-3px); background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.6); }
.coin-insight { border-color: rgba(52, 211, 153, 0.45); }
.coin-insight-title { font-size: 18px; font-weight: 800; color: #6ee7b7; margin-bottom: 8px; }
.coin-insight p { margin: 0 0 10px; color: #d1d5db; font-size: 14.5px; line-height: 1.7; }
.coin-lean { display: none; padding: 10px 12px; border-radius: 10px; background: rgba(251, 191, 36, 0.1); border: 1px dashed rgba(251, 191, 36, 0.5); color: #fde68a; font-size: 13.5px; margin-bottom: 8px; }
.coin-insight-actions { text-align: center; }
.coin-accept-title { font-size: 16px; font-weight: 800; color: #fde68a; margin-bottom: 12px; line-height: 1.5; }
.coin-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.coin-chips button { padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 700; color: #e5e7eb; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.2); transition: all .15s ease; }
.coin-chips button.on { color: #3b1d00; background: linear-gradient(135deg, #fde68a, #f59e0b); border-color: #f59e0b; }
.coin-reframe { padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.35); }
.coin-reframe p { margin: 0 0 8px; color: #d1fae5; font-size: 13.5px; line-height: 1.65; }
.coin-reframe p:last-child { margin-bottom: 0; }
.coin-card-preview { margin: 14px 0 6px; padding: 14px; white-space: pre-wrap; word-break: break-word; border-radius: 12px; background: #0d0812; border: 1px dashed rgba(251, 191, 36, 0.5); color: #fef3c7; font-family: inherit; font-size: 14px; line-height: 1.7; }
.coin-history-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #fde68a; font-size: 14px; }
.coin-link { background: none; border: none; cursor: pointer; color: #94a3b8; font-size: 12.5px; text-decoration: underline; }
.coin-history-row { display: grid; grid-template-columns: 78px 1fr; gap: 2px 10px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 13px; }
.coin-history-row .when { color: #64748b; grid-row: span 2; }
.coin-history-row .what { color: #e5e7eb; font-weight: 700; word-break: break-word; }
.coin-history-row .res { color: #94a3b8; }
.coin-history-empty, .coin-privacy { color: #64748b; font-size: 12.5px; }
.coin-privacy { margin-top: 8px; }
.coin-disclaimer { margin: 6px 0 18px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.6; color: #94a3b8; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1); }
.coin-disclaimer b { color: #fde68a; }
@media (max-width: 560px) {
  .coin-options { grid-template-columns: 1fr; }
  .coin-feelings { grid-template-columns: 1fr; }
  .coin-feelings button { display: flex; align-items: center; justify-content: center; gap: 10px; text-align: left; }
  .coin-feelings button span { margin: 0; font-size: 26px; }
  .coin-hero h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .coin-toss.tossing, .coin-shadow.tossing, .coin-hint.pulsing { animation: none; }
}

/* Thanh tab: tự xuống 2 hàng khi không đủ chỗ */
.main-nav { flex-wrap: wrap; overflow-x: visible; white-space: normal; justify-content: center; row-gap: 4px; }
.nav-btn { min-height: 28px; }

/* ===== TAB GIEO QUẺ 64 QUẺ KINH DỊCH ===== */
.nav-btn.tab-btn-iching {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(245, 158, 11, 0.14));
  border-color: rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
}
.iching-wrap { max-width: 840px; margin: 0 auto; padding: 8px 4px 40px; }
.iching-hidden { display: none !important; }
.iching-hero { text-align: center; padding: 18px 8px 8px; }
.iching-hero h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; }
.iching-hero h2 span { color: #6ee7b7; }
.iching-hero p { margin: 0 auto; max-width: 600px; color: #cbd5e1; font-size: 14.5px; line-height: 1.7; }
.iching-card {
  margin: 14px 0; padding: 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 32, 42, 0.92), rgba(11, 18, 28, 0.94));
  border: 1px solid rgba(52, 211, 153, 0.3); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.iching-label { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #a7f3d0; }
.iching-input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; color: #fff;
  background: #0a1019; border: 1px solid rgba(52, 211, 153, 0.35); font-family: inherit;
}
.iching-input:focus { outline: none; border-color: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.iching-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.iching-topics span { font-size: 12px; color: #94a3b8; }
.iching-topics button {
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700;
  color: #cbd5e1; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.16);
  transition: all .15s ease;
}
.iching-topics button:hover { border-color: #34d399; color: #6ee7b7; background: rgba(16, 185, 129, 0.14); }
.iching-stage { text-align: center; padding: 12px 0 6px; }
.iching-coins-row { display: flex; justify-content: center; gap: 18px; margin: 10px 0 14px; min-height: 68px; align-items: center; }
.iching-coin-disc {
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 32% 28%, #fef08a 0%, #eab308 48%, #92400e 100%);
  box-shadow: inset 0 0 0 3px #fde047, inset 0 0 0 6px #854d0e, 0 6px 16px rgba(0, 0, 0, 0.45);
  position: relative; transition: transform .3s ease;
}
.iching-coin-disc::after {
  content: ''; width: 16px; height: 16px; border: 2px solid #78350f; background: #0d1620; border-radius: 2px;
}
.iching-coin-disc.yin {
  background: radial-gradient(circle at 32% 28%, #e2e8f0 0%, #94a3b8 48%, #475569 100%);
  box-shadow: inset 0 0 0 3px #cbd5e1, inset 0 0 0 6px #334155, 0 6px 16px rgba(0, 0, 0, 0.45);
}
.iching-coin-disc.yin::after { border-color: #1e293b; }
.iching-coins-row.casting .iching-coin-disc { animation: iching-spin .42s linear infinite; }
@keyframes iching-spin { 0% { transform: rotateY(0deg) translateY(0); } 50% { transform: rotateY(180deg) translateY(-10px); } 100% { transform: rotateY(360deg) translateY(0); } }
.iching-live-lines {
  width: 190px; min-height: 112px; margin: 0 auto 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(10, 16, 25, 0.72); border: 1px dashed rgba(52, 211, 153, 0.35);
  display: flex; flex-direction: column-reverse; justify-content: flex-start; gap: 8px;
}
.iching-cast-status { min-height: 22px; font-size: 13.5px; color: #a7f3d0; margin-bottom: 12px; font-weight: 600; }
.iching-btn-cast {
  border: none; cursor: pointer; border-radius: 999px; padding: 14px 34px; font-size: 16px; font-weight: 800;
  color: #042f2e; background: linear-gradient(135deg, #6ee7b7, #10b981);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.42); transition: transform .15s ease, box-shadow .15s ease;
}
.iching-btn-cast:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16, 185, 129, 0.58); }
.iching-btn-cast:disabled { opacity: .6; cursor: wait; }

.iching-matter-banner {
  padding: 12px 14px; border-radius: 12px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(52, 211, 153, 0.35);
  margin-bottom: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center;
}
.iching-matter-banner .q { font-size: 15px; font-weight: 700; color: #fff; word-break: break-word; }
.iching-matter-banner .t { font-size: 12px; color: #94a3b8; }

.iching-hex-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-bottom: 16px; }
.iching-hex-box {
  padding: 16px; border-radius: 14px; text-align: center;
  background: rgba(10, 16, 25, 0.8); border: 1px solid rgba(255, 255, 255, 0.1);
}
.iching-hex-box.primary { border-color: rgba(52, 211, 153, 0.45); }
.iching-hex-box.changed { border-color: rgba(251, 191, 36, 0.45); }
.iching-hex-role { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; color: #94a3b8; margin-bottom: 4px; }
.iching-hex-title { font-size: 20px; font-weight: 800; color: #fff; margin: 2px 0 8px; }
.iching-rank-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; margin-bottom: 12px; }
.iching-rank-badge.dai_cat { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.5); }
.iching-rank-badge.cat { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.45); }
.iching-rank-badge.trung { background: rgba(251, 191, 36, 0.18); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.45); }
.iching-rank-badge.than_trong { background: rgba(248, 113, 113, 0.18); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.45); }

.iching-bars { width: 170px; margin: 0 auto 12px; display: flex; flex-direction: column; gap: 7px; }
.iching-bar-row { display: flex; align-items: center; gap: 8px; }
.iching-bar-idx { font-size: 11px; color: #64748b; width: 16px; text-align: right; font-weight: 700; }
.iching-bar-shape { flex: 1; height: 10px; display: flex; justify-content: space-between; align-items: center; }
.iching-bar-shape.yang::before {
  content: ''; width: 100%; height: 10px; border-radius: 3px;
  background: linear-gradient(90deg, #34d399, #10b981); box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}
.iching-bar-shape.yin::before, .iching-bar-shape.yin::after {
  content: ''; width: 43%; height: 10px; border-radius: 3px; background: #94a3b8;
}
.iching-bar-row.moving .iching-bar-shape.yang::before {
  background: linear-gradient(90deg, #fde047, #f59e0b); box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
}
.iching-bar-row.moving .iching-bar-shape.yin::before, .iching-bar-row.moving .iching-bar-shape.yin::after {
  background: linear-gradient(90deg, #fde047, #f59e0b);
}
.iching-bar-mark { width: 16px; font-size: 12px; font-weight: 800; color: #fbbf24; text-align: left; }
.iching-trigram-meta { font-size: 12px; color: #cbd5e1; line-height: 1.6; }

.iching-thoan {
  padding: 12px 14px; border-radius: 12px; background: rgba(251, 191, 36, 0.08); border-left: 3px solid #fbbf24;
  margin-bottom: 14px; font-size: 14px; color: #fef3c7; line-height: 1.65;
}
.iching-sections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.iching-sec-item { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.09); }
.iching-sec-item h4 { margin: 0 0 6px; font-size: 13.5px; color: #6ee7b7; }
.iching-sec-item p { margin: 0; font-size: 13.5px; color: #cbd5e1; line-height: 1.65; }
.iching-sec-item.full { grid-column: 1 / -1; background: rgba(16, 185, 129, 0.08); border-color: rgba(52, 211, 153, 0.35); }
.iching-history-row {
  display: grid; grid-template-columns: 82px 1fr auto; gap: 4px 10px; align-items: center;
  padding: 9px 6px; border-top: 1px solid rgba(255, 255, 255, 0.07); font-size: 13px; cursor: pointer; border-radius: 6px;
}
.iching-history-row:hover { background: rgba(52, 211, 153, 0.08); }
.iching-history-row .when { color: #64748b; }
.iching-history-row .what { color: #e2e8f0; font-weight: 700; word-break: break-word; }
.iching-history-row .qname { color: #6ee7b7; font-weight: 700; white-space: nowrap; }
@media (max-width: 640px) {
  .iching-sections-grid { grid-template-columns: 1fr; }
  .iching-history-row { grid-template-columns: 78px 1fr; }
  .iching-history-row .qname { grid-column: 2; }
  .iching-hero h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .iching-coins-row.casting .iching-coin-disc { animation: none; }
}
