/* css/base.css - 基础全局样式 */

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a56d4;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --border-color: #e9ecef;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    position: relative;
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 重置链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* 表单基础样式 */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-bold { font-weight: bold; }
.text-muted { color: var(--gray-color); }
.hidden { display: none; }
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 基础按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 针对触摸设备优化交互 */
    a, button {
        min-height: 44px; /* 苹果推荐的最小触摸目标尺寸 */
        min-width: 44px;
    }
}

/* 响应式设计基础 */
@media (max-width: 768px) {
    body {
        font-size: 13px;
    }
    
    /* 移动端触摸优化 */
    button, 
    a[role="button"],
    .btn {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}