/* ============================================
   CSS RESET - Reset CSS mặc định
   Chức năng: Loại bỏ style mặc định của trình duyệt
   Mục đích: Đảm bảo giao diện nhất quán trên mọi trình duyệt
   ============================================ */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text-primary, #0b2540);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Đảm bảo tất cả text elements sử dụng màu trắng trong dark mode */
[data-theme="dark"],
[data-theme="dark"] * {
  color: var(--text-primary);
}

/* Override cho các element có màu cố định */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] a,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] label,
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  color: var(--text-primary) !important;
}

/* Giữ màu cho các element đặc biệt (buttons, badges, etc.) */
[data-theme="dark"] button,
[data-theme="dark"] .btn,
[data-theme="dark"] .badge {
  color: inherit;
}

/* Reset form elements */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default link styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Đảm bảo tất cả media elements không vượt quá viewport */
canvas, video, iframe {
  max-width: 100%;
  height: auto;
}

