/* ==================== 基础变量与全局重置 ==================== */
:root {
    --primary-red: #c00000;
    --premium-gold: #ff9800;
    --premium-gradient: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    --bg-gray: #f4f4f4;
    --border-color: #e5e5e5;
    --text-main: #333;
    --text-light: #999;
    --container-width: 1200px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: "Microsoft YaHei", system-ui, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ==================== 导航栏 ==================== */
header { 
    background: #1f1f1f; 
    color: #fff;
    border-bottom: 2px solid var(--primary-red); 
    position: sticky; 
    top: 0; 
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
}

.container { 
    max-width: var(--container-width); 
    margin: 0 auto; 
    width: 100%; 
}

.nav-wrapper { 
    display: flex; 
    align-items: center; 
    height: 80px; 
    position: relative; 
}

.logo-wrapper {
    display: flex;
    align-items: center;
}

.logo { 
    font-size: 24px; 
    font-weight: bold;
    color: #fff; 
    display: flex; 
    align-items: center; 
    flex-shrink: 0; 
}

.logo-icon { 
    width: 36px; 
    height: 36px; 
    background: var(--primary-red); 
    border-radius: 50%; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-right: 8px; 
    font-size: 20px; 
    font-style: normal; 
}

.pc-nav { 
    margin-left: 40px; 
    display: flex; 
    height: 100%; 
    align-items: center; 
}

.nav-item { 
    position: relative; 
    display: flex; 
    align-items: center; 
    height: 100%; 
    padding: 0 18px; 
    color: #eee; 
    font-size: 15px; 
    white-space: nowrap; 
    transition: color 0.2s;
    overflow: visible !important;
}

.nav-item:hover, .nav-item.active { 
    color: #fff; 
    font-weight: bold; 
}

.nav-item > a {
    height: 100%;
    display: flex;
    align-items: center;
}

.has-submenu::after { 
    content: ''; 
    display: inline-block; 
    border: 4px solid transparent; 
    border-top-color: currentColor; 
    margin-left: 6px; 
    transform-origin: center 25%;
    transition: transform 0.3s; 
}

.nav-item:hover.has-submenu::after { 
    transform: rotate(180deg); 
}

.submenu { 
    position: absolute; 
    top: 80px; 
    left: 0; 
    background: #2a2a2a; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    display: none; 
    min-width: 150px; 
    border-top: 2px solid var(--primary-red); 
    z-index: 9999;
}

.nav-item:hover .submenu { 
    display: block !important; 
}

.submenu a { 
    display: block !important; 
    padding: 12px 20px; 
    color: #ddd; 
    font-size: 14px; 
    border-bottom: 1px solid #333; 
    font-weight: normal !important; 
    transition: all 0.2s;
}

.submenu a:hover { 
    background: #353535; 
    color: #fff; 
}

.search-btn { 
    margin-left: auto; 
    cursor: pointer; 
    padding: 10px; 
    font-size: 22px; 
    color: #eee; 
    z-index: 101; 
}

/* ==================== 搜索弹窗 ==================== */
.search-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    z-index: 430;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.search-mask.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.search-overlay.active {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    right: 30px;
    top: 30px;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f1f1;
}

.search-close:hover {
    color: #c00000;
    background: #fef0f0;
    transform: rotate(90deg);
}

.search-container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.search-header {
    margin-bottom: 30px;
}

.search-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.search-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: #c00000;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 24px;
    font-style: normal;
}

