﻿/* style.css - 文升软件工作室样式文件 */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, system-ui, sans-serif; }
body { background: #aac9f8; color: #1e2b3a; }
.container { max-width: 1280px; margin: 0 auto; background: white; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }

/* Banner */
.banner {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%),url("img/banner.jpg");
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    /* background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none" width="100%" height="100%"><path d="M0 0 L100 0 L100 100 L0 100 Z" fill="%234f46e5" /><circle cx="20" cy="40" r="8" fill="%23ffd966" opacity="0.3"/><circle cx="70" cy="130" r="30" fill="%23ffffff" opacity="0.1"/></svg>'); */
    background-size: cover;
    background-blend-mode: overlay;
}
.banner span {
    background: rgba(0,0,0,0.2);
    padding: 0.5rem 2rem;
    border-radius: 60px;
    backdrop-filter: blur(4px);
}

/* 导航 */
.nav { display: flex; background: #236bc9; padding: 0 2rem; gap: 0.25rem; flex-wrap: wrap; }
.nav-item { padding: 1rem 2rem; color: #ecf0f1; font-weight: 500; cursor: pointer; transition: all 0.2s; border-bottom: 3px solid transparent; }
.nav-item:hover, .nav-item.active { background: #215999; border-bottom-color: #ffb347; color: white; }

/* 主布局 */
.home-layout { display: flex; padding: 1.5rem; gap: 1.8rem; }
.left-side { width: 26%; min-width: 220px; }
.right-side { width: 74%; }

/* 卡片 */
.card {
    background: white; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    padding: 1.2rem 1rem; margin-bottom: 1.5rem; border: 1px solid #eef2f6;
}
.card-title {
    font-weight: 600; font-size: 1.15rem; padding-bottom: 0.6rem; margin-bottom: 0.8rem;
    border-bottom: 2px solid #e9edf2; color: #1e3c5c; display: flex; align-items: center; justify-content: space-between;
}
.card-title i { margin-right: 8px; color: #f39c12; }

/* 通知 */
.notice-item {
    padding: 0.5rem 0; border-bottom: 1px dashed #dce5ec; font-size: 0.95rem;
    color: #2c3e50; cursor: pointer; transition: 0.15s; display: flex; align-items: center;
}
.notice-item:hover { color: #2a5298; padding-left: 5px; background: #f5f9ff; }
.notice-item:last-child { border: none; }
.notice-icon { margin-right: 8px; font-size: 1rem; }
.notice-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 分类 */
.category-list { list-style: none; }
.category-list li {
    padding: 0.5rem 0.8rem; margin: 4px 0; background: #f8fafd; border-radius: 40px;
    cursor: pointer; font-weight: 500; transition: 0.1s; border-left: 4px solid transparent;
    display: flex; justify-content: space-between; align-items: center;
}
.category-list li:hover { background: #eef3f9; border-left-color: #f39c12; }
.category-list li.active { background: #e1eefa; border-left-color: #2a5298; font-weight: 600; }
.category-tag, .category-count {
    font-size: 0.8rem; background: #e6eef9; padding: 0.2rem 0.8rem;
    border-radius: 30px; color: #1e4e7c; font-weight: normal;
}

/* 搜索 */
.search-box { display: flex; gap: 8px; margin-bottom: 8px; }
.search-box input {
    flex: 1; padding: 10px 12px; border: 2px solid #e2eaf2; border-radius: 30px;
    font-size: 0.95rem; outline: none; transition: all 0.2s; background: white;
}
.search-box input:focus { border-color: #f39c12; box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1); }
.search-btn {
    background: #2a5298; color: white; border: none; border-radius: 30px;
    padding: 0 20px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.search-btn:hover { background: #1e3c72; transform: translateY(-2px); }
.search-tips { font-size: 0.85rem; color: #6b7b8c; min-height: 20px; margin-top: 4px; }

/* 排行榜 */
.rank-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #edf2f7; font-size: 0.95rem; }
.rank-name { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: #2c5282; }
.rank-name:hover { text-decoration: underline; }
.rank-count { background: #e6eef9; padding: 0.2rem 0.7rem; border-radius: 40px; font-size: 0.8rem; font-weight: 600; color: #1e4e7c; }

/* 友情链接 */
.friend-links { display: flex; flex-direction: column; gap: 8px; }
.friend-link-item {
    display: flex; align-items: center; padding: 8px 12px; background: #f8fafd;
    border-radius: 40px; transition: all 0.2s; text-decoration: none; color: #2c3e50;
}
.friend-link-item:hover { background: #e1eefa; transform: translateX(3px); }
.link-icon { width: 24px; height: 24px; margin-right: 10px; display: flex; align-items: center; justify-content: center; background: #e6eef9; border-radius: 50%; font-size: 14px; }
.link-name { flex: 1; font-size: 0.95rem; font-weight: 500; }
.link-arrow { color: #8a9cb0; font-size: 12px; opacity: 0; transition: opacity 0.2s; }
.friend-link-item:hover .link-arrow { opacity: 1; }

/* 轮播 */
.slider { width: 100%; overflow: hidden; position: relative; height: 200px; border-radius: 16px; }
.slider-track { display: flex; width: fit-content; animation: scrollLeft 25s linear infinite; }
.slider:hover .slider-track { animation-play-state: paused; }
.slider-item { flex: 0 0 auto; width: 100%; height: 200px; position: relative; cursor: pointer; }
.slider-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.slider-item .overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: white;
    padding: 15px; font-weight: 600; font-size: 1.2rem; border-radius: 0 0 16px 16px;
}
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-400%); } }

/* 推荐软件 */
.rec-small { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.rec-card {
    display: flex; gap: 1rem; background: #f9fcff; border-radius: 20px;
    padding: 1rem; align-items: center; border: 1px solid #dee9f2; cursor: pointer; transition: 0.15s;
}
.rec-card:hover { background: #f0f8ff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.rec-card img { width: 70px; height: 70px; border-radius: 16px; object-fit: cover; background: #f0f4fa; }
.rec-info h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.rec-info p { font-size: 0.8rem; color: #4b6584; margin: 2px 0; }

/* 最近更新 */
.recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1rem 0 1.8rem; }
.recent-item { text-align: center; cursor: pointer; transition: 0.15s; }
.recent-item:hover { transform: translateY(-2px); }
.recent-item img {
    width: 100%; aspect-ratio: 1/0.9; border-radius: 16px; object-fit: cover;
    background: #f0f4fa; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.recent-item p { font-size: 0.95rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 软件列表 */
.software-list { display: flex; flex-direction: column; gap: 1.2rem; min-height: 500px; }
.list-item {
    display: flex; gap: 1.2rem; background: #fbfdff; border-radius: 24px;
    padding: 1rem; border: 1px solid #e2eaf2; cursor: pointer; transition: 0.15s;
}
.list-item:hover { background: #f3f9ff; border-color: #b3cef0; transform: translateY(-2px); }
.list-item img { width: 100px; height: 100px; border-radius: 20px; object-fit: cover; background: #f0f4fa; }
.list-desc { flex: 1; }
.list-desc h3 { margin-bottom: 6px; color: #1e3b5c; display: flex; align-items: center; gap: 8px; }
.list-desc p { color: #3d5a78; font-size: 0.92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 5px 0; }
.list-desc small { display: block; margin-top: 8px; color: #6b7b8c; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eef2f6; }
.pagination-btn {
    padding: 0.5rem 1.2rem; background: #f0f5fc; border-radius: 30px;
    cursor: pointer; color: #1e3c5c; font-weight: 500; transition: 0.15s; border: 1px solid #d5e2f0;
}
.pagination-btn:hover:not(.disabled) { background: #e1eefa; border-color: #a0c0e0; }
.pagination-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-info { color: #4b6584; font-size: 0.95rem; }
.page-size-selector { display: flex; align-items: center; gap: 0.5rem; margin-left: 1rem; }
.page-size-selector select { padding: 0.3rem; border-radius: 20px; border: 1px solid #d5e2f0; background: white; cursor: pointer; }

/* 详情页 */
.detail-page { padding: 2rem; }
.detail-card {
    background: white; border-radius: 28px; box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    padding: 2rem; border: 1px solid #eef4f8;
}
.software-meta {
    display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; background: #f2f7fd;
    padding: 1.2rem 2rem; border-radius: 40px; margin: 1.5rem 0 2rem 0;
}
.section-title {
    font-size: 1.3rem; font-weight: 600; color: #1e3c5c;
    margin: 2rem 0 1rem 0; padding-bottom: 0.5rem; border-bottom: 2px solid #e9edf2;
}
.section-content { margin-bottom: 2rem; line-height: 1.7; padding: 1rem; background: #f8fbfe; border-radius: 16px; white-space: pre-line; }

/* 按钮 */
.btn-download {
    background: #27ae60; color: white; padding: 0.7rem 2rem; border-radius: 60px;
    font-weight: 600; display: inline-block; margin: 0.5rem 0; cursor: pointer; text-decoration: none; transition: 0.15s;
}
.btn-download:hover { background: #2ecc71; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3); }
.btn-buy {
    background: #f39c12; color: white; padding: 0.7rem 2rem; border-radius: 60px;
    font-weight: 600; display: inline-block; margin: 0.5rem 0 0.5rem 1rem; cursor: pointer; text-decoration: none; transition: 0.15s;
}
.btn-buy:hover { background: #f1c40f; transform: translateY(-2px); box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3); }

/* 软件截图 */
.software-gallery { margin-top: 1.5rem; }
.gallery-title { font-size: 1.2rem; font-weight: 600; color: #1e3c5c; margin-bottom: 1rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.gallery-item { background: #f8fbfe; border-radius: 16px; overflow: hidden; padding: 0.5rem; }
.gallery-item:hover {transform: scale(1.02);border-color: #f39c12;}
.gallery-item img { 
    width: 100%; 
    height: auto; 
    max-width: 100%; 
    max-height: 300px; 
    object-fit: contain; 
    display: block;
}
/* 图片预览模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.image-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* 左右切换按钮 */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.4);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* 图片计数器 */
.image-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}
/* 教程链接 */
.tutorial-link-list { margin-top: 1.5rem; }
.tutorial-link-item {
    background: #f1f7fe; padding: 0.8rem 1.2rem; border-radius: 40px;
    margin: 0.5rem 0; cursor: pointer; display: inline-block; margin-right: 0.8rem; transition: 0.15s;
}
.tutorial-link-item:hover { background: #e1eefa; transform: translateY(-2px); }

/* 模态框 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 1000; justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }
.notice-modal {
    background: white; border-radius: 28px; padding: 2rem; max-width: 500px;
    width: 90%; position: relative;
}
.notice-modal h2 { color: #1e3c5c; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #e9edf2; }
.notice-time { color: #8a9cb0; font-size: 0.9rem; margin-bottom: 1.5rem; }
.notice-content { line-height: 1.8; color: #2c3e50; white-space: pre-line; }
.hidden { display: none !important; }

/* 页脚 */
.footer-note { text-align: center; padding: 2rem; color: #6b7b8c; border-top: 1px solid #eaeff4; }

/* 响应式 */
@media screen and (max-width: 768px) {
    .home-layout { flex-direction: column; }
    .left-side, .right-side { width: 100%; }
    .recent-grid { grid-template-columns: repeat(2, 1fr); }
    .rec-small { grid-template-columns: 1fr; }
    .list-item { flex-direction: column; text-align: center; }
}