:root {
  --ag-white: #fff;
}

/* ===========================
   KHÓA SCROLL & ẨN POPUP KHÁC
   =========================== */
html.ag-lock,
body.ag-lock {
  overflow: hidden !important;
}
html.ag-lock #popupCookie,
html.ag-lock .popup-cookie,
html.ag-lock .popup-main,
html.ag-lock .modal,
html.ag-lock .backdrop__body-backdrop___1rvky {
  display: none !important;
}

/* ===========================
   OVERLAY TOÀN MÀN HÌNH
   =========================== */
.agegate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  color: var(--ag-white);
  text-align: center;
  background: url('//bizweb.dktcdn.net/100/607/494/themes/1064643/assets/age-gate-bg.jpg?1765255094560') center/cover no-repeat;
  display: flex;
  flex-direction: column;
}

/* ===========================
   CONTAINER 3 VÙNG
   =========================== */
.ag-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

/* ===========================
   VÙNG TRÊN
   =========================== */
.ag-top {
  width: 100%;
  padding-top: clamp(28px, 8svh, 80px);
  justify-content: center;
  display: flex;
}
.ag-logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
}

/* ===========================
   VÙNG GIỮA
   =========================== */
.ag-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
}
.ag-title {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 500;
  margin: 8px 0 35px;
  color: var(--base-color);
  letter-spacing: 0.02em;
}
.ag-sub {
  font-size: clamp(18px, 2.2vw, 22px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 20px;
}

/* ===========================
   BUTTONS + THÔNG BÁO LỖI
   =========================== */
.ag-actions {
  position: relative;
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ag-btn {
  appearance: none;
  cursor: pointer;
  min-width: 220px;
  padding: 14px 22px;
  border-radius: 999px;
  line-height: 1;
  font-weight: 500;
  font-size: 15px;
  border: 2px solid var(--ag-white);
  color: var(--ag-white);
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.08s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.ag-btn:hover,
.ag-btn:focus-visible {
  background: var(--ag-white);
  color: #111;
  border-color: var(--ag-white);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}
.ag-btn:active {
  transform: translateY(1px) scale(0.99);
}

/* Thông báo lỗi (bám ngay dưới 2 nút) */
.ag-error-msg {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 25px);
  width: 100%;
  max-width: 420px;
  color: #ff5555;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.ag-error-msg.show {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================
   VÙNG DƯỚI
   =========================== */
.ag-bottom {
  width: min(1100px, 100%);
  margin: 18px 0 clamp(20px, 6svh, 60px);
}
.ag-locale {
  font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.03em;
  margin: 0 0 15px;
}

/* Cờ Việt Nam */
.ag-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.ag-flag img {
  width: 32px;
  height: 20px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Tạo khoảng cách giữa dòng chữ locale và dòng có cờ */
.ag-locale .ag-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px; /* ← chỉnh khoảng cách giữa dòng chữ và cờ tại đây */
}

/* Legal text */
.ag-legal {
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 400;
  line-height: 1.75;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
}
.ag-legal a {
  color: var(--ag-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===========================
   RESPONSIVE & GIẢM CHUYỂN ĐỘNG
   =========================== */
@media (max-width: 480px) {
  .ag-btn {
    min-width: 180px;
    padding: 13px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ag-btn {
    transition: none;
  }
}