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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #303133;
    background-color: #f5f5f5;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* 图片加载优化 */
img[src*=".svg"] {
    shape-rendering: geometricPrecision;
}

/* 图片懒加载占位符 */
img[data-src] {
    opacity: 0;
}

img[data-src].loaded {
    opacity: 1;
}

/* 图片加载失败样式 */
img.error {
    background: linear-gradient(135deg, #f8f9fa, #e4e7ed);
    position: relative;
}

img.error::after {
    content: '图片加载失败';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #909399;
    font-size: 12px;
}

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

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

/* 清除浮动 */
.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
