/* ============================================================================
   SEO AUDIT TOOL — MODERN SAAS DASHBOARD STYLESHEET (CSS THUẦN)
   ============================================================================ */

:root {
  /* Bảng màu nhận diện mới: Navy đậm (#1a237e) + Accent tím (#5b3fd9) */
  --primary: #1a237e;
  --primary-hover: #0f1756;
  --primary-light: #e8eaf6;
  --accent: #5b3fd9;
  --accent-hover: #4a32b3;
  --footer-bg: #0f1429;
  
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  --bg-main: #f8f9fb;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-sub: #475569;

  --radius-card: 14px;
  --radius-elem: 8px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 25px -5px rgba(26, 35, 126, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Chiều rộng container 1300px cho toàn trang */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ----------------------------------------------------------------------------
   HEADER
   ---------------------------------------------------------------------------- */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-svg-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badges-group {
  display: flex;
  gap: 6px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-free {
  background: var(--success-light);
  color: #15803d;
}

.badge-beta {
  background: var(--primary-light);
  color: var(--primary);
}

/* ----------------------------------------------------------------------------
   HERO SECTION
   ---------------------------------------------------------------------------- */
.hero-section {
  text-align: center;
  padding: 38px 0 22px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: #0f172a;
}

.hero-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto;
}

/* ----------------------------------------------------------------------------
   CARDS CHUNG
   ---------------------------------------------------------------------------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}

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

/* Khối Form kiểm tra thu gọn, căn giữa thanh lịch */
.audit-card-narrow {
  max-width: 960px;
  margin: 0 auto 24px auto;
  box-shadow: var(--shadow-card);
  border: 1px solid #e2e8f0;
}

/* ----------------------------------------------------------------------------
   TABS CHỌN CHẾ ĐỘ QUÉT (TOÀN SITE / 1 URL)
   ---------------------------------------------------------------------------- */
.scan-mode-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.mode-tab {
  background: transparent;
  border: none;
  padding: 7px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mode-tab:hover {
  color: var(--text-main);
}

.mode-tab.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ----------------------------------------------------------------------------
   AUDIT FORM (THIẾT KẾ COMPACT TẬP TRUNG)
   ---------------------------------------------------------------------------- */
.audit-form {
  display: block;
  width: 100%;
}

.form-grid {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.field-domain {
  flex: 1 1 320px;
  min-width: 200px;
}

.field-plugin {
  flex: 0 0 190px;
}

.field-captcha {
  flex: 0 0 auto;
}

.field-submit {
  flex: 0 0 auto;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
  line-height: 18px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.65;
}

.domain-control {
  padding-left: 40px !important;
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-elem);
  font-size: 14.5px;
  color: var(--text-main);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.plugin-select {
  cursor: pointer;
  background-color: #fff;
  font-weight: 500;
  font-size: 13.5px;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.12);
}

/* ----------------------------------------------------------------------------
   KHỐI CAPTCHA LIỀN MẠCH (UNIFIED INPUT GROUP)
   ---------------------------------------------------------------------------- */
.captcha-box {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-elem);
  height: 48px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.captcha-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.12);
}

.captcha-question {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: none;
  border-right: 1px solid var(--border-color);
  border-radius: 0;
  height: 100%;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  min-width: 96px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  user-select: none;
  flex-shrink: 0;
}

.captcha-input {
  flex: 1;
  width: 80px;
  height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 10px;
  font-size: 14.5px;
  color: var(--text-main);
  outline: none !important;
  box-shadow: none !important;
  text-align: center;
}

.captcha-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.btn-icon {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-color);
  border-radius: 0;
  height: 100%;
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  outline: none;
}

.btn-icon:hover {
  background: #f8f9fb;
  color: var(--primary);
}

/* ----------------------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius-elem);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn-submit-now {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  box-shadow: 0 2px 6px rgba(91, 63, 217, 0.25);
}

.btn-submit-now:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover), #6d28d9);
  box-shadow: 0 4px 12px rgba(91, 63, 217, 0.35);
}

.btn-submit-now:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #16a34a;
}

/* ----------------------------------------------------------------------------
   PROGRESS SECTION
   ---------------------------------------------------------------------------- */
