/**
 * 主样式文件
 * 移动优先设计
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #212529;
    --bg-color: #ffffff;
    --border-color: #dee2e6;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
}

.main-content {
    min-height: calc(100vh - 200px);
    padding-bottom: 2rem;
}

/* 导航栏 */
.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* 卡片样式 */
.auction-card,
.item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.auction-card:hover,
.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
    background-color: #f8f9fa;
}

/* 图片加载优化 */
img[loading="lazy"] {
    min-height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* 按钮 */
.btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* 轮播图 */
.carousel-item img {
    width: 100%;
    height: auto;
}

/* 分页 */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 页脚 */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

/* 面包屑导航 */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

/* 表格 */
.table-borderless td,
.table-borderless th {
    padding: 0.5rem 0;
}

/* 搜索表单 */
#search-form .form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* 快捷入口卡片 */
.card.bg-primary:hover,
.card.bg-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* 图片模态框 */
.modal-body img {
    cursor: zoom-out;
}

/* 固定底部操作栏 */
.fixed-bottom {
    z-index: 1030;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 链接样式 */
a {
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* 状态徽章颜色映射 */
.bg-pending {
    background-color: var(--secondary-color) !important;
}

.bg-listed {
    background-color: var(--primary-color) !important;
}

.bg-passed {
    background-color: var(--warning-color) !important;
}

.bg-sold {
    background-color: var(--success-color) !important;
}

/* section标题 */
.section-title {
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}
