/**
 * ===================================================
 * base.css — Kiểu dáng nền tảng (Base Styles)
 * ===================================================
 * Mô tả: Reset CSS mặc định, thiết lập font chữ,
 *         kiểu dáng chung cho body, liên kết, tiêu đề.
 *         Bao gồm cả thanh cuộn tùy chỉnh (custom scrollbar).
 * Phụ thuộc: variables.css (biến CSS)
 * ===================================================
 */

/* === NẠP FONT CHỮ TỪ GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;700;900&family=Plus+Jakarta+Sans:wght@400;500;700;800&family=Poppins:wght@400;500;700;900&display=swap');

/* === RESET CSS MẶC ĐỊNH === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === THIẾT LẬP BODY === */
body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;          /* Ẩn thanh cuộn ngang */
  -webkit-font-smoothing: antialiased; /* Làm mượt font trên WebKit */
}

/* Chế độ sáng cho trang con (inner pages) */
body.light-mode {
  background-color: var(--inner-bg);
  color: var(--inner-text);
}

/* === LIÊN KẾT === */
a {
  text-decoration: none;
  color: inherit;
}

/* === DANH SÁCH === */
ul {
  list-style: none;
}

/* === TIÊU ĐỀ === */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-black);
  line-height: 1.2;
}

h1 {
  font-size: var(--font-hero);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-h2);
}

h3 {
  font-size: var(--font-h3);
}

/* === ĐOẠN VĂN === */
p {
  font-size: var(--font-body);
  color: var(--text-secondary);
}

.light-mode p {
  color: var(--text-muted);
}

/* === THANH CUỘN TÙY CHỈNH (Chrome/Edge) === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--purple-soft);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--purple-core);
}

/* === VÙNG CHỌN VĂN BẢN === */
::selection {
  background: var(--purple-core);
  color: #fff;
}
