
:root {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #10b981; /* Xanh lục bảo mật */
  --primary-hover: #059669;
  --accent: #06b6d4; /* Xanh ngọc */
  --accent-hover: #0891b2;
  --warning: #f59e0b; /* Vàng sao đánh giá */
  --border-color: #334155;
  --container-width: 1140px;
  --font-stack: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-main: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Ép tất cả các thẻ con tính toán kích thước chuẩn bao gồm cả border và padding */
*, *::before, *::after {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important; /* Ngăn chặn tuyệt đối mọi hành vi trượt ngang */
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-stack);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

/* Vùng chứa khít màn hình, có lề padding 16px an toàn ở 2 bên di động */
.container {
  width: 100% !important;
  max-width: var(--container-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}

/* =========================================================================
   2. THANH MENU ĐIỀU HƯỚNG (HEADER & NAVIGATION)
   ========================================================================= */
.header-main {
  background-color: rgba(15, 23, 42, 0.98);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  width: 100%;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand-shield {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 6px var(--primary));
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.navigation-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-item {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--primary);
}

.search-container {
  flex: 1;
  max-width: 240px;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: #0b0f19;
  border: 1.5px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.4rem 0.85rem;
  gap: 0.4rem;
}

.search-bar input {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.8rem;
  width: 100%;
  outline: none;
}

/* =========================================================================
   3. KHU VỰC TÌM KIẾM HERO (HERO JUMBOTRON)
   ========================================================================= */
.hero-jumbotron {
  background: radial-gradient(circle at 50% -20%, rgba(16, 185, 129, 0.15) 0%, transparent 60%), linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1.5px solid var(--border-color);
  padding: 3rem 1rem;
  text-align: center;
  width: 100%;
}

.hero-inner-wrapper {
  max-width: 780px;
  margin: 0 auto;
}

.hero-trust-tag {
  display: inline-block;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--primary);
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.hero-jumbotron h1 {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-jumbotron p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

.hero-search-bar {
  display: flex;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0.35rem;
  gap: 0.35rem;
  width: 100%;
  max-width: 580px;
  margin: 0 auto 1.5rem auto;
}

.hero-search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}

.hero-search-button {
  background-color: var(--primary);
  border: none;
  color: #042f1a;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.hero-chips-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-chips-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.hero-chips-container {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.hot-search-chip {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* =========================================================================
   4. HỆ THỐNG PHÂN CỘT (GRID COLUMNS SYSTEM) - FIX CHỐNG TRÀN BÊN PHẢI
   ========================================================================= */
.grid-layout-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* Ép buộc ô lưới không tự phình to hơn màn hình */
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  width: 100%;
}

.main-column {
  min-width: 0; /* Cho phép cột nội dung chính thu nhỏ tối đa */
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

/* =========================================================================
   5. KHỐI KHUYÊN DÙNG TRANG CHỦ (BANNER PREMIUM SPOT) - SỬA LỖI TRƯỢT NGANG
   ========================================================================= */
.banner-premium-spot {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 186, 212, 0.05) 100%), var(--bg-secondary);
  border: 1.5px solid var(--primary);
  border-radius: 16px;
  padding: 1.25rem !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.badge-premium-flash {
  display: inline-block;
  background-color: var(--warning);
  color: #1e1b4b;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.premium-layout-box {
  display: flex;
  flex-direction: column; /* Đứng dọc khít 100% màn hình di động */
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  width: 100% !important;
}

.premium-visual-logo {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
}

.premium-details {
  width: 100%;
}

.premium-details h2 {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
  word-wrap: break-word;
  word-break: break-word;
}

.premium-meta-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.premium-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.premium-stars {
  color: var(--warning);
  font-size: 0.95rem;
}

.premium-score {
  font-size: 0.8rem;
  font-weight: 800;
}

.premium-badge-direct {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.premium-buttons {
  display: flex !important;
  flex-direction: column !important; /* Xếp chồng dọc hoàn hảo chống lồi viền phải */
  gap: 0.6rem !important;
  width: 100% !important;
}

.btn-primary-hero, .btn-secondary-hero {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important; /* Xóa bỏ giới hạn min-width cũ gây tràn */
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 800;
  border-radius: 8px;
  text-align: center;
}

.btn-primary-hero {
  background-color: var(--primary);
  color: #042f1a;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-secondary-hero {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
}

/* =========================================================================
   6. KHU VỰC THÔNG TIN HERO TRANG CHI TIẾT (APP DETAIL HERO SECTION)
   ========================================================================= */
.app-detail-hero-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.detail-hero-flex {
  display: flex;
  flex-direction: column; /* Đứng dọc khít màn hình di động */
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  width: 100% !important;
}

.detail-visual-logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border: 2px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-main);
}

.detail-visual-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-content {
  width: 100% !important;
}

.detail-display-title {
  font-size: 1.5rem !important;
  font-weight: 950;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: #fff;
  width: 100% !important;
  word-wrap: break-word !important; /* Tự bẻ dòng thông minh tiêu đề dài */
  word-break: break-word !important;
  overflow-wrap: break-word !important;
}

.detail-author-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  width: 100%;
}

