/**
 * CSS Reset
 * 基础样式重置
 */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

html, body {
    height: 100%;
}

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

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

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

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

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

ul, ol {
    list-style: none;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
}

pre, code {
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

/* 选中文字样式 */
::selection {
    background: var(--color-primary);
    color: white;
}

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
