/* 聚合盒子 · 前台样式 */
:root {
    --bg: #f4f3f0;
    --panel: #ffffff;
    --ink: #1f1f1f;
    --muted: #777777;
    --brand: #e65100;
    --brand-2: #ff8f00;
    --line: #e8e6e1;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --radius: 0.5rem;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "微软雅黑", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    display: block;
}

/* 页面外壳 */
.page {
    width: 100%;
    margin: 0 auto;
    background: #fbfbf8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 4.6rem;
}

/* 顶栏 */
.top_bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    height: 3.25rem;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top_title {
    font-size: 1.2rem;
    font-weight: 700;
}

/* 轮播 */
.banner_box {
    margin: 0.9rem 0.95rem 0;
}

.banner_view {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #eeeeee;
    box-shadow: var(--shadow);
}

.banner_track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.banner_track::-webkit-scrollbar {
    display: none;
}

.banner_item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    padding-top: 45.45%;
    background: #eeeeee;
}

.banner_item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner_dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.6rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.banner_dots i {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    display: block;
}

.banner_dots i.on {
    background: #ffffff;
    width: 1rem;
    border-radius: 0.2rem;
}

/* 公告滚动 */
.notice_box {
    margin: 0.75rem 0.95rem 0;
}

.notice_bar {
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.1rem 0.6rem 0.9rem;
    overflow: hidden;
}

.notice_badge {
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #ffffff;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notice_window {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 90%, transparent);
}

.notice_stream {
    display: inline-flex;
    will-change: transform;
    animation: marquee_run 18s linear infinite;
}

.notice_stream span {
    padding-right: 3.75rem;
    font-size: 0.86rem;
    color: var(--ink);
    white-space: nowrap;
}

@keyframes marquee_run {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.notice_bar:hover .notice_stream {
    animation-play-state: paused;
}

/* 内容区 */
.main_area {
    padding: 0 0.95rem;
    flex: 1;
}

.block {
    margin-top: 1.6rem;
}

.block_head {
    text-align: center;
    margin-bottom: 0.25rem;
}

.block_title {
    font-size: 1.32rem;
    font-weight: 700;
}

.block_sub {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.9rem;
    text-align: center;
}

/* 应用网格（CSS Grid） */
.app_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.app_card {
    background: var(--panel);
    border-radius: var(--radius);
    padding: 0.9rem 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.app_card:active {
    transform: scale(0.97);
}

.card_icon {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.card_icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card_name {
    font-size: 0.95rem;
    font-weight: 600;
}

.card_desc {
    font-size: 0.78rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
}

.card_btn {
    background: var(--brand);
    color: #ffffff;
    padding: 0.45rem 1.6rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

/* 流光字 + 复制按钮 */
.flow_text {
    background: linear-gradient(90deg, #e65100, #ff8f00, #f9a825, #43a047, #1e88e5, #8e24aa, #e91e63);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: flow_shift 3.5s linear infinite;
}

@keyframes flow_shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.flow_text--cool {
    background: linear-gradient(90deg, #1e88e5, #00bcd4, #8e24aa, #e91e63, #1e88e5);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: flow_shift_cool 3.5s linear infinite;
}

@keyframes flow_shift_cool {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.copy_btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.45rem 1.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 2px 8px rgba(230, 81, 0, 0.35);
    cursor: pointer;
}

.copy_btn:active {
    transform: scale(0.96);
}

/* 底部声明 */
.foot_box {
    text-align: center;
    padding: 1.4rem 1.1rem 1.6rem;
    color: #9b9b9b;
    border-top: 1px solid var(--line);
    margin-top: 0.6rem;
}

.foot_main {
    color: #8f8f8f;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
}

.foot_copy {
    margin-top: 0.5rem;
    color: #b7b7b7;
    font-size: 0.78rem;
    line-height: 1.6;
}

/* 底部导航 */
.bottom_nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: #ffffff;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-around;
    padding: 0.55rem 0 max(0.55rem, env(safe-area-inset-bottom));
}

.nav_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--muted);
    font-size: 0.68rem;
    padding: 0.25rem 1rem;
}

.nav_item .ico {
    font-size: 1.32rem;
}

.nav_item.on {
    color: var(--brand);
}

/* 图标 */
.ico {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: -0.125em;
}

/* 响应式 */
@media (min-width: 640px) {
    .app_grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }
}

@media (min-width: 960px) {
    .page {
        max-width: 1000px;
    }
    .app_grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 1200px) {
    body {
        padding: 2rem;
    }
    .page {
        max-width: 1000px;
        min-height: calc(100vh - 4rem);
        border-radius: 0.75rem;
        overflow: hidden;
        border: 1px solid var(--line);
    }
}