.developer-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.badge-status-clean {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  display: inline-block;
}

.detail-specs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  width: 100%;
}

.detail-stars-stars {
  color: var(--warning);
}

.detail-rating-score {
  font-size: 0.85rem;
  font-weight: 800;
}

.specs-box {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
}

.detail-actions-panel {
  display: flex !important;
  flex-direction: column !important; /* Xếp dọc hoàn hảo */
  gap: 0.6rem !important;
  width: 100% !important;
}

.btn-main-action, .btn-sub-action {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  text-align: center;
  padding: 0.85rem 1rem !important;
  border-radius: 10px;
}

.btn-main-action {
  background-color: var(--primary);
  color: #042f1a;
  font-weight: 900;
  font-size: 1rem;
  animation: downloadPulse 2s infinite;
}

@keyframes downloadPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-sub-action {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.95rem;
}

/* =========================================================================
   7. LƯỚI THẺ ỨNG DỤNG (GRID & CARDS CO-GIÃN MOBILE) - SỬA LỖI PHÌNH LỀ
   ========================================================================= */
.catalog-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 4px solid var(--primary);
  padding-left: 0.6rem;
}

.section-heading-row h2 {
  font-size: 1.15rem;
  font-weight: 900;
}

.section-more-link {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

/* Sử dụng minmax(0, 1fr) thay vì 1fr để ép các ô lưới không phình to */
.cards-grid-display {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); 
  gap: 0.75rem;
  width: 100%;
}

.app-compact-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  min-width: 0; /* Quan trọng để flex không phình */
}

.card-clickable-area {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.card-visual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-logo-holder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
}

.card-logo-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verified-pill {
  font-size: 0.6rem;
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  font-weight: 800;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.card-content-segment {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.card-item-title {
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  width: 100%;
}

.card-metadata-line {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
}

.card-stars {
  color: var(--warning);
}

.card-summary-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.6em;
  line-height: 1.3;
}

/* Sửa lỗi phình lề dưới chân card */
.card-actions-row {
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.01);
  gap: 0.25rem;
  overflow: hidden; /* Khóa không cho lồi chữ */
}

.card-genre-pill {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%; /* Giới hạn để nhường chỗ cho nút tải */
}

.card-direct-button {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

/* =========================================================================
   8. KHỐI TẢI SIDEBAR (SIDEBAR TEXT-CENTER-PANEL) - TƯƠNG THÍCH 100%
   ========================================================================= */
.sidebar-block-card.text-center-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem 1rem !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.text-center-panel .sidebar-brand-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
  overflow: hidden;
  margin: 0 auto 1rem auto;
  flex-shrink: 0;
  box-shadow: var(--shadow-main);
}

.text-center-panel .sidebar-brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.text-center-panel .sidebar-widget-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.3;
  color: #ffffff;
  margin: 0 0 0.35rem 0;
  width: 100%;
  word-wrap: break-word;
  word-break: break-word;
}

.text-center-panel .sidebar-widget-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  font-weight: 700;
  line-height: 1.4;
  width: 100%;
}

.text-center-panel .btn-main-action.fill-width-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  padding: 0.85rem 1rem !important;
  font-size: 0.95rem !important;
  font-weight: 900;
  border-radius: 10px;
  background-color: var(--primary);
  color: #042f1a;
  text-align: center;
  margin: 0 auto;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: sidebarPulse 2s infinite;
}

@keyframes sidebarPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.text-center-panel .sidebar-quick-assurances {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  width: 100% !important;
}

.text-center-panel .sidebar-quick-assurances span {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.02);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100% !important;
  text-align: left;
  white-space: normal;
  line-height: 1.3;
}

/* =========================================================================
   9. DANH SÁCH XẾP HẠNG & TIỆN ÍCH SIDEBAR
   ========================================================================= */
.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

.sidebar-block-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem;
  border-radius: 10px;
}

.rank-badge {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}