.progress-card {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

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

.progress-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-percent {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-detail {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ----------------------------------------------------------------------------
   4 LANDING SECTIONS (WHY, FEATURES, PRICING/DONATE, FAQ)
   ---------------------------------------------------------------------------- */
.landing-sections {
  margin: 48px auto 20px auto;
}

.landing-section {
  margin-bottom: 56px;
  scroll-margin-top: 80px;
}

.section-header {
  text-align: center;
  margin-bottom: 30px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.55;
}

.feature-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.feature-icon {
  font-size: 34px;
  margin-bottom: 14px;
  line-height: 1;
}

.feature-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.55;
}

/* Donate Card (Miễn phí & Ủng hộ) */
.donate-card {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf5 0%, #fef9c3 100%);
  border: 2px solid #fde047;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.12);
}

.donate-icon {
  font-size: 46px;
  margin-bottom: 12px;
  line-height: 1;
}

.donate-title {
  font-size: 22px;
  font-weight: 900;
  color: #854d0e;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.donate-lead {
  font-size: 16px;
  font-weight: 700;
  color: #713f12;
  margin-bottom: 6px;
}

.donate-subtext {
  font-size: 14px;
  color: #854d0e;
  max-width: 620px;
  margin: 0 auto 24px auto;
  line-height: 1.55;
}

.donate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.donate-btn-momo {
  background: #d82d8b;
  color: #ffffff;
}
.donate-btn-momo:hover {
  background: #b81a71;
  color: #ffffff;
}

.donate-btn-bank {
  background: #1a237e;
  color: #ffffff;
}
.donate-btn-bank:hover {
  background: #0f1756;
  color: #ffffff;
}

.donate-btn-coffee {
  background: #ff813f;
  color: #ffffff;
}
.donate-btn-coffee:hover {
  background: #e56722;
  color: #ffffff;
}

/* Khối QR và Thông tin chuyển khoản trong Donate Card */
.donate-qr-wrapper {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.donate-qr-card {
  background: #ffffff;
  border: 1px solid #fde047;
  border-radius: 14px;
  padding: 20px 26px;
  display: inline-flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
  max-width: 520px;
  width: 100%;
  text-align: left;
}

.donate-qr-img {
  width: 180px;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  display: block;
}

.donate-bank-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bank-lbl {
  font-size: 11.5px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.bank-val {
  font-size: 14.5px;
  color: #0f172a;
}

.highlight-acc {
  font-size: 17.5px;
  color: #1a237e;
  font-weight: 800;
  letter-spacing: 0.5px;
  user-select: all;
}

.btn-donate-outline {
  background: #fffdf5;
  color: #b45309;
  border: 1px solid #fde047;
  font-weight: 600;
}

.btn-donate-outline:hover {
  background: #fef9c3;
  color: #78350f;
  border-color: #facc15;
}


/* FAQ Accordion */
.faq-accordion {
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: #cbd5e1;
}

.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: color 0.15s;
}

.faq-summary::-webkit-details-marker,
.faq-summary::marker {
  display: none;
}

.faq-summary::after {
  content: '▼';
  font-size: 11px;
  color: #94a3b8;
  transition: transform 0.2s;
  margin-left: 12px;
}

.faq-item[open] .faq-summary::after {
  content: '▲';
  color: var(--primary);
}

.faq-answer {
  padding: 0 20px 18px 20px;
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

/* ----------------------------------------------------------------------------
   RESULT SECTION
   ---------------------------------------------------------------------------- */
.result-card {
  display: none;
  animation: fadeIn 0.4s ease-in;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

/* Score Circle */
.score-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.score-num {
  font-size: 30px;
  line-height: 1;
}

.score-lbl {
  font-size: 10px;
  letter-spacing: 0.5px;
  opacity: 0.9;
  text-transform: uppercase;
}

.score-good {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.score-medium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.score-bad {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.result-intro h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.result-intro p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-box {
  padding: 14px 12px;
  border-radius: var(--radius-elem);
  border: 1px solid var(--border-color);
  background: #f8f9fb;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-errors .stat-value { color: var(--danger); }
.stat-warnings .stat-value { color: var(--warning); }
.stat-infos .stat-value { color: var(--info); }
.stat-urls .stat-value { color: var(--primary); }

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------------------
   ERROR SECTION
   ---------------------------------------------------------------------------- */
.error-card {
  display: none;
  background: var(--danger-light);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-in;
}

.error-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.error-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.error-content h4 {
  color: #b91c1c;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.error-content p {
  color: #991b1b;
  font-size: 13px;
}

/* ----------------------------------------------------------------------------
   SCAN DETAIL PAGE
   ---------------------------------------------------------------------------- */
.page-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.page-header-info {
  flex: 1;
  min-width: 280px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  word-break: break-all;
}

.plugin-tag-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  gap: 10px;
}

.mobile-table-hint {
  display: none;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.audit-table th {
  background: #f8f9fb;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.audit-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

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

.audit-table tr:hover td {
  background: #fbfcfe;
}

.score-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  text-align: center;
  min-width: 44px;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-elem);
  font-size: 12px;
  font-weight: 600;
}

.status-200 { background: var(--success-light); color: #166534; }
.status-other { background: var(--danger-light); color: #991b1b; }

.url-link {
  font-weight: 600;
  color: #0f172a;
  word-break: break-all;
  display: block;
}

.url-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Issues List */
.issue-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-elem);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 6px;
}

.issue-error { background: var(--danger-light); color: #b91c1c; }
.issue-warning { background: var(--warning-light); color: #b45309; }
.issue-info { background: var(--info-light); color: #1d4ed8; }

.issue-item {
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-elem);
  background: #f8f9fb;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

.issue-fix-box {
  margin-top: 6px;
  padding: 8px 12px;
  background: #ffffff;
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
}

/* ----------------------------------------------------------------------------
   FOOTER MỚI 4 CỘT (NAVY ĐẬM #0f1429)
   ---------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: #ffffff;
  margin-top: 64px;
  padding: 56px 0 28px 0;
  border-top: none;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 14px;
}

.footer-svg-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.footer-brand-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 17px;
}

.footer-brand-sub {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-desc {
  color: #94a3b8;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.footer-links,
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li,
.footer-contact-list li {
  margin-bottom: 10px;
  font-size: 13.5px;
}

.footer-links a,
.footer-contact-list a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover,
.footer-contact-list a:hover {
  color: #ffffff;
}

.contact-label {
  color: #cbd5e1;
  font-weight: 600;
  margin-right: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.heart-icon {
  color: #ef4444;
  font-size: 14px;
}

/* ----------------------------------------------------------------------------
   RESPONSIVE CHO TABLET & MOBILE
   ---------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* TABLET (≤ 900px) */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* MOBILE (< 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  .hero-section {
    padding: 26px 0 16px;
  }

  .hero-title {
    font-size: 23px;
  }

  .hero-subtitle {
    font-size: 13.5px;
  }

  /* Form Card ôm sát nội dung */
  .audit-card-narrow {
    max-width: 100%;
    padding: 16px 14px;
    margin-bottom: 16px;
  }

  /* Tabs chế độ trên mobile co giãn đều */
  .scan-mode-tabs {
    width: 100%;
    display: flex;
  }

  .mode-tab {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 8px 6px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  /* Form Grid xếp dọc 4 khối cân đối */
  .form-grid {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .field-domain,
  .field-plugin,
  .field-captcha,
  .field-submit {
    width: 100%;
    flex: none;
    margin: 0;
    padding: 0;
  }

  .input-label {
    font-size: 12.5px;
    margin-bottom: 5px;
  }

  .form-control,
  .domain-control,
  .plugin-select {
    height: 46px;
    font-size: 14px;
  }

  /* Khối Captcha liền mạch trên mobile */
  .captcha-box {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: stretch;
  }

  .captcha-question {
    min-width: 100px;
    padding: 0 12px;
    font-size: 14px;
    border-right: 1px solid var(--border-color);
  }

  .captcha-input {
    flex: 1;
    width: auto;
    font-size: 14px;
    text-align: left;
    padding: 0 12px;
  }

  .btn-icon {
    width: 44px;
    height: 100%;
    border-left: 1px solid var(--border-color);
  }

  .btn-submit-now {
    width: 100%;
    height: 48px;
    font-size: 15px;
    margin-top: 2px;
  }

  /* 4 Sections trên Mobile */
  .landing-sections {
    margin: 36px auto 16px auto;
  }

  .landing-section {
    margin-bottom: 42px;
  }

  .section-title {
    font-size: 21px;
  }

  .feature-grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .donate-card {
    padding: 28px 16px;
  }

  .donate-qr-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    gap: 16px;
  }

  .donate-qr-img {
    width: 200px;
  }

  .donate-bank-info {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .bank-row {
    align-items: center;
  }

  .donate-title {
    font-size: 19px;
  }

  .donate-actions {
    flex-direction: column;
    width: 100%;
  }

  .donate-btn {
    width: 100%;
    justify-content: center;
  }

  .faq-summary {
    padding: 14px 16px;
    font-size: 14px;
  }

  .faq-answer {
    padding: 0 16px 14px 16px;
    font-size: 13.5px;
  }

  /* Header trang chi tiết */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-title {
    font-size: 19px;
  }

  .page-header-actions {
    display: flex;
    width: 100%;
    gap: 8px;
  }

  .page-header-actions .btn {
    flex: 1;
    height: 42px;
    padding: 0 8px;
    font-size: 13px;
    justify-content: center;
    text-align: center;
  }

  /* Khối tổng quan & Điểm số */
  .result-header {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
  }

  .score-circle {
    width: 80px;
    height: 80px;
  }

  .score-num {
    font-size: 26px;
  }

  /* Stats grid cố định 2 CỘT trên mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100%;
  }

  .stat-box {
    padding: 10px 8px;
    border-radius: 8px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
    margin-top: 2px;
    white-space: nowrap;
  }

  .result-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .result-actions .btn {
    width: 100%;
  }

  .mobile-table-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    background: #f1f5f9;
    border: 1px dashed var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 500;
  }

  .audit-table th, 
  .audit-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* SMARTPHONE MÀN HÌNH NHỎ (≤ 640px) */
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-desc {
    max-width: 100%;
  }
}
