:root {
    --main-color: #bf0005;
    --main-color-hover: #a00004;
    --container-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 页头样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.sidebar .nav-item {
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar .nav-item:hover {
    background-color: #e9ecef;
}

.sidebar .nav-item.active {
    background-color: var(--main-color);
    color: #fff;
}

/* Banner样式 */
.banner {
    background: linear-gradient(135deg, var(--main-color) 0%, #d91c23 100%);
    color: #fff;
    border-radius: 12px;
    padding: 40px;
}

/* 卡片样式 */
.card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* 按钮样式 */
.btn-main {
    background-color: var(--main-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-main:hover {
    background-color: var(--main-color-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--main-color);
    border: 1px solid var(--main-color);
    border-radius: 8px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--main-color);
    color: #fff;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

.pagination button.active {
    background-color: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group.inline-flex label {
    display: inline;
    margin-bottom: 0;
    font-weight: normal;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input[type="checkbox"] {
    width: auto;
    padding: 0;
    border: none;
    margin: 0;
}

.form-group input:focus {
    outline: none;
    border-color: var(--main-color);
}

/* 侧边栏样式 */
.sidebar-right {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0;
}

.footer a {
    color: #fff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 面包屑样式 */
.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
}

.breadcrumb li {
    color: #6c757d;
}

.breadcrumb li a {
    color: var(--main-color);
    text-decoration: none;
}

.breadcrumb li:last-child {
    color: #333;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    margin-left: 8px;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.modal-body {
    padding: 20px;
}

/* 评分样式 */
.star-rating {
    color: #ffc107;
    font-size: 18px;
}

/* 文字截断 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 图片容器 */
.img-container {
    position: relative;
    overflow: hidden;
}

.img-container img {
    transition: transform 0.3s ease;
}

.img-container:hover img {
    transform: scale(1.05);
}

/* 浏览次数图标 */
.view-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6c757d;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .container {
        padding: 0 20px;
    }
}