/* =====================================================
   CSS RESET - Browser normalization
   Chuẩn hóa style mặc định của trình duyệt
   ===================================================== */

/* ─────────────────────────────────────────────────
   Box Model Reset
   ───────────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Remove tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* ─────────────────────────────────────────────────
   Document
   ───────────────────────────────────────────────── */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    line-height: var(--line-height-normal);
}

/* ─────────────────────────────────────────────────
   Typography Reset
   ───────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

p {
    margin: 0;
}

/* ─────────────────────────────────────────────────
   Lists
   ───────────────────────────────────────────────── */
ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ─────────────────────────────────────────────────
   Links
   ───────────────────────────────────────────────── */
a {
    text-decoration: none;
    color: inherit;
    background-color: transparent;
}

a:hover {
    text-decoration: none;
}

/* ─────────────────────────────────────────────────
   Forms & Inputs
   ───────────────────────────────────────────────── */
button,
input,
optgroup,
select,
textarea {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

button:focus {
    outline: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Remove spinners from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ─────────────────────────────────────────────────
   Images & Media
   ───────────────────────────────────────────────── */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
    display: block;
    max-width: 100%;
}

img {
    border-style: none;
}

/* ─────────────────────────────────────────────────
   Tables
   ───────────────────────────────────────────────── */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ─────────────────────────────────────────────────
   Misc
   ───────────────────────────────────────────────── */
hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--border-primary);
}

code,
kbd,
samp,
pre {
    font-family: var(--font-family-mono);
    font-size: 1em;
}

/* ─────────────────────────────────────────────────
   Scrollbar Styling (Dark Theme)
   ───────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-secondary);
}

/* ─────────────────────────────────────────────────
   Selection
   ───────────────────────────────────────────────── */
::selection {
    background: var(--accent-primary);
    color: var(--text-white);
}

::-moz-selection {
    background: var(--accent-primary);
    color: var(--text-white);
}