/**
 * common.css - 公共样式
 * 
 * 包含：
 * 1. CSS 变量定义
 * 2. 重置样式
 * 3. 通用工具类
 */

/* ==================== CSS 变量 ==================== */
:root {
    /* 主色调 */
    --primary-color: #ff6b35;
    --primary-hover: #e55a2b;
    --primary-light: #fff5f2;
    
    /* 文字颜色 */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-placeholder: #999999;
    
    /* 背景颜色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-dark: #1a1a2e;
    
    /* 边框颜色 */
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    
    /* 状态颜色 */
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #ff4d4f;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
}

/* ==================== 重置样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input {
    border: none;
    outline: none;
    font-family: inherit;
}

/* ==================== 通用工具类 ==================== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}
