:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #111622;
  --bg-card: rgba(19, 26, 42, 0.85);
  --bg-card-hover: rgba(26, 35, 58, 0.95);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #f97316;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-orange: #f97316;
  --accent-orange-hover: #ea580c;
  --accent-orange-glow: rgba(249, 115, 22, 0.35);
  --accent-green: #10b981;
  --accent-blue: #38bdf8;
  --accent-yellow: #facc15;
  --accent-red: #ef4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px var(--accent-orange-glow);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 58px;
}

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

img, video {
  max-width: 100%;
  height: auto;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glow */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 400px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Cô lập Stacking Context cho toàn bộ nội dung trang (luôn trượt dưới Sticky Header) */
main {
  position: relative;
  z-index: 1;
}

/* Header Navbar: Luôn ở lớp trên cùng (Topmost Layer) tuyệt đối */
.site-header {
  height: var(--header-height);
  background: rgba(10, 13, 20, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10000 !important;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 100%;
  padding: 0 50px;
  box-sizing: border-box;
  position: relative;
  z-index: 10001;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
  position: relative;
  z-index: 10002;
  margin-left: 0;
  text-decoration: none;
  flex-shrink: 0;
  justify-self: start;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon img,
.brand-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.brand-vid { color: #f97316; }
.brand-dow { color: #ffffff; }
.brand-com { color: #64748b; font-size: 15px; font-weight: 600; }

nav {
  position: relative;
  z-index: 10002;
  justify-self: center;
  margin: 0 auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  list-style: none;
  position: relative;
  z-index: 10003;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer !important;
  position: relative;
  z-index: 10004;
  pointer-events: auto !important;
  user-select: none;
  -webkit-user-select: none;
}

.nav-link svg {
  color: #f97316;
  flex-shrink: 0;
  opacity: 0.9;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}

.nav-link:hover svg, .nav-link.active svg {
  opacity: 1;
  transform: scale(1.1);
}

.nav-link .nav-text {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  pointer-events: none;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Phân loại hiển thị Desktop / Mobile */
.nav-desktop-only {
  display: block;
}

.nav-mobile-only {
  display: none !important;
}

/* Nav Dropdown (+More Menu) */
.nav-dropdown {
  position: relative;
  list-style: none;
}

.nav-dropdown-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.nav-dropdown-arrow {
  color: #94a3b8;
  margin-left: 2px;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-arrow,
.nav-dropdown.show .nav-dropdown-arrow {
  transform: rotate(180deg);
  color: #f97316;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 220px;
  background: #111622;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  padding: 6px;
  list-style: none;
  display: none;
  z-index: 10050 !important;
  backdrop-filter: blur(12px);
  animation: navDropdownFade 0.18s ease-out;
}

/* Hover Bridge: Cầu nối vô hình chống mất hover khi rê chuột từ nút More xuống menu con */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  display: block;
}

@keyframes navDropdownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.show .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-item svg {
  color: #f97316;
  flex-shrink: 0;
  opacity: 0.9;
  transition: transform 0.2s;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: rgba(249, 115, 22, 0.12);
  color: #ffffff;
}

.nav-dropdown-item:hover svg,
.nav-dropdown-item.active svg {
  transform: scale(1.1);
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
  margin-left: 0;
}

/* Language Selector Dropdown */
/* Language Selector Dropdown (Chuẩn az2pdf.com - Đối xứng mép phải 50px cùng Header Inner) */
.lang-dropdown {
  position: relative;
  margin-right: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.lang-chevron {
  height: 14px;
  width: 14px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.lang-menu.show + .lang-btn .lang-chevron,
.lang-btn[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 85px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 20px 45px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  padding: 8px;
  z-index: 10050 !important;
  list-style: none;
}

.lang-menu.show {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.lang-menu::-webkit-scrollbar {
  width: 5px;
}

.lang-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.lang-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.lang-menu::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

.lang-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lang-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-tap-highlight-color: transparent;
}

.lang-item-label {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-check {
  color: #f97316;
  flex-shrink: 0;
}

.lang-item-link:hover,
.lang-item-link.active {
  background: rgba(249, 115, 22, 0.16);
  color: #f97316;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  box-shadow: 0 4px 18px var(--accent-orange-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c, #f97316);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-1px);
}

/* =========================================================================
   HERO PRIMARY CYBERPUNK BUTTON (ROTATE BORDER CONIC & DUAL-GRADIENT)
   Đồng bộ hiệu ứng chuẩn echat.pro.vn
   ========================================================================= */
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.btn-hero-primary {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 32px !important;
  width: auto !important;
  min-width: 200px !important;
  background: transparent !important;
  color: #ffffff !important;
  border-radius: 0 !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.2px !important;
  overflow: hidden !important;
  z-index: 1 !important;
  cursor: pointer !important;
  box-shadow: 0 0 14px rgba(0, 101, 255, 0.35) !important;
  transition: box-shadow 0.4s ease, transform 0.25s ease !important;
  text-decoration: none !important;
}

.btn-hero-primary:hover {
  box-shadow: 0 0 22px rgba(255, 122, 0, 0.65) !important;
  transform: translateY(-2px) !important;
}

.btn-hero-primary:active {
  transform: translateY(0px) !important;
}

.btn-hero-primary::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 0 !important;
  z-index: -1;
  background-image: linear-gradient(to right, #ff7a00 50%, #0065FF 50%) !important;
  background-size: 200% 100% !important;
  background-position: 100% 0% !important;
  transition: background-position 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.btn-hero-primary:hover::after {
  background-position: 0% 0% !important;
}

.btn-hero-primary::before {
  content: "";
  position: absolute;
  top: -150%;
  left: -50%;
  width: 200%;
  height: 400%;
  background: conic-gradient(
    transparent,
    #00f0ff 15%,
    #ffffff 20%,
    #00f0ff 25%,
    transparent 45%
  );
  animation: rotateBorder 2.5s linear infinite;
  z-index: -2;
  pointer-events: none;
  transition: background 0.4s ease;
}

.btn-hero-primary:hover::before {
  background: conic-gradient(
    transparent,
    #ff7a00 15%,
    #ffffff 20%,
    #ffaa00 25%,
    transparent 45%
  );
}

.btn-hero-primary .btn-hero-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #080b11;
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  position: relative;
  z-index: 10;
}

/* Footer Brand Logo (Tỷ lệ nhỏ hơn Header) */
.site-footer .brand-logo {
  font-size: 20px;
  gap: 5px;
}

.site-footer .brand-icon {
  width: 24px;
  height: 24px;
}

.site-footer .brand-icon img,
.site-footer .brand-logo-img {
  width: 24px;
  height: 24px;
}

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

.footer-col h4 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: #f97316;
}

/* Global Languages (20 Locales) - Đồng bộ 100% Pixel-Perfect theo az2pdf.com */
.footer-global-languages {
  margin-top: 24px;
}

.footer-languages-title {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.lang-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 780px;
}

.lang-pill {
  align-items: center;
  background: #ffffff0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #94a3b8;
  display: inline-flex;
  font-size: 13px;
  font-weight: 500;
  gap: 8px;
  line-height: 1;
  padding: 7px 12px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.lang-pill .flag {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

.lang-pill .lang-name {
  font-size: 13px;
  line-height: 1;
}

.lang-pill:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.lang-pill.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.18);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   Ads Slot Architecture & Responsive Device Display (Chuẩn az2pdf.com)
   ========================================================================== */
.ad-slot-group-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 16px auto;
  position: relative;
  z-index: 2;
}

/* Triệt tiêu toàn bộ margin khi nằm trong sticky sidebar để bám sát header */
.sticky-sidebar .ad-slot-group-container,
.ad-sidebar .ad-slot-group-container,
.sticky-sidebar .ad-slot-wrapper,
.ad-sidebar .ad-slot-wrapper {
  margin: 0 !important;
  padding: 0 !important;
}

.ad-slot-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 0 !important;
}

/* Định dạng kích thước chuẩn hạn chế Layout Shift (CLS = 0) */
.format-728-90 {
  width: 728px;
  min-height: 90px;
}

.format-970-90 {
  width: 970px;
  min-height: 90px;
}

.format-300-250 {
  width: 300px;
  min-height: 250px;
}

.format-320-100 {
  width: 320px;
  min-height: 100px;
}

.format-320-50 {
  width: 320px;
  min-height: 50px;
}

.format-300-600 {
  width: 300px;
  min-height: 600px;
}

.format-160-600 {
  width: 160px;
  min-height: 600px;
}

.format-responsive {
  width: 100%;
  min-height: 80px;
}

/* Khung Friendly iFrame Sandbox */
.ad-iframe-sandbox-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
}

.ad-friendly-iframe {
  display: block;
  background: transparent;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 auto;
}

/* Khung Ads Không Bo Góc (Placeholder khi Admin chưa đưa mã quảng cáo vào) */
.ad-placeholder-frame {
  border: 1px dashed rgba(255, 255, 255, 0.22) !important;
  border-radius: 0 !important;
  background: rgba(17, 22, 34, 0.5) !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  user-select: none !important;
  transition: border-color 0.2s ease, background 0.2s ease !important;
}

.ad-placeholder-frame:hover {
  border-color: rgba(249, 115, 22, 0.45) !important;
  background: rgba(249, 115, 22, 0.05) !important;
}

.ad-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--text-muted);
  padding: 8px;
}

.ad-placeholder-content svg {
  opacity: 0.6;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.ad-placeholder-frame:hover .ad-placeholder-content svg {
  transform: scale(1.08);
  color: #f97316;
  opacity: 0.9;
}

.ad-placeholder-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.85;
  line-height: 1;
}

.ad-placeholder-format {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1;
}

/* Phân chia hiển thị theo thiết bị chuẩn xác (CSS Responsive 3 Cấp độ) */
/* 1. Màn hình Máy tính (Desktop >= 1024px) */
@media (min-width: 1024px) {
  .ad-device-all,
  .ad-device-desktop-only,
  .ad-device-desktop-tablet,
  .ad-device-desktop-mobile,
  div.ad-slot-wrapper.ad-device-all,
  div.ad-slot-wrapper.ad-device-desktop-only,
  div.ad-slot-wrapper.ad-device-desktop-tablet,
  div.ad-slot-wrapper.ad-device-desktop-mobile {
    display: flex !important;
  }

  .ad-device-tablet-only,
  .ad-device-mobile-only,
  .ad-device-tablet-mobile,
  .ad-device-none,
  div.ad-slot-wrapper.ad-device-tablet-only,
  div.ad-slot-wrapper.ad-device-mobile-only,
  div.ad-slot-wrapper.ad-device-tablet-mobile,
  div.ad-slot-wrapper.ad-device-none {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* 2. Máy tính bảng (Tablet: 768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .ad-device-all,
  .ad-device-tablet-only,
  .ad-device-desktop-tablet,
  .ad-device-tablet-mobile,
  div.ad-slot-wrapper.ad-device-all,
  div.ad-slot-wrapper.ad-device-tablet-only,
  div.ad-slot-wrapper.ad-device-desktop-tablet,
  div.ad-slot-wrapper.ad-device-tablet-mobile {
    display: flex !important;
  }
  .ad-device-desktop-only,
  .ad-device-mobile-only,
  .ad-device-desktop-mobile,
  .ad-device-none,
  div.ad-slot-wrapper.ad-device-desktop-only,
  div.ad-slot-wrapper.ad-device-mobile-only,
  div.ad-slot-wrapper.ad-device-desktop-mobile,
  div.ad-slot-wrapper.ad-device-none {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* 3. Điện thoại di động (Mobile: < 768px) */
@media (max-width: 767px) {
  .ad-device-all,
  .ad-device-mobile-only,
  .ad-device-desktop-mobile,
  .ad-device-tablet-mobile,
  div.ad-slot-wrapper.ad-device-all,
  div.ad-slot-wrapper.ad-device-mobile-only,
  div.ad-slot-wrapper.ad-device-desktop-mobile,
  div.ad-slot-wrapper.ad-device-tablet-mobile {
    display: flex !important;
  }
  .ad-device-desktop-only,
  .ad-device-tablet-only,
  .ad-device-desktop-tablet,
  .ad-device-none,
  div.ad-slot-wrapper.ad-device-desktop-only,
  div.ad-slot-wrapper.ad-device-tablet-only,
  div.ad-slot-wrapper.ad-device-desktop-tablet,
  div.ad-slot-wrapper.ad-device-none {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Quy chuẩn cấm bo góc cho toàn bộ các vị trí quảng cáo & nút Bắt đầu */
.ad-slot-group-container,
.ad-slot-group-container *,
.ad-slot-wrapper,
.ad-slot-wrapper *,
.ad-iframe-sandbox-wrapper,
.ad-iframe-sandbox-wrapper *,
.ad-friendly-iframe,
.ad-friendly-iframe *,
.ads-wrapper,
.ads-wrapper *,
.ads-badge,
.ads_tool_under_box,
.ads_tool_under_box *,
.ad-below-proceed,
.ad-below-proceed *,
.ad-sidebar,
.ad-sidebar *,
.ad-sticky-inner,
.ad-sticky-inner *,
#btnProceedDownload {
  border-radius: 0 !important;
}

/* Vị trí quảng cáo chuẩn chung ngay dưới khung box tool & tìm kiếm (ads_tool_under_box) */
.ads_tool_under_box,
.ad-below-proceed {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 24px auto;
  clear: both;
  position: relative;
  z-index: 10;
}

/* Hiệu ứng các chấm tròn xoay vòng trong quá trình Analyze */
@keyframes spinDotsCircle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.analyzing-dots-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
}

.analyzing-dots-circle .spin-circle {
  animation: spinDotsCircle 0.8s linear infinite;
  transform-origin: center center;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  color: white;
  font-size: 24px;
}

/* Responsive Navbar Adaptation cho màn hình trung gian */
@media (max-width: 1240px) and (min-width: 901px) {
  .header-inner {
    padding: 0 20px;
  }
  .nav-menu {
    gap: 10px;
  }
  .nav-link {
    padding: 7px 10px;
    font-size: 13.5px;
    gap: 6px;
  }
}

@media (max-width: 1040px) and (min-width: 901px) {
  .header-inner {
    padding: 0 16px;
  }
  .nav-menu {
    gap: 6px;
  }
  .nav-link {
    padding: 6px 7px;
    font-size: 13px;
    gap: 5px;
  }
  .nav-link svg {
    width: 13px;
    height: 13px;
  }
  .lang-btn {
    padding: 6px 8px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .header-inner {
    display: flex;
    padding: 0 16px;
    justify-content: space-between;
    gap: 0;
  }

  .nav-actions {
    justify-self: auto;
    margin-left: auto;
  }

  .brand-logo {
    margin-left: 0 !important;
  }

  .nav-desktop-only {
    display: none !important;
  }

  .nav-mobile-only {
    display: block !important;
  }

  .nav-mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
    list-style: none;
  }

  nav {
    position: static;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height, 58px);
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--header-height, 58px));
    background: rgba(10, 13, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.28s;
    z-index: 99999;
    box-sizing: border-box;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu > li {
    width: 100%;
    list-style: none;
  }

  .nav-menu .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    min-height: 48px;
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.3);
    color: #ffffff;
  }

  .lang-dropdown {
    margin-right: 8px;
  }

  .lang-btn {
    padding: 7px 10px;
    font-size: 13px;
    gap: 6px;
  }

  .lang-menu {
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 360px;
    margin: 0 auto;
    max-height: calc(100vh - 80px);
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
  }

  .mobile-toggle:hover {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.3);
    color: #f97316;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr; /* Features và Legal & Support là 2 cột trái và phải */
    gap: 28px 16px;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
    margin-bottom: 6px;
  }

  .footer-col h4 {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .footer-links {
    gap: 9px;
  }

  .footer-links a {
    font-size: 13.5px;
    line-height: 1.4;
    word-break: break-word;
  }

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

  .container {
    padding: 0 16px;
  }
}

/* =========================================================================
   MEDIA TOOLS SHARED DROP ZONE
   ========================================================================= */
.drop-zone {
  border: 2px dashed rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.02);
  border-radius: var(--radius-md);
  padding: 50px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 28px;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.08);
}

.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: #f97316;
}

/* =========================================================================
   SOCIAL SHARE RADIAL BUTTON 360° (CHUẨN AZ2PDF.COM)
   ========================================================================= */
.media-share-radial-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  z-index: 90;
  vertical-align: middle;
  margin-left: 10px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1;
  white-space: nowrap;
  -webkit-text-fill-color: initial;
  text-fill-color: initial;
  transition: z-index 0.1s ease;
}

/* Nổi trên toàn bộ các phần tử bao gồm cả Header (z-index cao nhất hệ thống) khi hover hoặc mở menu chia sẻ */
.media-share-radial-wrapper:hover,
.media-share-radial-wrapper:focus-within,
.media-share-radial-wrapper.is-open {
  z-index: 100200 !important;
}

.media-share-radial-wrapper:hover .radial-share-buttons,
.media-share-radial-wrapper.is-open .radial-share-buttons {
  z-index: 100201 !important;
}

.media-share-radial-wrapper:hover .share-sub-btn,
.media-share-radial-wrapper.is-open .share-sub-btn {
  z-index: 100202 !important;
}

.media-share-radial-wrapper:hover .main-share-btn,
.media-share-radial-wrapper.is-open .main-share-btn {
  z-index: 100203 !important;
}

.radial-share-buttons {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Lớp Hitbox vô hình mở rộng khi open / hover */
.radial-share-buttons::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  transition: inset 0.2s ease;
}

.media-share-radial-wrapper.is-open .radial-share-buttons::before {
  inset: -92px;
  pointer-events: auto;
}

/* Nút chính ở giữa */
.main-share-btn {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #131b2e;
  backdrop-filter: blur(10px);
  color: #38bdf8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  cursor: pointer;
  width: 48px;
  height: 48px;
  overflow: hidden;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.share-icon-svg {
  width: 22px;
  height: 22px;
  transition: transform 0.25s ease;
}

.media-share-radial-wrapper.is-open .main-share-btn {
  background: #f97316;
  color: #ffffff;
  border-color: #ea580c;
  box-shadow: 0 0 22px rgba(249, 115, 22, 0.6), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.main-share-btn:active {
  transform: scale(0.92);
}

.media-share-radial-wrapper.is-open .share-icon-svg {
  transform: rotate(360deg);
}

/* 8 Nút vệ tinh bung ra */
.share-sub-btn {
  position: absolute;
  top: 4px;
  left: 4px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1e293b;
  color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 50%;
  cursor: pointer;
  width: 40px;
  height: 40px;
  text-decoration: none;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  z-index: 90;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: manipulation;
}

.sub-icon-svg {
  width: 19px;
  height: 19px;
  pointer-events: none;
}

.share-sub-btn:active {
  transform: scale(0.92) !important;
}

.media-share-radial-wrapper.is-open .share-sub-btn {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Tọa độ bung 8 nút khi mở (is-open) - Bán kính R = 72px */
.media-share-radial-wrapper.is-open .btn-copy {
  translate: 72px 0px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-twitter {
  translate: 51px -51px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-reddit {
  translate: 0px -72px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-facebook {
  translate: -51px -51px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-pinterest {
  translate: -72px 0px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-telegram {
  translate: -51px 51px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-linkedin {
  translate: 0px 72px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.media-share-radial-wrapper.is-open .btn-whatsapp {
  translate: 51px 51px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

/* Hover trên thiết bị chuột Desktop */
@media (hover: hover) and (pointer: fine) {
  .radial-share-buttons:hover::before {
    inset: -92px;
    pointer-events: auto;
  }

  .main-share-btn:hover {
    background: #f97316;
    color: #ffffff;
    border-color: #ea580c;
    box-shadow: 0 0 22px rgba(249, 115, 22, 0.6), 0 4px 16px rgba(0, 0, 0, 0.5);
  }

  .radial-share-buttons:hover .share-sub-btn {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  .radial-share-buttons:hover .share-icon-svg {
    transform: rotate(360deg);
  }

  .radial-share-buttons:hover .btn-copy {
    translate: 72px 0px;
  }

  .radial-share-buttons:hover .btn-twitter {
    translate: 51px -51px;
  }

  .radial-share-buttons:hover .btn-reddit {
    translate: 0px -72px;
  }

  .radial-share-buttons:hover .btn-facebook {
    translate: -51px -51px;
  }

  .radial-share-buttons:hover .btn-pinterest {
    translate: -72px 0px;
  }

  .radial-share-buttons:hover .btn-telegram {
    translate: -51px 51px;
  }

  .radial-share-buttons:hover .btn-linkedin {
    translate: 0px 72px;
  }

  .radial-share-buttons:hover .btn-whatsapp {
    translate: 51px 51px;
  }

  .btn-copy:hover,
  .btn-copy.copied {
    background: #059669;
    color: #ffffff;
    border-color: #34d399;
  }

  .btn-twitter:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #38bdf8;
  }

  .btn-reddit:hover {
    background: #ea580c;
    color: #ffffff;
    border-color: #fb923c;
  }

  .btn-facebook:hover {
    background: #1877f2;
    color: #ffffff;
    border-color: #60a5fa;
  }

  .btn-pinterest:hover {
    background: #e11d48;
    color: #ffffff;
    border-color: #fb7185;
  }

  .btn-telegram:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
  }

  .btn-linkedin:hover {
    background: #0a66c2;
    color: #ffffff;
    border-color: #60a5fa;
  }

  .btn-whatsapp:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #4ade80;
  }
}

/* =========================================================================
   TOOL SECTION HEADERS (CĂN GIỮA TOÀN SÀN CHO CÁC CÔNG CỤ)
   ========================================================================= */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
  position: relative;
  /* z-index: auto để các phần tử tương tác (như Radial Share) tự do nổi lên trên sticky header (999) */
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Đảm bảo Stacking Context thẻ cha VƯỢT QUA HEADER khi Radial Share đang show/mở */
main:has(.media-share-radial-wrapper:hover),
main:has(.media-share-radial-wrapper.is-open),
main.is-share-open,
body.is-share-open main,
.tool-layout-wrapper:has(.media-share-radial-wrapper:hover),
.tool-layout-wrapper:has(.media-share-radial-wrapper.is-open),
.tool-layout-wrapper.is-share-open,
.section-header:has(.media-share-radial-wrapper:hover),
.section-header:has(.media-share-radial-wrapper.is-open),
.section-header.is-share-open,
.hero-section:has(.media-share-radial-wrapper:hover),
.hero-section:has(.media-share-radial-wrapper.is-open),
.hero-section.is-share-open,
.hero:has(.media-share-radial-wrapper:hover),
.hero:has(.media-share-radial-wrapper.is-open),
.hero.is-share-open,
.main-content:has(.media-share-radial-wrapper:hover),
.main-content:has(.media-share-radial-wrapper.is-open),
.main-content.is-share-open {
  z-index: 100100 !important;
  position: relative;
}

.section-title,
.hero-title,
.main-content .section-title {
  display: block !important;
  text-align: center;
  font-size: 38px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 auto 12px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
  position: relative;
  max-width: 100%;
}

.section-title .title-text,
.hero-title .title-text {
  display: inline !important;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

/* Cụm từ cuối cùng gắn liền với nút Share (chống nhảy dòng đơn độc) */
.title-end-cluster {
  display: inline !important;
  white-space: nowrap !important;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.title-end-cluster .media-share-radial-wrapper {
  margin-left: 6px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

/* SECTION TITLE ROW WITH SHARE BUTTON */
.section-title-row {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
  margin: 0 auto 8px;
  transition: all 0.3s ease;
}

.hero-title.is-share-open .title-text,
.section-title.is-share-open .title-text,
.section-title-row.is-share-open .section-title,
.section-title-row.is-share-open .hero-title {
  opacity: 0.22;
  filter: blur(1.5px);
}

.hero-title.is-share-open .media-share-radial-wrapper,
.section-title.is-share-open .media-share-radial-wrapper {
  opacity: 1 !important;
  filter: none !important;
  pointer-events: auto !important;
}

/* SOCIAL SHARE RADIAL BUTTON 360° - BIẾN THỂ SIZE-SM */
.media-share-radial-wrapper.size-sm {
  width: 40px;
  height: 40px;
}

.media-share-radial-wrapper.size-sm .radial-share-buttons {
  width: 40px;
  height: 40px;
}

.media-share-radial-wrapper.size-sm .main-share-btn {
  width: 40px;
  height: 40px;
}

.media-share-radial-wrapper.size-sm .share-icon-svg {
  width: 18px;
  height: 18px;
}

.media-share-radial-wrapper.size-sm .share-sub-btn {
  width: 34px;
  height: 34px;
  top: 3px;
  left: 3px;
}

.media-share-radial-wrapper.size-sm .sub-icon-svg {
  width: 16px;
  height: 16px;
}

/* Bán kính tỏa tròn R = 68px trên desktop cho size-sm */
.media-share-radial-wrapper.size-sm.is-open .radial-share-buttons::before {
  inset: -76px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-copy {
  translate: 68px 0px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-twitter {
  translate: 48px -48px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-reddit {
  translate: 0px -68px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-facebook {
  translate: -48px -48px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-pinterest {
  translate: -68px 0px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-telegram {
  translate: -48px 48px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-linkedin {
  translate: 0px 68px;
}

.media-share-radial-wrapper.size-sm.is-open .btn-whatsapp {
  translate: 48px 48px;
}

@media (hover: hover) and (pointer: fine) {
  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover::before {
    inset: -76px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-copy {
    translate: 68px 0px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-twitter {
    translate: 48px -48px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-reddit {
    translate: 0px -68px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-facebook {
    translate: -48px -48px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-pinterest {
    translate: -68px 0px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-telegram {
    translate: -48px 48px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-linkedin {
    translate: 0px 68px;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons:hover .btn-whatsapp {
    translate: 48px 48px;
  }
}

.btn-copy.copied {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #34d399 !important;
}

/* Mobile Responsive cho Radial Social Share & Section Header */
@media (max-width: 768px) {
  .section-header {
    margin-bottom: 24px;
    padding: 0 10px;
  }

  .section-title {
    font-size: 26px;
    letter-spacing: -0.5px;
    display: block;
    text-align: center;
  }

  .section-subtitle {
    font-size: 14px;
  }

  .section-title-row {
    gap: 8px;
  }

  .hero-title.is-share-open .title-text,
  .section-title.is-share-open .title-text,
  .section-title-row.is-share-open .section-title,
  .section-title-row.is-share-open .hero-title {
    opacity: 0.2;
    filter: blur(1px);
    pointer-events: none;
  }

  .hero-title.is-share-open .media-share-radial-wrapper,
  .section-title.is-share-open .media-share-radial-wrapper {
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
  }

  .media-share-radial-wrapper {
    width: 44px;
    height: 44px;
    transition: transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
    flex-shrink: 0;
  }

  .media-share-radial-wrapper.is-open {
    transform: translateX(var(--share-shift-x, 0px));
  }

  .radial-share-buttons {
    width: 44px;
    height: 44px;
  }

  .main-share-btn {
    width: 44px;
    height: 44px;
  }

  .share-icon-svg {
    width: 20px;
    height: 20px;
  }

  .share-sub-btn {
    width: 38px;
    height: 38px;
    top: 3px;
    left: 3px;
  }

  .sub-icon-svg {
    width: 18px;
    height: 18px;
  }

  /* Bán kính tỏa tròn R = 64px trên mobile */
  .media-share-radial-wrapper.is-open .radial-share-buttons::before {
    inset: -76px;
    border-radius: 50%;
    pointer-events: auto;
  }

  .media-share-radial-wrapper.is-open .btn-copy {
    translate: 64px 0px;
  }

  .media-share-radial-wrapper.is-open .btn-twitter {
    translate: 45px -45px;
  }

  .media-share-radial-wrapper.is-open .btn-reddit {
    translate: 0px -64px;
  }

  .media-share-radial-wrapper.is-open .btn-facebook {
    translate: -45px -45px;
  }

  .media-share-radial-wrapper.is-open .btn-pinterest {
    translate: -64px 0px;
  }

  .media-share-radial-wrapper.is-open .btn-telegram {
    translate: -45px 45px;
  }

  .media-share-radial-wrapper.is-open .btn-linkedin {
    translate: 0px 64px;
  }

  .media-share-radial-wrapper.is-open .btn-whatsapp {
    translate: 45px 45px;
  }

  /* Biến thể size-sm trên mobile (Tự động trượt đẩy vào trong nếu thiếu không gian hiển thị) */
  .media-share-radial-wrapper.size-sm {
    width: 38px;
    height: 38px;
    transition: transform 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
  }

  .media-share-radial-wrapper.size-sm.is-open {
    transform: translateX(var(--share-shift-x, 0px)) !important;
  }

  .media-share-radial-wrapper.size-sm .radial-share-buttons {
    width: 38px;
    height: 38px;
  }

  .media-share-radial-wrapper.size-sm .main-share-btn {
    width: 38px;
    height: 38px;
  }

  .media-share-radial-wrapper.size-sm .share-icon-svg {
    width: 17px;
    height: 17px;
  }

  .media-share-radial-wrapper.size-sm .share-sub-btn {
    width: 34px;
    height: 34px;
    top: 2px;
    left: 2px;
  }

  .media-share-radial-wrapper.size-sm .sub-icon-svg {
    width: 16px;
    height: 16px;
  }

  /* Bán kính tỏa tròn R = 60px chuẩn az2pdf.com trên mobile cho size-sm */
  .media-share-radial-wrapper.size-sm.is-open .radial-share-buttons::before {
    inset: -72px;
    pointer-events: auto;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-copy {
    translate: 60px 0px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-twitter {
    translate: 42px -42px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-reddit {
    translate: 0px -60px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-facebook {
    translate: -42px -42px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-pinterest {
    translate: -60px 0px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-telegram {
    translate: -42px 42px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-linkedin {
    translate: 0px 60px;
  }

  .media-share-radial-wrapper.size-sm.is-open .btn-whatsapp {
    translate: 42px 42px;
  }
}

/* =========================================================================
   GLOBAL 3-COLUMN STICKY SIDEBAR ADS (CHUẨN AZ2PDF.COM)
   Áp dụng đồng nhất cho Trang chủ, Video Rotator, Video Converter, Video Trimmer, Download
   Mép ngoài sidebar trái/phải sát mép màn hình 0px, mép trên cách header 2px
   ========================================================================= */
.tool-layout-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2px 0 60px;
  position: relative;
  box-sizing: border-box;
}

.sticky-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-height, 58px) + 2px);
  z-index: 20;
  border-radius: 0 !important;
  will-change: transform;
  margin: 0 !important;
  padding: 0 !important;
}

.sticky-sidebar.sidebar-left {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.sticky-sidebar.sidebar-right {
  margin-right: 0 !important;
  padding-right: 0 !important;
}

.sticky-sidebar-inner {
  width: 300px;
  height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transition: transform 0.15s ease-out;
}

.sticky-sidebar.sidebar-left .sticky-sidebar-inner {
  transform-origin: top left;
}

.sticky-sidebar.sidebar-right .sticky-sidebar-inner {
  transform-origin: top right;
}

/* Các nấc scale thích ứng theo chiều cao viewport: Bảo toàn 100% không mất đáy quảng cáo */
@media (max-height: 675px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.93); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.93); }
}

@media (max-height: 635px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.88); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.88); }
}

@media (max-height: 595px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.82); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.82); }
}

@media (max-height: 550px) {
  .sticky-sidebar.sidebar-left .sticky-sidebar-inner { transform: scale(0.75); }
  .sticky-sidebar.sidebar-right .sticky-sidebar-inner { transform: scale(0.75); }
}

.sticky-sidebar *,
.sticky-sidebar .ad-slot-group-container,
.sticky-sidebar .ad-slot-wrapper,
.sticky-sidebar .ad-placeholder-frame,
.sticky-sidebar .ad-placeholder,
.sticky-sidebar .banner-img,
.sticky-sidebar .btn-ad-pill {
  border-radius: 0 !important;
}

.sticky-sidebar .ad-slot-group-container,
.sticky-sidebar .ad-slot-wrapper,
.sticky-sidebar .ad-placeholder-frame {
  margin: 0 !important;
  padding: 0 !important;
}

.main-content {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 32px 20px 0;
  box-sizing: border-box;
}

@media (max-width: 1360px) {
  .sticky-sidebar {
    display: none !important;
  }
  .tool-layout-wrapper {
    padding: 28px 16px 40px;
  }
  .main-content {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

/* =========================================================================
   TOOL GUIDE & FAQ SECTIONS (DÙNG CHUNG CHO TOÀN BỘ CÔNG CỤ & TĂNG SEO)
   ========================================================================= */
.guide-section {
  margin-top: 48px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.guide-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

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

.step-card {
  background: rgba(10, 13, 20, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}

.step-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.45);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}

.step-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* FAQ Section */
.tool-faq-section {
  margin-top: 36px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.faq-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-list-item {
  background: rgba(10, 13, 20, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.faq-q {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.faq-a {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  padding-left: 28px;
}

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .guide-section, .tool-faq-section {
    padding: 24px 16px;
  }
  .faq-q {
    font-size: 14.5px;
  }
  .faq-a {
    padding-left: 0;
  }
}

/* ==========================================================================
   Viddow Cross-Tool Retention Ecosystem & Workflow Hint Bar
   ========================================================================== */
.viddow-ecosystem-section {
  margin-top: 48px;
  margin-bottom: 24px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.eco-header-box {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
}

.eco-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-full);
  color: #f97316;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.eco-main-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}

.eco-main-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Workflow Hint Bar */
.workflow-hint-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.08), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-left: 4px solid #f97316;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 26px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}

.workflow-hint-bar .wf-label {
  font-weight: 700;
  color: #f97316;
  flex-shrink: 0;
}

.workflow-hint-bar .wf-text a {
  color: #38bdf8;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.workflow-hint-bar .wf-text a:hover {
  color: #f97316;
}

/* Ecosystem Grid */
.viddow-ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.eco-tool-card {
  display: flex;
  flex-direction: column;
  background: rgba(10, 13, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.eco-tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.eco-tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(15, 20, 30, 0.85);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5), 0 0 16px -4px rgba(249, 115, 22, 0.15);
}

.eco-tool-card:hover::before {
  opacity: 1;
}

.eco-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.eco-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eco-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.03);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.eco-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  letter-spacing: -0.2px;
  transition: color 0.2s ease;
}

.eco-tool-card:hover .eco-card-title {
  color: #f97316;
}

.eco-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

.eco-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 600;
  color: #38bdf8;
  transition: color 0.2s ease;
}

.eco-card-btn {
  display: inline-block;
}

.eco-card-footer svg {
  transition: transform 0.2s ease;
}

.eco-tool-card:hover .eco-card-footer {
  color: #f97316;
}

.eco-tool-card:hover .eco-card-footer svg {
  transform: translateX(4px);
}

@media (max-width: 900px) {
  .viddow-ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .viddow-ecosystem-section {
    padding: 24px 16px;
    margin-top: 36px;
  }
  .eco-main-title {
    font-size: 20px;
  }
  .workflow-hint-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
  }
  .viddow-ecosystem-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .eco-tool-card {
    padding: 18px 16px;
  }
}

/* Cloudflare Turnstile Adaptive Container */
.viddow-turnstile-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  max-width: 100%;
  pointer-events: auto;
  border-radius: var(--radius-sm);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 640px) {
  .viddow-turnstile-wrapper {
    bottom: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    justify-content: center;
  }
}

/* Accessibility Utility for Screen Readers & Form Labels */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}



