/* ========================================
   StageQuiz 全局重置样式
   依赖: design-tokens.css (必须先引入)
   ======================================== */

/* --- 基础重置 --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    background: var(--bg-gradient);
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 链接 --- */
a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* --- 标题 --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

/* --- 表单元素 --- */
input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
    border: none;
    background: none;
}

input {
    background: transparent;
}

input::placeholder {
    color: var(--text-muted);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset;
    transition: background-color 5000s ease-in-out 0s;
}

button {
    cursor: pointer;
}

/* --- 媒体 --- */
img,
video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* --- 列表 --- */
ul,
ol {
    list-style: none;
}

/* --- 滚动条 (Webkit) --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-glow);
}

/* --- 选中文字 --- */
::selection {
    background: var(--color-primary-glow);
    color: var(--text-primary);
}

/* ========================================
   布局约束 (响应式)
   ======================================== */
body {
    width: 100%;
    margin: 0 auto;
}

/* ========================================
   工具类 (向后兼容)
   ======================================== */

/* 浮动 */
.fl { float: left !important; }
.flr { float: right !important; }

/* 清除浮动 */
.clearfix::before,
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

/* 字号工具类 (px) */
.f36 { font-size: 18px !important; }
.f34 { font-size: 17px !important; }
.f32 { font-size: 16px !important; }
.f30 { font-size: 15px !important; }
.f28 { font-size: 14px !important; }
.f26 { font-size: 13px !important; }
.f24 { font-size: 12px !important; }
.f22 { font-size: 11px !important; }
.f20 { font-size: 10px !important; }
.f18 { font-size: 9px !important; }

/* 颜色 */
.fff { color: #fff !important; }

/* 隐藏 */
.hd { display: none; }

/* 页脚 */
footer {
    width: 100%;
    text-align: center;
    font-size: var(--font-size-sm);
    position: absolute;
    bottom: var(--spacing-sm);
    color: var(--text-muted);
}
