/**
 * 传奇版本库CMS - 前台样式
 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #e74c3c;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 顶部导航 */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    padding: 15px 0;
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    flex-direction: column;
    color: #fff;
}

.logo .logo-main {
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.logo .logo-sub {
    font-size: 12px;
    opacity: 0.9;
}

.search-box {
    flex: 1;
    max-width: 400px;
    margin: 0 30px;
}

.search-box form {
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-box button {
    padding: 10px 25px;
    background: #f39c12;
    border: none;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

.search-box button:hover {
    background: #e67e22;
}

.header-links {
    display: flex;
    gap: 15px;
}

.header-links a {
    padding: 8px 15px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
}

.header-links a:hover {
    background: rgba(255,255,255,0.3);
}

/* 主导航 */
.main-nav {
    background: #c0392b;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li a {
    display: block;
    padding: 12px 25px;
    color: #fff;
    font-size: 14px;
    transition: background 0.3s;
}

.main-nav li a:hover,
.main-nav li.active a {
    background: rgba(0,0,0,0.1);
}

/* 广告位 */
.ads-banner {
    background: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.ad-item {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-text {
    position: absolute;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 筛选区域 */
.filter-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.filter-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-label {
    width: 80px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
}

.filter-options {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-options a {
    padding: 5px 15px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
}

.filter-options a:hover,
.filter-options a.active {
    background: #e74c3c;
    color: #fff;
}

/* 公告栏 */
.notice-section {
    margin-bottom: 20px;
}

.notice-box {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-icon {
    font-size: 20px;
}

.notice-text {
    font-size: 14px;
}

/* 版本列表 */
.version-list {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.version-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.version-table th {
    background: #5a9bd5;
    color: #fff;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #4a8bc5;
    height: 45px;
    vertical-align: middle;
}

.version-table td {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    text-align: center;
    height: 50px;
    vertical-align: middle;
    white-space: nowrap;
}

.version-table tr:nth-child(even) {
    background: #f5f9fc;
}

.version-table tr:nth-child(odd) {
    background: #fff;
}

.version-table tr:hover {
    background: #e8f4fc;
}

.col-tag {
    width: 100px;
    white-space: nowrap;
}

.col-title {
    min-width: 400px;
    white-space: nowrap;
}

.version-table td.col-title {
    text-align: left;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
    line-height: 1.4;
}

.col-date {
    width: 120px;
    white-space: nowrap;
}

.col-view {
    width: 100px;
    white-space: nowrap;
}

.col-price {
    width: 80px;
}

.col-heat {
    width: 80px;
}

.col-action {
    width: 100px;
    white-space: nowrap;
}

.col-engine {
    width: 120px;
    white-space: nowrap;
}

.col-vertype {
    width: 100px;
    white-space: nowrap;
}

.col-author {
    width: 100px;
    white-space: nowrap;
}

.engine-tag,
.vertype-tag,
.author-tag {
    display: inline-block;
    padding: 3px 10px;
    background: #3498db;
    color: #fff;
    border-radius: 3px;
    font-size: 12px;
}

.engine-default,
.vertype-default {
    background: #95a5a6;
}

/* 作者信息 */
.author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.author-name {
    color: #333;
    font-size: 13px;
}
/* 作者等级图标 */
.author-level-icon {
    width: auto;
    height: 20px;
    cursor: pointer;
}
/* 作者销售等级图标 */
.author-sales-level-icon {
    width: auto;
    height: 20px;
    cursor: pointer;
    margin-left: 2px;
}
/* 作者链接 */
.author-name-link {
    text-decoration: none;
    color: inherit;
}
.author-name-link:hover .author-name {
    color: #3498db;
    text-decoration: underline;
}
.author-level-link {
    display: inline-block;
    text-decoration: none;
}
.author-level-link:hover {
    opacity: 0.8;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
}

.tag-top {
    background: #e74c3c;
}

.tag-hot {
    background: #f39c12;
}

.tag-rec {
    background: #27ae60;
}

.tag-normal {
    background: #3498db;
}

/* 按钮 */
.btn-view,
.btn-qq {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-view {
    background: #3498db;
    color: #fff;
}

.btn-view:hover {
    background: #2980b9;
    color: #fff;
}

.btn-qq {
    background: #e74c3c;
    color: #fff;
}

.btn-qq:hover {
    background: #c0392b;
    color: #fff;
}

/* 价格 */
.price {
    color: #e74c3c;
    font-weight: bold;
}

.price-free {
    color: #27ae60;
    font-weight: bold;
}

.heat {
    color: #666;
    font-size: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 13px;
}

.pagination a:hover {
    background: #e74c3c;
    color: #fff;
}

.pagination .current {
    background: #e74c3c;
    color: #fff;
}

/* 底部 */
.footer {
    background: #2c3e50;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
    font-size: 13px;
    opacity: 0.8;
}

/* ==================== 新版详情页样式 ==================== */
.detail-section-new {
    padding: 20px 0;
}

/* 顶部信息区 */
.detail-top {
    display: flex;
    gap: 30px;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 左侧图片 */
.detail-image {
    flex: 0 0 400px;
    max-width: 400px;
}

.detail-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.detail-image img:hover {
    transform: scale(1.02);
}

/* 右侧信息 */
.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 4px;
    overflow: hidden;
}

.info-label {
    width: 100px;
    background: #5dade2;
    color: #fff;
    padding: 10px 15px;
    font-size: 13px;
    text-align: center;
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    padding: 10px 15px;
    font-size: 13px;
    color: #333;
}

.info-value a {
    color: #3498db;
}

.info-value a:hover {
    text-decoration: underline;
}

.price-value .text-success {
    color: #27ae60;
    font-weight: bold;
}

.price-value .text-danger {
    color: #e74c3c;
    font-weight: bold;
}

/* 底部按钮 */
.detail-buttons {
    display: flex;
    gap: 15px;
}

.btn-detail {
    flex: 1;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s;
}

.btn-blue {
    background: #3498db;
    color: #fff;
}

.btn-blue:hover {
    background: #2980b9;
    color: #fff;
}

.btn-orange {
    background: #e67e22;
    color: #fff;
}

.btn-orange:hover {
    background: #d35400;
    color: #fff;
}

.btn-green {
    background: #27ae60;
    color: #fff;
}

.btn-green:hover {
    background: #219a52;
    color: #fff;
}

/* 内容区块 */
.detail-content-box {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-header {
    background: #5dade2;
    padding: 12px 20px;
}

.content-title {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

.content-body {
    padding: 20px;
    line-height: 1.8;
}

.content-body p {
    margin-bottom: 10px;
}

/* 下载信息 */
.download-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.download-row:last-child {
    margin-bottom: 0;
}

.download-label {
    width: 80px;
    color: #666;
    font-size: 13px;
}

.download-link {
    color: #3498db;
    word-break: break-all;
}

.download-password {
    background: #e74c3c;
    color: #fff;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
}

/* 截图网格 */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.screenshot-grid .screenshot-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.screenshot-grid .screenshot-item img:hover {
    transform: scale(1.05);
}

/* 图片预览 */
.image-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.image-viewer img {
    max-width: 90%;
    max-height: 90%;
}

.image-viewer .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

/* 无数据 */
.no-data {
    text-align: center;
    padding: 50px;
    color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .main-nav ul {
        flex-wrap: wrap;
    }

    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-label {
        width: 100%;
        margin-bottom: 10px;
    }

    .version-table {
        font-size: 12px;
    }

    .version-table th,
    .version-table td {
        padding: 8px;
    }

    /* 详情页响应式 */
    .detail-top {
        flex-direction: column;
    }

    .detail-image {
        flex: 1;
        max-width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .detail-buttons {
        flex-direction: column;
    }
}

/* ==================== 会员中心公共样式 ==================== */
.member-layout {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}
.member-sidebar {
    width: 250px;
    min-width: 250px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px 0;
    overflow: visible;
}
.member-avatar {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}
.member-avatar .avatar-with-frame {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}
.member-avatar .avatar-with-frame .avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}
.member-avatar .avatar-with-frame .avatar-frame {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    object-fit: contain;
    pointer-events: none;
}
.member-avatar h4 {
    margin: 0;
    color: #333;
}
.member-avatar p {
    margin: 5px 0 0;
    color: #999;
    font-size: 14px;
}
.member-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.member-level img {
    width: 16px;
    height: 16px;
    border-radius: 0;
    margin: 0;
}
.member-level-icon {
    margin-top: 10px;
    display: block;
    text-align: center;
}
.member-level-icon img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 36px;
    object-fit: contain;
    border-radius: 0;
    display: inline-block;
}
/* 等级图标容器 - 用于并排显示销售等级和用户等级 */
.member-level-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}
.member-level-icons .member-level-icon {
    margin: 0;
    padding: 0;
    line-height: 0;
}
.member-level-icons .member-level-icon:first-child {
    margin-right: 8px;
}
.member-level-icons .member-level-icon img {
    width: auto;
    height: 32px;
    border-radius: 0;
    margin: 0;
    padding: 0;
    display: block;
}
/* 勋章展示容器 */
.member-badges {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}
/* 勋章图标 */
.member-badge-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s;
    border-radius: 0 !important;
    display: block;
}
.member-badge-icon:hover {
    transform: scale(1.15);
}
/* 勋章展开按钮 */
.member-badges-expand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    font-size: 12px;
}
.member-badges-expand:hover {
    background: #d0d0d0;
}
.member-badges-expand i {
    font-size: 14px;
    margin-bottom: 2px;
}
.member-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.member-menu li a {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}
.member-menu li a:hover,
.member-menu li a.active {
    background: #f8f9fa;
    color: #3498db;
    border-left-color: #3498db;
}
.member-menu li a i {
    width: 25px;
    margin-right: 10px;
}
