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

html {
    height: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    color: var(--color-ink);
    background-color: var(--color-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow: hidden; /* Prevent body scroll, layout will handle it */
    /* Mô hình chiều cao: body = cột flex đúng bằng viewport thật.
       100dvh thay 100vh để không lỗi trên iOS Safari (thanh URL co giãn). */
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--color-ink);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

h1 { font-size: var(--font-size-h1); font-weight: 800; }
h2 { font-size: var(--font-size-h2); font-weight: 700; }
h3 { font-size: var(--font-size-h3); font-weight: 600; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-primary-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-round);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-ink-lighter);
}
