/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fafafa;
    color: #333;
}

/* 头部样式（最终版，覆盖初始定义） */
header {
    background: linear-gradient(45deg, #5c8689, #3e9094), url('your-background-image.jpg');
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    color: rgb(55, 193, 147);
    padding: 15px 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* 头部内容容器 */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 20px; /* 增加元素间距 */
}

/* 头部标题 */
header h1 {
    font-size: 42px;
    font-weight: bold;
    letter-spacing: 2px;
    margin: 10px;
    text-transform: uppercase;
    white-space: nowrap; /* 防止标题换行 */
}

/* 用户信息区域 */
.user-info {
    font-size: 16px;
    text-align: right;
    font-weight: 500;
    white-space: nowrap; /* 防止文字换行 */
}

.user-info p {
    margin: 5px 0;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    flex: 1; /* 让搜索栏占据中间空间 */
    justify-content: center;
    max-width: 550px; /* 限制最大宽度，避免太宽 */
}

.search-bar input {
    width: 100%; /* 占满父容器 */
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 25px;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #8f1919 !important; /* 强制设为纯黑色，覆盖继承样式 */
    -webkit-text-fill-color: #8b8a8a; /* 兼容 WebKit 内核浏览器 */
}

.search-bar button {
    padding: 10px 25px;
    background-color: #7f5dac;
    border: none;
    color: rgb(0, 0, 0);
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.search-bar button:hover {
    background-color: #88619d;
}

/* 退出登录链接 */
.user-info a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    padding: 5px 15px;
    background-color: #82c287;
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.user-info a:hover {
    background-color: #8ad59d;
}

/* 导航栏样式（最终版） */
nav {
    background: linear-gradient(135deg, #4a90e2, #5d74db, #3b6ab6);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 导航列表 */
.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style-type: none;
}

/* 导航列表项 */
.nav-list li {
    margin: 0 20px;
}

/* 导航链接 */
.nav-list a {
    text-decoration: none;
    font-size: 18px;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: transparent;
    transition: all 0.3s ease-in-out;
}

/* 导航链接悬浮效果 */
.nav-list a:hover {
    background-color: #ffbc00;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 内容容器 */
.container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.catalog {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 固定四列 */
    gap: 20px;
    margin-top: 30px;
    padding: 0 20px;
}

.catalog .item {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 320px; /* 固定高度，保持统一 */
}

.catalog .item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

.catalog .item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.catalog .item .info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.catalog .item .info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-bottom: 1px;
}

.catalog .item .info p {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.4;
    overflow-wrap: break-word; /* 自动换行 */
}

.catalog .item .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.catalog .item .price {
    font-size: 16px;
    font-weight: bold;
    color: #e89b00; /* 付费颜色 */
}

.catalog .item .free {
    font-size: 16px;
    font-weight: bold;
    color: #28a745; /* 免费颜色 */
}

.catalog .item .info button {
    background: linear-gradient(90deg,#ffbc00,#ffa500);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: rgb(255, 255, 255);
    transition: all 0.3s ease;
}

.catalog .item .info button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}














/* ========== 全局页脚样式 ========== */
.global-footer {
    margin-top: 20px;
    padding: 10px 0;
    background: #333;
    color: #fff;
    text-align: center;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #ffbc00;
}

.footer-copyright {
    font-size: 13px;
    color: #999;
}

.footer-contact {
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}