/* ============================================================
   前端全局样式
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: "Microsoft Yahei", -apple-system, BlinkMacSystemFont, sans-serif;
    padding-bottom: 120px;
}

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

/* ── 主容器 ── */
.page-wrapper {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    background: #141414;
    box-shadow: 0 0 20px rgba(0,0,0,.3);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 80px 16px 0;
}

/* ── 头部 ── */
.nav-top {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 80px;
    background: #111;
    z-index: 10000;
    display: flex;
    justify-content: center;
}

.nav-top-inner {
    width: 100%;
    max-width: 750px;
    height: 100%;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-top .site-logo {
    font-size: 40px;
    font-weight: bold;
    color: #D4AF37;
}

.nav-top .btn-apply {
    font-size: 18px;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 500;
    transition: all .2s;
}

.nav-top .btn-apply:hover {
    background: #fff;
    color: #D4AF37;
}

/* ── 公告 ── */
.notice-marquee-wrapper {
    width: 100%;
    height: 50px;
    background: #1a1a1a;
    border: 1px solid #D4AF37;
    margin: 15px auto 0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.notice-marquee-wrapper p {
    margin: 0;
    white-space: nowrap;
    position: absolute;
    color: #fff;
    font-size: 28px;
    font-family: "Microsoft Yahei";
    font-weight: bold;
    padding-left: 100%;
    animation: marquee linear infinite;
}

@keyframes marquee {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* ── 头部轮播 ── */
.banner-slider-container {
    width: 100%;
    aspect-ratio: 10 / 1;
    margin: 20px auto;
    background: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .5s ease-in-out;
}

.slider-item {
    min-width: 100%;
    height: 100%;
    display: block;
}

/* ── 金色分隔线 ── */
.gold-divider {
    width: 100%;
    height: 1px;
    background: #D4AF37;
    margin: 10px auto;
}

/* ── Tab 标签 ── */
.list-tabs-header {
    width: 100%;
    height: 60px;
    margin: 10px auto 20px;
    background: #141414;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
}

.tab-btn {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all .2s;
    border-bottom: 4px solid transparent;
}

.tab-btn.active {
    color: #D4AF37;
    border-bottom: 4px solid #D4AF37;
}

/* ── 卡片网格 ── */
.list-block {
    width: 100%;
    margin: 0 auto;
    display: none;
}

.list-block.active {
    display: block;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 10px 0;
    gap: 14px;
}

.list-item {
    width: auto;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 12px 21px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    transition: transform .2s;
}

.list-item:hover {
    transform: translateY(-3px);
    background: #222;
}

.list-item .icon-box {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
    background: #252525;
}

.list-item .icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-item .item-title {
    font-size: 16px;
    color: #ccc;
    font-weight: bold;
    margin: 12px 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.list-item .btn-enter {
    width: 100%;
    height: 42.4px;
    line-height: 40.4px;
    background: transparent;
    border: 1px solid #D4AF37;
    color: #D4AF37;
    font-size: 16px;
    text-align: center;
    border-radius: 22px;
    font-weight: bold;
    transition: all .2s;
    box-sizing: border-box;
}

.list-item:hover .btn-enter {
    background: #D4AF37;
    color: #0a0a0a;
}


/* ── 下载推荐 ── */
.download-recommend-section {
    width: 100%;
    margin: 10px auto 30px;
    display: none;
}

.download-recommend-section.show {
    display: block;
}

.recommend-title-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.recommend-title-wrap .fire-icon {
    color: #FFD700;
    font-size: 20px;
    margin-right: 6px;
}

.recommend-title-wrap .title-text {
    font-size: 20px;
    font-weight: bold;
    color: #d0d0d0;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recommend-row-link {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .2s;
}

.recommend-row-link:hover {
    transform: translateY(-2px);
}

.recommend-row-item {
    width: 100%;
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transition: background .2s;
}

.recommend-row-link:hover .recommend-row-item {
    background: #222;
}

.recommend-row-item .row-avatar {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    background: #252525;
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
    margin-right: 20px;
    flex-shrink: 0;
}

.recommend-row-item .row-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recommend-row-item .row-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recommend-row-item .info-top {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.recommend-row-item .app-name {
    font-size: 22px;
    font-weight: bold;
    color: #d0d0d0;
    margin-right: 10px;
}

.recommend-row-item .app-badge {
    background: #D4AF37;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 5px;
}

.recommend-row-item .download-count {
    font-size: 15px;
    color: #777;
}

.recommend-row-item .btn-download {
    background: linear-gradient(135deg, #FFD700, #B8860B);
    color: #1a1a1a;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(212,175,55,.3);
    flex-shrink: 0;
}

/* ── 底飘广告 ── */
.fixed-bottom-float-ad {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 810px;
    height: 108px;
    z-index: 9999;
    transition: opacity .25s;
}

.fixed-bottom-float-ad .ad-banner-link {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 -4px 15px rgba(0,0,0,.15);
}

.fixed-bottom-float-ad .btn-close-ad {
    position: absolute;
    top: 6px; right: 6px;
    width: 22px; height: 22px;
    background: rgba(0,0,0,.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,.3);
    user-select: none;
    transition: background .2s;
}

.fixed-bottom-float-ad .btn-close-ad:hover {
    background: rgba(0,0,0,.8);
}

/* ── 底部 ── */
.site-footer {
    background: #141414;
    border-top: 1px solid #2a2a2a;
    padding: 25px 15px;
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: auto;
}

/* ============================================================
   响应式媒体查询
   ============================================================ */

@media (max-width: 768px) {
    .nav-top { height: 60px; }
    .nav-top-inner { padding: 0 16px; }
    .nav-top .site-logo { font-size: 28px; }
    .nav-top .btn-apply { font-size: 15px; padding: 5px 14px; }
    .page-wrapper { padding-top: 60px; }
    .notice-marquee-wrapper { height: 40px; }
    .notice-marquee-wrapper p { font-size: 20px; }
    .tab-btn { font-size: 15px; }
    .grid-container { gap: 10px; padding: 8px 0; }
    .list-item { border-radius: 12px; padding: 10px 12px 12px; }
    .list-item .icon-box { border-radius: 18px; }
    .list-item .item-title { font-size: 14px; margin: 8px 0; }
    .list-item .btn-enter { font-size: 14px; height: 36px; line-height: 34px; border-radius: 18px; }
    .recommend-title-wrap .title-text { font-size: 18px; }
    .recommend-row-item .app-name { font-size: 18px; }
    .recommend-row-item .btn-download { padding: 8px 20px; font-size: 14px; }
}

@media (max-width: 540px) {
    .grid-container { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .recommend-row-item { padding: 12px; }
    .recommend-row-item .row-avatar { width: 72px; height: 72px; border-radius: 14px; margin-right: 12px; }
    .recommend-row-item .app-name { font-size: 16px; }
    .recommend-row-item .download-count { font-size: 13px; }
    .recommend-row-item .btn-download { padding: 7px 16px; font-size: 13px; }
    .ad-1-wrap { border-radius: 6px; }
}

@media (max-width: 375px) {
    .nav-top .site-logo { font-size: 22px; }
    .nav-top .btn-apply { font-size: 13px; padding: 4px 10px; }
    .grid-container { grid-template-columns: repeat(2, 1fr); }
    .tab-btn { font-size: 13px; }
    .list-tabs-header { height: 50px; }
    .notice-marquee-wrapper p { font-size: 18px; }
    .recommend-row-item .app-name { font-size: 15px; }
}