.search-logo .logo-text {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.search-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

.search-form {
    margin-bottom: 30px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 6px 6px 6px 20px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.search-input-wrapper:focus-within {
    border-color: #c00000;
    box-shadow: 0 8px 25px rgba(192, 0, 0, 0.12);
}

.search-icon {
    font-size: 20px;
    color: #999;
    margin-right: 10px;
}

.search-input {
    flex: 1;
    border: none;
  
    font-size: 18px;
    padding: 12px 0;
    background: transparent;
    color: #333;
	    outline: none;

}

.search-input::placeholder {
    color: #999;
    font-size: 16px;
}

.search-btn-submit {
    background: #c00000;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn-submit:hover {
    background: #a00000;
    transform: translateY(-2px);
}

.search-btn-submit:active {
    transform: translateY(0);
}

.search-tips {
    margin-top: 12px;
    font-size: 14px;
    color: #999;
    text-align: left;
    padding-left: 20px;
}

.search-hot-tags {
    margin-bottom: 40px;
}

.tag-title {
    font-size: 16px;
    color: #666;
    margin-right: 10px;
}

.hot-tag {
    display: inline-block;
    padding: 8px 18px;
    background: #f5f5f5;
    border-radius: 20px;
    margin: 0 8px 10px 0;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.hot-tag:hover {
    background: #c00000;
    color: #fff;
    transform: translateY(-2px);
}

.search-footer {
    font-size: 14px;
    color: #999;
}

.search-footer strong {
    color: #c00000;
}

/* ==================== 面包屑 ==================== */
.breadcrumb-section { margin-top: 10px; }
.breadcrumb-box { 
    background: #fff; 
    padding: 10px 20px; 
    font-size: 13px; 
    color: #888; 
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}
.today-update { font-size: 12px; color: #666; }
.today-update em { 
    color: var(--primary-red); 
    font-weight: bold;
    margin: 0 2px; 
}

/* ==================== 主内容布局 ==================== */
main { flex: 1; }
.main-layout { 
    display: flex; 
    gap: 15px; 
    margin: 10px auto 15px; 
    align-items: flex-start; 
}
.app-list-container {
    flex: 1;
    min-width: 0;
    overflow: visible !important;
    height: auto !important;
}
.app-list {
    overflow: visible !important;
    height: auto !important;
}
.app-list-title {
    background: #fff;
    padding: 12px 15px;
    border-bottom: 2px solid var(--primary-red);
    margin-bottom: 10px;
    border-radius: 4px 4px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.app-list-title h1 {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    margin: 0;
}
.app-list-title h1 .title-dot {
    width: 4px;
    height: 16px;
    background: var(--primary-red);
    margin-right: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ==================== 应用列表项 ==================== */
.app-item { 
    background: #fff; 
    border-radius: 4px; 
    padding: 15px; 
    margin-bottom: 10px; 
    display: flex; 
    position: relative; 
    overflow: hidden; 
    min-height: 160px; 
}
.app-icon-wrap { 
    width: 200px; 
    height: 150px; 
    background: #E2F0FB; 
    border-radius: 6px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
    margin-right: 15px; 
    overflow: hidden; 
}
.app-icon { 
    width: 110px; 
    height: 110px; 
    background: #fff; 
    border-radius: 18px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.app-item:hover .app-icon { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.18), 0 6px 10px rgba(0,0,0,0.08); 
}
.app-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url(/soft/loading.svg) no-repeat center/contain;
    z-index: 1;
    animation: rotate 1s linear infinite;
}
@keyframes rotate {
    100% { transform: rotate(360deg); }
}
.app-icon img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
    opacity: 0;
    position: relative;
    z-index: 2;
    transition: opacity 0.4s ease;
}
.app-icon img.loaded { opacity: 1; }
.app-icon.img-loaded::before { display: none; }
.app-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    min-width: 0; 
    padding-top: 2px; 
}
.app-title-wrapper { margin-bottom: 6px; }
.app-title { 
    font-size: 17px; 
    font-weight: bold; 
    line-height: 1.4; 
    transition: color 0.2s; 
    display: block;
}
.app-title:hover { color: var(--primary-red); }
.app-desc {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    text-indent: 2em;
    display: -webkit-box;           
    -webkit-box-orient: vertical;   
    -webkit-line-clamp: 3;          
    overflow: hidden;               
    line-height: 1.6;
    max-height: 4.8em;              
}
.app-meta { 
    font-size: 12px; 
    color: var(--text-light); 
    border-top: 1px dashed #eee; 
    padding-top: 10px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: auto; 
}
.meta-left { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.meta-cate { 
    color: var(--primary-red); 
    background: #fff1f1; 
    padding: 2px 8px; 
    border-radius: 2px; 
}
.meta-tags { display: flex; gap: 8px; }
.meta-tags a { 
    background: #f5f5f5; 
    padding: 2px 8px; 
    border-radius: 2px; 
    transition: all 0.2s; 
    display: inline-block;
}
.meta-tags a:hover { 
    background: #eee; 
    color: var(--primary-red); 
}
.new-tag, .new-top { 
    position: absolute; 
    top: 0; 
    right: 0; 
    width: 40px; 
    height: 40px; 
    background: linear-gradient(45deg, transparent 50%, var(--primary-red) 50%); 
    z-index: 10; 
}
.new-tag::after { content: '最新'; }
.new-top::after { content: '推荐'; }
.new-tag::after, .new-top::after {
    color: #fff; 
    font-size: 10px; 
    position: absolute; 
    top: 5px; 
    right: 2px; 
    transform: rotate(45deg); 
    font-weight: bold; 
}

/* ==================== 侧边栏 ==================== */
.sidebar { width: 320px; flex-shrink: 0; position: sticky; top: 90px; align-self: flex-start; }
.side-widget { 
    background: #fff; 
    border-radius: 4px; 
    padding: 15px; 
    margin-bottom: 12px; 
}
.side-title { 
    border-left: 4px solid var(--primary-red); 
    padding-left: 10px; 
    font-weight: bold; 
    margin-bottom: 15px; 
    font-size: 16px; 
}
.side-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.side-cat-item { 
    display: block; 
    background: #f9f9f9; 
    padding: 8px 5px; 
    text-align: center; 
    font-size: 14px; 
    color: #555; 
    border-radius: 3px; 
    transition: all 0.2s; 
    border: 1px solid #f0f0f0; 
}
.side-cat-item:hover { 
    background: var(--primary-red); 
    color: #fff; 
    border-color: var(--primary-red); 
}
.rank-list { list-style: none; }
.rank-item { 
    display: flex; 
    align-items: center; 
    padding: 10px 0; 
    border-bottom: 1px solid #f5f5f5; 
    font-size: 14px; 
}
.rank-item:last-child { border-bottom: none; }
.rank-num { 
    width: 20px; 
    height: 20px; 
    background: #eee; 
    color: #999; 
    font-size: 11px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 2px; 
    margin-right: 12px; 
    flex-shrink: 0; 
    font-weight: bold; 
}
.rank-item:nth-child(1) .rank-num { background: #ff4d4f; color: #fff; }
.rank-item:nth-child(2) .rank-num { background: #ff7a45; color: #fff; }
.rank-item:nth-child(3) .rank-num { background: #ffaa00; color: #fff; }
.rank-name { 
    color: #444; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    flex: 1; 
    transition: color 0.2s;
}
.rank-name:hover { color: var(--primary-red); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-link { 
    font-size: 11px; 
    color: #666; 
    background: #f5f5f5; 
    padding: 4px 8px; 
    border-radius: 4px; 
    transition: all 0.2s; 
    border: 1px solid transparent; 
}
.tag-link:hover { 
    background: #fff; 
    color: var(--primary-red); 
    border-color: #ffd6d6; 
    box-shadow: 0 2px 5px rgba(192,0,0,0.05); 
}

/* ==================== 分页 ==================== */
.pagination { display: flex; justify-content: center; gap: 6px; margin: 20px 0; }
.page-item { 
    padding: 6px 12px; 
    background: #fff; 
    border: 1px solid #ddd; 
    color: #666; 
    border-radius: 4px; 
    font-size: 13px; 
    transition: all 0.2s;
}
.page-item:hover, .page-item.active { 
    background: var(--primary-red); 
    color: #fff; 
    border-color: var(--primary-red); 
}

/* ==================== 回到顶部 ==================== */
#backToTop { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 45px; 
    height: 45px; 
    background: #fff; 
    color: #666; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    z-index: 99; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    transition: all 0.3s; 
}
#backToTop:hover { 
    background: var(--primary-red); 
    color: #fff; 
    border-color: var(--primary-red); 
}
#backToTop svg { width: 20px; height: 20px; fill: currentColor; }

/* ==================== 底部 ==================== */
footer {
    background: #2a2a2a;
    color: #aaa;
    margin-top: auto;
    font-size: 13px;
    padding-bottom: 20px;
    border-top: 3px solid var(--primary-red);
}
.footer-friend {
    width: 100%;
    padding: 10px 0;
    border-top: 1px solid #444;
    margin-top: 5px;
}
.footer-friend-title { color: #ccc; margin-right: 12px; font-weight: bold; }
.footer-friend-list { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-friend-list a:hover { color: var(--primary-red); }
.copyright {
    text-align: center;
    padding-top: 10px;
    line-height: 1.7;
    border-top: 1px solid #444;
}

/* ==================== 响应式适配 ==================== */
.mobile-only { display: none !important; }
@media (max-width: 992px) {
    .sidebar { width: 280px; }
}
@media (max-width: 768px) {
    .app-list-title {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    .app-list-title h1 {
        font-size: 14px;
        line-height: 1.4;
    }
    .search-overlay {
        padding: 15px;
    }
    .search-close {
        right: 20px;
        top: 20px;
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
    .search-logo .logo-text {
        font-size: 24px;
    }
    .search-desc {
        font-size: 14px;
    }
    .search-input {
        font-size: 16px;
        padding: 10px 0;
    }
    .search-btn-submit {
        padding: 10px 20px;
        font-size: 16px;
    }
    .hot-tag {
        padding: 6px 14px;
        margin: 0 6px 8px 0;
    }
    .container { padding: 0 10px; }
    .pc-nav, .sidebar, .app-desc, .pc-text, .meta-tags, .meta-cate { display: none !important; }
    .mobile-only { display: block !important; }
    .nav-wrapper { height: 55px; }
    .mobile-menu-btn { 
        font-size: 24px; 
        margin-right: 15px; 
        cursor: pointer; 
        color: #eee; 
        z-index: 2001;
        position: relative;
    }
    .mobile-drawer { 
        position: fixed; 
        left: -260px; 
        top: 0; 
        width: 260px; 
        height: 100%; 
        background: #1f1f1f; 
        color: #fff;
        z-index: 3001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
        padding: 20px;  
        overflow-y: auto; 
    }
    .mobile-drawer.active { left: 0; }
    .mobile-drawer a { 
        display: block; 
        padding: 12px 10px; 
        border-bottom: 1px solid #333; 
        color: #eee;
    }
    .m-nav-group { position: relative; border-bottom: 1px solid #333; }
    .mobile-drawer .m-nav-group a { border-bottom: none; }
    .m-has-submenu { 
        padding-right: 50px !important; 
    }
    .m-has-submenu::after { 
        content: '▼'; 
        position: absolute; 
        right: 0; 
        top: 0; 
        width: 50px;
        height: 100%;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 10px; 
        color: #ccc; 
        transition: transform 0.3s; 
        border-left: 1px solid #333;
        background: rgba(255,255,255,0.02);
    }
    .m-has-submenu.open::after { transform: rotate(180deg); }
    .m-submenu { 
        background: #2a2a2a; 
        display: none; 
        padding-left: 20px; 
    }
    .app-list-container { width: 100%; }
    .app-item { padding: 12px; margin-bottom: 10px; min-height: auto; border: 1px solid #f0f0f0; }
    .app-icon-wrap { width: 80px; height: 80px; margin-right: 12px; border-radius: 10px; background: transparent; }
    .app-icon { width: 65px; height: 65px; border-radius: 12px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
    .app-title { font-size: 15px; height: auto; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; padding-right: 25px; }
}