.rank-1 { color: #f59e0b; background-color: rgba(245, 158, 11, 0.1); }
.rank-2 { color: #94a3b8; background-color: rgba(148, 163, 184, 0.1); }
.rank-3 { color: #b45309; background-color: rgba(180, 83, 9, 0.1); }

.sidebar-logo-frame {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-item-info {
  flex: 1;
  min-width: 0;
}

.sidebar-item-title {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.sidebar-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sidebar-item-arrow {
  font-size: 0.85rem;
  color: var(--primary);
}

.sidebar-pills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill-trending {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* =========================================================================
   10. CẨM NANG, DANH MỤC & CÁC TRANG CỐ ĐỊNH (GUIDES, CATEGORY, SIMPLE)
   ========================================================================= */
.info-guide-section {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  width: 100%;
}

.info-guide-section h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 1.25rem;
}

.guides-grid-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.guide-link-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
}

.guide-icon-box {
  font-size: 1.85rem;
  flex-shrink: 0;
}

.guide-text-box h3 {
  font-size: 0.95rem;
  font-weight: 850;
  margin-bottom: 0.3rem;
  color: #fff;
}

.guide-text-box p {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.category-header-banner {
  background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-bottom: 1.5rem;
}

.category-page-title {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.category-page-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.category-safety-alert {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.alert-body {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3.5rem;
}

.pagination-btn {
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 800;
}

.pagination-btn.active {
  background-color: var(--primary);
  color: #042f1a;
  border-color: var(--primary);
}

.pagination-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.sidebar-nav-pills {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sidebar-nav-pill {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.compliance-panel {
  background-color: rgba(245, 158, 11, 0.08);
  border: 1.5px solid rgba(245, 158, 11, 0.15);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 0.6rem;
}

.compliance-text-box {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sub-section-title {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  padding-left: 0.5rem;
  color: #fff;
}

.editorial-review-block {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
}

.content-formatted-container {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.deployment-steps-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
}

.steps-grid-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.step-card-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
}

.step-index-mark {
  position: absolute;
  top: 0.5rem;
  right: 0.85rem;
  font-size: 2.25rem;
  font-weight: 950;
  color: rgba(16, 185, 129, 0.08);
}

/* =========================================================================
   11. BẢNG THÔNG SỐ (SPECS TABLE) & FAQ ACCORDIONS
   ========================================================================= */
.specs-table-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  overflow-x: auto;
}

.technical-specs-table {
  width: 100% !important;
  table-layout: fixed !important; /* Đóng khung cố định không cho bảng phình ra */
  border-collapse: collapse;
}

/* Biến bảng thành danh sách dạng khối đứng trên di động */
.technical-specs-table tr {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 0;
}

.technical-specs-table tr:last-child {
  border-bottom: none;
}

.technical-specs-table th, .technical-specs-table td {
  width: 100% !important;
  display: block;
  padding: 0.15rem 0;
  border: none;
  text-align: left;
}

.technical-specs-table th {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.technical-specs-table td {
  font-size: 0.9rem;
  font-weight: 700;
}

.faq-accordions-block {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
}

.details-accordions-holder {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.details-accordions-holder details {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.details-accordions-holder summary {
  padding: 0.85rem;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-answer {
  padding: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  line-height: 1.5;
}

.simple-page-article-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem auto;
}

.simple-page-display-title {
  font-size: 1.75rem;
  font-weight: 950;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  color: #fff;
}

.simple-page-lead-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.simple-page-rule {
  border: none;
  border-top: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.simple-page-article-box h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.support-form-element {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-row-double {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.form-input {
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}

.form-input.text-area {
  min-height: 160px;
  resize: vertical;
}

.btn-form-submit {
  background-color: var(--primary);
  border: none;
  color: #042f1a;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
  font-size: 1rem;
}

/* =========================================================================
   12. CHÂN TRANG (FOOTER COMPONENT)
   ========================================================================= */
.footer-main {
  background-color: var(--bg-secondary);
  border-top: 2px solid var(--border-color);
  padding-top: 3rem;
  margin-top: 4rem;
  width: 100%;
}

.footer-container {
  display: flex;
  flex-direction: column; /* Xếp dọc hoàn hảo trên di động */
  gap: 2rem;
  padding: 0 1rem;
  width: 100%;
}

.footer-brand-segment {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-logo {
  font-size: 1.45rem;
  font-weight: 950;
  color: #fff;
}

.footer-about-text {
  font-size: 0.825rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-tag-wrap {
  display: flex;
  gap: 0.5rem;
}

.footer-verified-badge {
  font-size: 0.7rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link-group h4 {
  font-size: 0.85rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-main);
  border-left: 2px solid var(--primary);
  padding-left: 0.5rem;
}

.footer-link-group a {
  font-size: 0.825rem;
  color: var(--text-muted);
  padding: 0.15rem 0;
}

.footer-sub-bar {
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
  padding: 1.5rem 0;
  background-color: rgba(0, 0, 0, 0.25);
  width: 100%;
}

.footer-sub-bar .footer-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.terms-legal-block {
  font-size: 0.725rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.copyright-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* =========================================================================
   13. CẤU HÌNH TRÌNH DUYỆT DI ĐỘNG (MOBILE NAVIGATION BAR OVERRIDES)
   ========================================================================= */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  /* Tạo thanh cuộn menu nằm ngang kiểu app di động mượt mà */
  .navigation-bar {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    justify-content: flex-start;
    padding: 0.4rem 0.25rem 0.6rem 0.25rem;
    gap: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .navigation-bar::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    padding: 0 0.1rem;
    font-size: 0.95rem;
  }

  .search-container {
    max-width: 100%;
    width: 100%;
  }

  .search-bar {
    width: 100%;
  }
}

/* =========================================================================
   14. THÍCH ỨNG PHÂN GIẢI TRUNG BÌNH (TABLET & PHÂN GIẢI LỚN HƠN)
   ========================================================================= */
@media (min-width: 640px) {
  .hero-jumbotron h1 {
    font-size: 2.5rem;
  }

  /* Khôi phục hàng ngang cho khối Premium Khuyên dùng */
  .premium-layout-box {
    flex-direction: row !important;
    text-align: left;
    gap: 1.75rem;
  }

  .premium-indicators {
    justify-content: flex-start;
  }

  .premium-buttons {
    flex-direction: row !important;
    justify-content: flex-start;
    width: auto !important;
  }

  .btn-primary-hero, .btn-secondary-hero {
    flex: none;
    width: auto !important;
  }

  /* Khôi phục hàng ngang cho khối Hero chi tiết */
  .detail-hero-flex {
    flex-direction: row !important;
    text-align: left;
    align-items: flex-start;
  }

  .detail-author-row {
    flex-direction: row;
  }

  .detail-display-title {
    font-size: 1.85rem !important;
    text-align: left;
  }

  .detail-actions-panel {
    flex-direction: row !important;
    width: auto !important;
  }

  .btn-main-action, .btn-sub-action {
    flex: none;
    width: auto !important;
  }

  .steps-grid-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Khôi phục định dạng bảng chuẩn trên PC */
  .technical-specs-table tr {
    display: table-row;
  }

  .technical-specs-table th, .technical-specs-table td {
    display: table-cell;
    padding: 0.85rem 1.25rem;
  }

  .technical-specs-table th {
    width: 38% !important;
  }

  .form-row-double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .sidebar-block-card.text-center-panel {
    padding: 1.75rem 1.5rem !important;
  }
}

/* =========================================================================
   15. THÍCH ỨNG TRÊN MÀN HÌNH MÁY TÍNH LỚN (DESKTOP / LAPTOP)
   ========================================================================= */
@media (min-width: 1024px) {
  .container {
    padding: 0 1.25rem;
  }

  .nav-container {
    padding: 0.9rem 1.25rem;
    gap: 1.5rem;
  }

  .brand-title {
    font-size: 1.5rem;
  }

  .navigation-bar {
    gap: 1.75rem;
  }

  .nav-item {
    font-size: 0.95rem;
  }

  .search-container {
    max-width: 280px;
  }

  .hero-jumbotron {
    padding: 5rem 1.25rem 4.5rem;
  }

  .hero-jumbotron h1 {
    font-size: 2.85rem;
  }

  /* Khôi phục lại hệ thống phân chia 2 cột lớn */
  .grid-layout-columns {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2.5rem;
  }

  /* Chia 3 cột lưới thẻ ứng dụng cân đối trên PC */
  .cards-grid-display {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .app-compact-card {
    border-radius: 16px;
  }

  .card-clickable-area {
    padding: 1.25rem;
    gap: 0.85rem;
  }

  .card-logo-holder {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .card-item-title {
    font-size: 1.1rem;
  }

  .card-summary-desc {
    font-size: 0.825rem;
  }

  .card-actions-row {
    padding: 0.7rem 1.25rem;
  }

  .sidebar-block-card {
    padding: 1.5rem;
  }

  .sticky-sidebar-top {
    position: sticky;
    top: 6rem;
  }

  .guides-grid-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .steps-grid-box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .simple-page-article-box {
    padding: 3.5rem;
  }

  .footer-container {
    display: grid;
    grid-template-columns: 2.2fr repeat(3, minmax(0, 1fr));
    gap: 3.5rem;
  }
}
