/* 心力源 - 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    -webkit-text-size-adjust: 100%;
}

a {
    color: #4a90d9;
    text-decoration: none;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    html {
        font-size: 13px;
    }
}

/* 容器 */
.container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 页面头部 */
.page-header {
    background: #fff;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header .title {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}

.page-header .back-btn {
    font-size: 16px;
    color: #666;
    cursor: pointer;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
    line-height: 1.5;
    transition: opacity 0.2s;
}

.btn:active {
    opacity: 0.7;
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}

.btn-success {
    background: #52c41a;
    color: #fff;
}

.btn-warning {
    background: #faad14;
    color: #fff;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: #4a90d9;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
}

.tag-blue {
    background: #e6f7ff;
    color: #1890ff;
}

.tag-green {
    background: #f6ffed;
    color: #52c41a;
}

.tag-orange {
    background: #fff7e6;
    color: #fa8c16;
}

.tag-red {
    background: #fff1f0;
    color: #ff4d4f;
}

/* 评分星星 */
.stars {
    color: #fadb14;
    font-size: 16px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
}

/* 底部导航 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 100;
}

.tab-bar .tab-item {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: 11px;
    color: #999;
    cursor: pointer;
}

.tab-bar .tab-item.active {
    color: #4a90d9;
}

.tab-bar .tab-item .tab-icon {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    z-index: 201;
    width: 85%;
    max-width: 400px;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    margin-top: 20px;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    gap: 8px;
}

.pagination .page-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.pagination .page-btn.active {
    background: #4a90d9;
    color: #fff;
    border-color: #4a90d9;
}
