﻿:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: rgba(67,97,238,0.08);
    --primary-gradient: linear-gradient(135deg, #4361ee, #7209b7);
    --secondary: #7209b7;
    --accent: #f72585;
    --accent2: #4cc9f0;
    --accent3: #f9c74f;
    --accent4: #06d6a0;
    --accent5: #fb5607;
    --bg: #f0f2f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4ff;
    --border-color: #e2e5ef;
    --border-light: #eceff5;
    --text-primary: #1a1a2e;
    --text-secondary: #6c7a92;
    --text-muted: #9aa8b9;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-glow: 0 4px 20px rgba(67,97,238,0.2);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --rainbow: linear-gradient(90deg, #f72585, #fb5607, #f9c74f, #06d6a0, #4cc9f0, #4361ee, #7209b7);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 0 1 auto;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.navbar-brand img, .navbar-brand .default-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: contain;
}

.navbar-brand .default-logo {
    background: var(--rainbow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.navbar-brand span {
    color: #000;
    font-weight: 700;
    font-size: 17px;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.25s;
    font-size: 14px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-links a img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
}

/* Hero Section */
.hero {
    padding: 100px 0 10px;
    text-align: center;
    position: relative;
    background:
        radial-gradient(720px 360px at 16% -14%, rgba(67,97,238,0.10) 0%, rgba(67,97,238,0) 68%),
        radial-gradient(720px 360px at 84% -8%, rgba(247,37,133,0.08) 0%, rgba(247,37,133,0) 68%),
        linear-gradient(180deg, #f7f8ff 0%, #f3f4fa 48%, var(--bg) 100%);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -200px;
    left: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(67,97,238,0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: -320px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(247,37,133,0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Carousel */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto 28px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    touch-action: pan-y;
}

.carousel-container.is-dragging { cursor: grabbing; }
.carousel-container.is-dragging .carousel-slide { pointer-events: none; }

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 280px;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a73e8, #6c5ce7);
    background-size: cover;
    background-position: center;
    padding: 60px 40px;
    position: relative;
    min-height: 280px;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
    pointer-events: none;
}

.carousel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.carousel-title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.carousel-subtitle {
    font-size: clamp(14px, 1.6vw, 18px);
    color: rgba(255,255,255,0.85);
    margin-bottom: 0;
    line-height: 1.5;
}

.carousel-btn {
    position: absolute;
    right: 22px;
    bottom: 20px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0;
}

.carousel-container:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(255,255,255,0.25);
}

.carousel-arrow-left { left: 12px; }
.carousel-arrow-right { right: 12px; }

/* Search */
.search-box {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.search-box input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(67,97,238,0.08), 0 0 0 6px rgba(247,37,133,0.04);
    background: linear-gradient(135deg, #fff, #f8f9ff);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

/* Sticky search (原搜索框滚出视野后出现) */
.sticky-search {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 10px 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.sticky-search.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.sticky-search .search-box {
    max-width: 640px;
}

.sticky-search .search-box input {
    padding-top: 11px;
    padding-bottom: 11px;
}

.category-sidebar {
    padding: 0 24px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.25s;
}

.category-tab:hover {
    border-color: transparent;
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(67,97,238,0.2);
    transform: translateY(-1px);
}

.category-tab.active {
    background: var(--rainbow);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 20px rgba(247,37,133,0.25);
}

.category-tab i { font-size: 14px; color: var(--text-secondary); }

.category-tab:hover i, .category-tab.active i { color: #fff; }

.category-tab img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: contain;
}

/* Items Grid */
.content-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 0 24px 100px;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--rainbow);
    opacity: 0;
    transition: opacity 0.3s;
}

.item-card:hover::before {
    opacity: 1;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(67,97,238,0.12), 0 8px 30px rgba(247,37,133,0.06);
    border-color: rgba(67,97,238,0.12);
}

.item-card .icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), rgba(247,37,133,0.06));
    transition: all 0.3s;
    overflow: hidden;
}

.item-card:nth-child(3n+1) .icon-wrap {
    background: linear-gradient(135deg, rgba(67,97,238,0.1), rgba(114,9,183,0.06));
}
.item-card:nth-child(3n+2) .icon-wrap {
    background: linear-gradient(135deg, rgba(247,37,133,0.1), rgba(251,86,7,0.06));
}
.item-card:nth-child(3n+3) .icon-wrap {
    background: linear-gradient(135deg, rgba(6,214,160,0.1), rgba(76,201,240,0.06));
}

.item-card:nth-child(3n+1):hover { border-color: rgba(67,97,238,0.15); }
.item-card:nth-child(3n+2):hover { border-color: rgba(247,37,133,0.15); }
.item-card:nth-child(3n+3):hover { border-color: rgba(6,214,160,0.15); }

.item-card:hover .icon-wrap {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 8px 25px rgba(67,97,238,0.12);
}

.item-card:nth-child(3n+1):hover .icon-wrap { box-shadow: 0 8px 25px rgba(67,97,238,0.15); }
.item-card:nth-child(3n+2):hover .icon-wrap { box-shadow: 0 8px 25px rgba(247,37,133,0.12); }
.item-card:nth-child(3n+3):hover .icon-wrap { box-shadow: 0 8px 25px rgba(6,214,160,0.12); }

.item-card .icon-wrap .default-icon {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.05));
}

.item-card .icon-wrap img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.item-card:nth-child(3n+1) .icon-wrap .default-icon { color: #4361ee; }
.item-card:nth-child(3n+2) .icon-wrap .default-icon { color: #f72585; }
.item-card:nth-child(3n+3) .icon-wrap .default-icon { color: #06d6a0; }

.item-card:nth-child(6n+4) .icon-wrap .default-icon { color: #f9c74f; }
.item-card:nth-child(6n+5) .icon-wrap .default-icon { color: #7209b7; }
.item-card:nth-child(6n+6) .icon-wrap .default-icon { color: #fb5607; }

.item-card .icon-wrap .default-icon {
    font-size: 24px;
    transition: all 0.3s;
}

.item-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.item-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-card .item-category {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.item-card .item-category.cat-color-0 { background: rgba(67,97,238,0.1); color: #4361ee; }
.item-card .item-category.cat-color-1 { background: rgba(247,37,133,0.1); color: #f72585; }
.item-card .item-category.cat-color-2 { background: rgba(6,214,160,0.1); color: #06b88a; }
.item-card .item-category.cat-color-3 { background: rgba(249,199,79,0.15); color: #d4a017; }
.item-card .item-category.cat-color-4 { background: rgba(114,9,183,0.1); color: #7209b7; }
.item-card .item-category.cat-color-5 { background: rgba(247,127,0,0.12); color: #e06e00; }
.item-card .item-category.cat-color-6 { background: rgba(230,57,70,0.1); color: #e63946; }
.item-card .item-category.cat-color-7 { background: rgba(0,180,216,0.12); color: #0288a8; }

/* Item card: body / tags / arrow (list layout parts, mobile switches to rows) */
.item-card .item-body { min-width: 0; }

.item-card .item-tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 8px;
    /* 标签过多时左右滑动，不再换行；内容不足时居中 */
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.item-card .item-tags::-webkit-scrollbar { display: none; }

.item-card .item-tags.has-overflow { cursor: grab; }
.item-card .item-tags.dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }

.item-card .tag-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 8px;
    background: #f1f3f7;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    flex: 0 0 auto;
}

.item-card:nth-child(4n+1) .tag-pill { background: rgba(67,97,238,0.1); color: #4361ee; }
.item-card:nth-child(4n+2) .tag-pill { background: rgba(247,37,133,0.1); color: #f72585; }
.item-card:nth-child(4n+3) .tag-pill { background: rgba(6,214,160,0.12); color: #06a374; }
.item-card:nth-child(4n+4) .tag-pill { background: rgba(249,199,79,0.18); color: #b07d0a; }

.item-card .item-arrow { display: none; }

/* Detail overlay */
.item-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.item-detail-overlay.active { display: flex; }

.item-detail-card {
    background: var(--bg-card);
    border-radius: 24px;
    max-width: 400px;
    width: 100%;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    animation: modalIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

@keyframes modalIn {
    from { transform: scale(0.92) translateY(16px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.item-detail-card .detail-body {
    flex: 1;
    min-height: 0;
    padding: 16px 24px 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.item-detail-card .detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 56px 14px 24px;
    text-align: left;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.item-detail-card .detail-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67,97,238,0.1), rgba(247,37,133,0.06));
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(67,97,238,0.15);
}

.item-detail-card .detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.item-detail-card .detail-icon i { font-size: 32px; color: var(--primary); }
.item-detail-card .detail-head-info { flex: 1 1 auto; min-width: 0; }
.item-detail-card h2 { font-size: 22px; margin-bottom: 8px; }

/* 标题：单行显示，过长时由 JS 自动缩小字号 */
.item-detail-card .detail-head-info h2 {
    display: block;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 分类徽标：单独一行 */
.item-detail-card .detail-category {
    display: inline-block;
    max-width: 100%;
    padding: 5px 14px;
    border-radius: 10px;
    background: rgba(67,97,238,0.12);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 0 8px;
}

.item-detail-card p { color: var(--text-secondary); margin-bottom: 0; line-height: 1.7; text-align: left; }

/* 详情弹窗：标签行 —— 单行显示，左侧为所属分区，超出时显示省略号 */
.item-detail-card .detail-tags {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.item-detail-card .detail-tags .detail-zone {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    padding: 3px 9px;
    border-radius: 20px;
    color: #fff;
    margin-right: 8px;
    white-space: nowrap;
    background: linear-gradient(135deg, #4361ee, #7209b7);
}
.item-detail-card .detail-tags .detail-zone.zone-chip-milu { background: linear-gradient(135deg, #ff9a9e, #f72585); }
.item-detail-card .detail-tags .detail-zone.zone-chip-gm { background: linear-gradient(135deg, #4cc9f0, #4361ee); }
.item-detail-card .detail-tags .detail-zone.zone-chip-aiqu { background: linear-gradient(135deg, #06d6a0, #0ea5a0); }
.item-detail-card .detail-tags .detail-zone.zone-chip-butu { background: linear-gradient(135deg, #ffa94d, #e8590c); }
.item-detail-card .detail-tags .detail-zone.zone-chip-youyo { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.item-detail-card .detail-tags .detail-zone.zone-chip-local { background: linear-gradient(135deg, #f9c74f, #f8961e); }

.item-detail-card .detail-tags .tag-pill {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 8px;
    background: rgba(67,97,238,0.08);
    color: var(--primary);
    line-height: 1.4;
    white-space: nowrap;
}

.item-detail-card .detail-gallery { margin-bottom: 20px; }

.item-detail-card .gallery-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 2px 8px;
}

.item-detail-card .gallery-track::-webkit-scrollbar { display: none; }

.item-detail-card .gallery-slide {
    flex: 0 0 33%;
    scroll-snap-align: center;
}

.item-detail-card .gallery-slide img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    object-position: top;
    display: block;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    background: var(--bg);
    cursor: zoom-in;
}

.item-detail-card .gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.item-detail-card .gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.item-detail-card .gallery-dot.active {
    width: 18px;
    border-radius: 3px;
    background: var(--primary);
}

.item-detail-card .detail-section { margin-bottom: 12px; }

.item-detail-card .detail-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.item-detail-card .detail-section-title::before {
    content: '';
    width: 4px;
    height: 15px;
    border-radius: 2px;
    background: linear-gradient(180deg, #4361ee, #7209b7);
    flex-shrink: 0;
}

/* 注册邀请码：关于应用下方单独展示 */
.item-detail-card .detail-invite {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px dashed rgba(67, 97, 238, 0.3);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.08), rgba(114, 9, 183, 0.05));
    font-size: 15px;
    line-height: 1.6;
}

.item-detail-card .detail-invite-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.item-detail-card .detail-invite-code {
    color: #e63946;
    font-weight: 800;
    letter-spacing: 0.4px;
    word-break: break-all;
    cursor: pointer;
    user-select: all;
    -webkit-user-select: all;
    transition: opacity 0.2s;
}

.item-detail-card .detail-invite-code:active {
    opacity: 0.65;
}

.item-detail-card .detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    flex-shrink: 0;
}

.item-detail-card .btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 130px;
    padding: 14px 20px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
}

.item-detail-card .btn-ios {
    background: #111827;
    box-shadow: 0 4px 16px rgba(17,24,39,0.25);
}

.item-detail-card .btn-ios:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(17,24,39,0.35);
}

.item-detail-card .btn-android {
    background: linear-gradient(135deg, #3ddc84, #06d6a0);
    box-shadow: 0 4px 16px rgba(6,214,160,0.3);
}

.item-detail-card .btn-android:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6,214,160,0.4);
}

.item-detail-card .detail-no-download {
    width: 100%;
    padding: 15px 20px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.item-detail-card .btn-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
    z-index: 5;
}

.item-detail-card .btn-close:hover {
    background: var(--bg);
    color: var(--text-primary);
}

/* Screenshot lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay .lb-img {
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalIn 0.25s ease;
    -webkit-user-drag: none;
    user-select: none;
}

.lightbox-overlay .lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.lightbox-overlay .lb-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-overlay .lb-prev { left: 18px; }
.lightbox-overlay .lb-next { right: 18px; }

.lightbox-overlay .lb-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}

.lightbox-overlay .lb-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-overlay .lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 16px;
    border-radius: 999px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .lightbox-overlay .lb-nav { width: 40px; height: 40px; font-size: 16px; }
    .lightbox-overlay .lb-prev { left: 10px; }
    .lightbox-overlay .lb-next { right: 10px; }
    .lightbox-overlay .lb-img { max-width: 96vw; max-height: 82vh; }
}

/* Detail card: small screens */
@media (max-width: 480px) {
    .item-detail-overlay { padding: 12px; }
    .item-detail-card {
        max-width: none;
        max-height: 90vh;
        border-radius: 20px;
    }

    .item-detail-card .detail-body { padding: 14px 16px 6px; }
    .item-detail-card .detail-head { gap: 12px; padding: 18px 46px 12px 16px; }
    .item-detail-card .detail-icon { width: 60px; height: 60px; border-radius: 16px; }
    .item-detail-card .detail-icon i { font-size: 26px; }
    .item-detail-card .detail-head-info h2 { font-size: 18px; }
    .item-detail-card .detail-gallery { margin-bottom: 16px; }
    .item-detail-card .gallery-slide { flex: 0 0 38%; }
    .item-detail-card .detail-actions { padding: 12px 16px 18px; gap: 10px; }
    .item-detail-card .btn-download { padding: 13px 14px; font-size: 14px; }
    .item-detail-card .btn-close { top: 10px; right: 12px; font-size: 24px; }
}

/* Desktop Footer */
.footer {
    display: none;
}

/* Bottom Tab Bar - Desktop: macOS pill style */
.bottom-tab-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: auto;
    padding: 6px 10px;
    gap: 2px;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    z-index: 1000;
}

body { padding-bottom: 80px; }

@media (max-width: 768px) {
    body { padding-bottom: 70px; }

    .navbar {
        padding: 0 16px;
        height: 56px;
    }
    .nav-links { display: none; }

    /* 手机端吸顶搜索框：嵌入顶部导航栏内右侧（原红色方框位置），原搜索框滚出后显示 */
    .sticky-search {
        top: 0;
        bottom: auto;
        left: 0;
        right: 0;
        height: 56px;
        padding: 0 12px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-bottom: none;
        box-shadow: none;
        pointer-events: none;
        transform: translateY(-200%);
        z-index: 1001;
    }
    .sticky-search.show { transform: translateY(0); }
    .sticky-search .search-box {
        pointer-events: auto;
        width: min(55vw, 240px);
        max-width: none;
        margin: 0;
    }
    .sticky-search .search-box input {
        padding-top: 9px;
        padding-bottom: 9px;
        padding-left: 38px;
        font-size: 14px;
        background: var(--bg);
    }
    .sticky-search .search-icon { left: 13px; font-size: 15px; }

    .hero { padding: 80px 0 4px; }
    .hero + .announcement-bar { margin-top: 10px; }

    .carousel-container {
        border-radius: 16px;
        margin: 0 12px 16px;
        box-shadow: var(--shadow);
        max-width: none;
    }
    .carousel-slide {
        min-height: 180px;
        padding: 36px 28px 32px;
        border-radius: 16px;
    }
    .carousel-slide::before {
        background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.3) 100%);
        border-radius: 16px;
    }
    .carousel-arrow { display: none; }
    .carousel-track { min-height: 180px; }

    .carousel-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 4px;
        text-shadow: 0 1px 6px rgba(0,0,0,0.1);
    }

    .carousel-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
        color: rgba(255,255,255,0.88);
    }

    .carousel-btn {
        right: 12px;
        bottom: 12px;
        padding: 6px 16px;
        font-size: 12px;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(6px);
        border: 1px solid rgba(255,255,255,0.15);
    }

    .carousel-dots {
        bottom: 10px;
        gap: 5px;
    }

    .carousel-dot {
        width: 5px;
        height: 5px;
        background: rgba(255,255,255,0.3);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .carousel-dot.active {
        width: 16px;
        height: 5px;
        background: #fff;
        box-shadow: 0 0 6px rgba(255,255,255,0.3);
    }

    .content-wrap {
        display: flex;
        gap: 0;
        padding: 0 8px;
    }

    .category-sidebar {
        width: 72px;
        flex-shrink: 0;
        padding: 4px 0 0 0;
        position: sticky;
        top: 56px;
        align-self: flex-start;
        max-height: calc(100vh - 56px - 62px);
        max-height: calc(100dvh - 56px - 62px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--bg);
        scrollbar-width: none;
        z-index: 50;
    }
    .category-sidebar::-webkit-scrollbar { display: none; }

    .category-tabs {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 0;
        padding: 0;
    }

    .category-tab {
        flex-direction: column;
        gap: 3px;
        padding: 8px 4px;
        border-radius: 10px;
        font-size: 10px;
        text-align: center;
    }

    .category-tab i { font-size: 18px; }
    .category-tab img { width: 18px; height: 18px; border-radius: 4px; }
    .category-tab:hover {
        background: var(--bg-card);
        border-color: transparent;
        transform: none;
        box-shadow: none;
    }
    .category-tab.active {
        border-color: transparent;
        box-shadow: none;
    }

    /* Mobile: 每个导航独立卡片（仅手机端，桌面保持网格） */
    .items-grid {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 10px;
        background: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
        box-shadow: none;
        margin: 6px 12px 90px;
        margin-bottom: 132px;
        padding: 0;
        flex: 1;
        min-width: 0;
        max-width: none;
        align-content: stretch;
    }
    .item-card {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        min-height: 0;
        text-align: left;
        border: 1px solid var(--border-color);
        border-radius: 14px;
        box-shadow: var(--shadow-sm);
        background: var(--bg-card);
    }
    .item-card::before { display: none; }
    .item-card:hover,
    .item-card:active {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    .item-card .icon-wrap {
        width: 52px;
        height: 52px;
        margin: 0;
        border-radius: 14px;
        flex-shrink: 0;
        box-shadow: none;
        overflow: hidden;
    }
    .item-card .icon-wrap img { width: 100%; height: 100%; object-fit: cover; }
    .item-card .icon-wrap .default-icon { font-size: 22px; }
    .item-card .item-body { flex: 1; min-width: 0; }
    .item-card h3 {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 4px;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .item-card .item-meta {
        display: flex;
        align-items: baseline;
        gap: 6px;
        min-width: 0;
    }
    /* 手机端分类标签：右上角斜挎丝带，两端带子被卡片圆角裁切；JS 按文字长度自动调位/缩字 */
    .item-card .item-category {
        position: absolute;
        top: 3px;
        right: -30px;
        transform: rotate(45deg);
        z-index: 2;
        max-width: 46%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.4;
        padding: 3px 30px;
        border-radius: 0;
        letter-spacing: 0.5px;
        text-shadow: 0 1px 1px rgba(0,0,0,0.12);
        box-shadow: 0 2px 6px rgba(0,0,0,0.22);
    }
    .item-card .item-category.cat-color-0 { background: #4361ee; color: #fff; }
    .item-card .item-category.cat-color-1 { background: #f72585; color: #fff; }
    .item-card .item-category.cat-color-2 { background: #06d6a0; color: #fff; }
    .item-card .item-category.cat-color-3 { background: #f9c74f; color: #6b4e00; }
    .item-card .item-category.cat-color-4 { background: #7209b7; color: #fff; }
    .item-card .item-category.cat-color-5 { background: #f77f00; color: #fff; }
    .item-card .item-category.cat-color-6 { background: #e63946; color: #fff; }
    .item-card .item-category.cat-color-7 { background: #00b4d8; color: #fff; }
    .item-card .item-arrow { position: relative; z-index: 3; }
    .item-card p {
        margin: 0;
        font-size: 12.5px;
        line-height: 1.4;
        color: var(--text-muted);
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
        min-width: 0;
        text-align: left;
    }
    .item-card .item-tags {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
        margin-top: 6px;
        justify-content: flex-start;
        width: auto;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 2px;
    }
    .item-card .item-tags::-webkit-scrollbar { display: none; }
    .item-card .tag-pill {
        font-size: 11.5px;
        padding: 3px 10px;
        border-radius: 8px;
        font-weight: 600;
        flex: 0 0 auto;
    }
    .item-card .item-arrow {
        display: block;
        color: var(--text-muted);
        font-size: 13px;
        flex-shrink: 0;
        margin-right: 2px;
    }

    /* Mobile: full-width grid tab bar */
    .bottom-tab-bar {
        display: grid;
        grid-template-columns: 1fr 64px 1fr;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        width: 100%;
        height: 62px;
        background: rgba(255,255,255,0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        z-index: 1000;
        padding: 0;
        box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
        align-items: stretch;
        border-radius: 0;
        transform: none;
        gap: 0;
    }

    .bottom-tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 10px;
        gap: 2px;
        transition: all 0.2s;
        -webkit-tap-highlight-color: transparent;
        padding: 2px 0;
        border-radius: 0;
    }

    .bottom-tab-item i {
        font-size: 20px;
        transition: all 0.2s;
    }

    .bottom-tab-item span {
        display: block;
        font-weight: 500;
        letter-spacing: 0;
        font-size: 10px;
    }

    .bottom-tab-item:nth-child(1) i { color: #4361ee; }
    .bottom-tab-item.bottom-tab-sites i { color: #7209b7; }
    .bottom-tab-item.bottom-tab-sites:hover { background: rgba(114,9,183,0.08); color: #7209b7; }

    .bottom-tab-item:active {
        transform: scale(0.92);
    }

    .bottom-tab-item.active i {
        transform: scale(1.08);
    }

    /* Center home button - raised */
    .bottom-tab-home-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        margin-top: -8px;
        justify-self: center;
        align-self: start;
        gap: 2px;
        padding-top: 4px;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-tab-home-icon, .bottom-tab-home-img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 16px rgba(67,97,238,0.25);
        transition: all 0.3s;
    }

    .bottom-tab-home-icon {
        background: var(--rainbow);
        background-size: 200% auto;
    }

    .bottom-tab-home-icon i {
        font-size: 20px;
        color: #fff;
    }

    .bottom-tab-home-img img {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        object-fit: cover;
    }

    .bottom-tab-home-label {
        display: block;
        font-size: 10px;
        color: var(--text-muted);
        font-weight: 500;
        letter-spacing: 0;
    }

    .bottom-tab-home-wrap:active .bottom-tab-home-icon,
    .bottom-tab-home-wrap:active .bottom-tab-home-img {
        transform: scale(0.92);
    }

    .bottom-tab-home-wrap:active .bottom-tab-home-icon {
        box-shadow: 0 2px 10px rgba(247,37,133,0.2);
    }
}

/* Announcement Bar */
.announcement-bar {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 32px auto 24px;
    padding: 18px 28px;
    background: linear-gradient(135deg, rgba(67,97,238,0.04), rgba(114,9,183,0.04));
    border: 1px solid rgba(67,97,238,0.1);
    border-radius: 12px;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.announcement-icon {
    font-size: 28px;
    color: var(--primary);
    flex-shrink: 0;
    animation: announcementSwing 2s ease-in-out infinite;
}

/* 首页：Hero 与公告条的间距，与页面其他区块保持统一 */
.hero + .announcement-bar {
    margin-top: 16px;
}
@keyframes announcementSwing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}
.announcement-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .announcement-bar {
        margin: 10px 12px 0;
        padding: 8px 12px;
        font-size: 13px;
    }
    .announcement-icon { font-size: 16px; }
}

@media (min-width: 769px) {
    .bottom-tab-item {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-muted);
        padding: 8px 14px;
        border-radius: 20px;
        transition: all 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-tab-item i { font-size: 20px; transition: all 0.2s; }
    .bottom-tab-item span { display: none; }
    .bottom-tab-item:hover { background: rgba(67,97,238,0.08); color: var(--primary); }
    .bottom-tab-item:nth-child(1) i { color: #4361ee; }
    .bottom-tab-item.bottom-tab-sites i { color: #7209b7; }
    .bottom-tab-item.bottom-tab-sites:hover { background: rgba(114,9,183,0.08); color: #7209b7; }
    .bottom-tab-item:active { transform: scale(0.92); }
    .bottom-tab-item.active i { transform: scale(1.08); }

    .bottom-tab-home-wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        padding: 4px 14px;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-tab-home-icon, .bottom-tab-home-img {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 12px rgba(67,97,238,0.2);
        transition: all 0.3s;
    }
    .bottom-tab-home-icon {
        background: var(--rainbow);
        background-size: 200% auto;
    }
    .bottom-tab-home-icon i { font-size: 17px; color: #fff; }
    .bottom-tab-home-img img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
    .bottom-tab-home-label { display: none; }

    .bottom-tab-home-wrap:hover .bottom-tab-home-icon,
    .bottom-tab-home-wrap:hover .bottom-tab-home-img {
        transform: scale(1.08);
        box-shadow: 0 4px 20px rgba(67,97,238,0.35);
    }
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state i { font-size: 48px; margin-bottom: 16px; color: var(--text-muted); }

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* 分站浮动按钮 */
.site-fab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    width: 40px;
    padding: 16px 10px;
    background: var(--primary, #4361ee);
    color: #fff;
    border: none;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: -3px 0 14px rgba(67, 97, 238, 0.35);
    transition: width 0.2s, background 0.2s;
    writing-mode: vertical-lr;
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-fab:hover {
    width: 46px;
    background: var(--primary-dark, #3651d4);
}
.site-fab i { writing-mode: horizontal-tb; }

/* 分站介绍弹窗 */
.site-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.site-modal-overlay.active { display: flex; }
.site-modal-card {
    position: relative;
    background: var(--bg-card, #fff);
    border-radius: 20px;
    padding: 36px 28px 28px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.site-modal-card .btn-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    color: var(--text-muted, #9aa8b9);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.site-modal-card .btn-close:hover { color: var(--text-primary, #1a1a2e); }
.site-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: var(--primary-light, rgba(67, 97, 238, 0.1));
    color: var(--primary, #4361ee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.site-modal-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--text-primary, #1a1a2e);
}
.site-modal-desc {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary, #6c7a92);
    margin: 0 0 18px;
}
.site-modal-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}
.site-modal-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #6c7a92);
}
.site-modal-feature i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--bg, #f0f2f8);
    color: var(--primary, #4361ee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.site-modal-url {
    margin-bottom: 18px;
    text-align: left;
}
.site-modal-url-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #9aa8b9);
    margin-bottom: 6px;
}
.site-modal-url-row {
    display: flex;
    gap: 8px;
}
.site-modal-url-row input {
    flex: 1;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e5ef);
    background: var(--bg, #f0f2f8);
    color: var(--text-primary, #1a1a2e);
    font-size: 13px;
    outline: none;
    min-width: 0;
}
.site-modal-url-row button {
    padding: 9px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e2e5ef);
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #6c7a92);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.site-modal-url-row button:hover {
    color: var(--primary, #4361ee);
    border-color: var(--primary, #4361ee);
}
.site-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    background: var(--primary, #4361ee);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}
.site-modal-btn:hover {
    background: var(--primary-dark, #3651d4);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .site-fab { width: 34px; padding: 12px 7px; font-size: 14px; }
    .site-modal-card { padding: 30px 20px 22px; }
}

/* ===== 首页分区入口（搜索下方：咪噜 / 守游 / 爱趣 / 本站） ===== */
.zone-switch {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    max-width: 720px;
    margin: 22px auto 0;
    padding: 0 16px;
}

.zone-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 64px;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.zone-btn .zone-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 25px;
    background: linear-gradient(135deg, #4361ee, #7209b7);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.22);
    border: 2px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.zone-btn .zone-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zone-btn .zone-name {
    max-width: 96px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.22s ease;
}

.zone-btn:hover .zone-icon { transform: translateY(-2px); }

.zone-btn.active .zone-icon {
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.95), 0 0 0 7px rgba(67, 97, 238, 0.16), 0 10px 24px rgba(67, 97, 238, 0.28);
}

.zone-btn.active .zone-name { color: var(--primary); }

.zone-milu .zone-icon { background: linear-gradient(135deg, #ff9a9e, #f72585); box-shadow: 0 6px 16px rgba(247, 37, 133, 0.22); }
.zone-gm .zone-icon { background: linear-gradient(135deg, #4cc9f0, #4361ee); box-shadow: 0 6px 16px rgba(67, 97, 238, 0.22); }
.zone-aiqu .zone-icon { background: linear-gradient(135deg, #06d6a0, #0ea5a0); box-shadow: 0 6px 16px rgba(6, 214, 160, 0.22); }
.zone-butu .zone-icon { background: linear-gradient(135deg, #ffa94d, #e8590c); box-shadow: 0 6px 16px rgba(232, 89, 12, 0.22); }
.zone-youyo .zone-icon { background: linear-gradient(135deg, #a29bfe, #6c5ce7); box-shadow: 0 6px 16px rgba(108, 92, 231, 0.22); }
.zone-local .zone-icon { background: linear-gradient(135deg, #f9c74f, #f8961e); box-shadow: 0 6px 16px rgba(249, 199, 79, 0.28); }

/* 搜索结果中的分区标识 */
.item-card .item-zone {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    padding: 3px 9px;
    border-radius: 20px;
    color: #fff;
    margin-right: 8px;
    white-space: nowrap;
    background: linear-gradient(135deg, #4361ee, #7209b7);
}

body.searching .item-card .item-zone { display: inline-flex; }
.item-card .item-zone.zone-chip-milu { background: linear-gradient(135deg, #ff9a9e, #f72585); }
.item-card .item-zone.zone-chip-gm { background: linear-gradient(135deg, #4cc9f0, #4361ee); }
.item-card .item-zone.zone-chip-aiqu { background: linear-gradient(135deg, #06d6a0, #0ea5a0); }
.item-card .item-zone.zone-chip-butu { background: linear-gradient(135deg, #ffa94d, #e8590c); }
.item-card .item-zone.zone-chip-youyo { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.item-card .item-zone.zone-chip-local { background: linear-gradient(135deg, #f9c74f, #f8961e); }

@media (max-width: 768px) {
    .zone-switch { gap: 12px; margin-top: 18px; }
    .zone-btn { min-width: 56px; }
    .zone-btn .zone-icon { width: 52px; height: 52px; border-radius: 16px; font-size: 22px; }
    .zone-btn .zone-name { max-width: 80px; font-size: 12px; }
}

@media (max-width: 480px) {
    .zone-switch { gap: 10px; margin-top: 16px; padding: 0 10px; }
    .zone-btn { min-width: 50px; gap: 6px; }
    .zone-btn .zone-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 20px; }
    .zone-btn .zone-name { max-width: 70px; font-size: 11px; }
}

/* ===== 精选导航（首页搜索框下方） ===== */
.featured-nav {
    position: relative;
    z-index: 2;
    max-width: 860px;
    width: calc(100% - 32px);
    margin: 20px auto 0;
    padding: 0;
}

.featured-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 2px 2px 6px;
}

/* 只有一个精选导航时：居中显示，与上方搜索框对齐 */
.featured-track.single {
    grid-template-columns: minmax(0, 440px);
    justify-content: center;
}

.featured-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    text-align: left;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s, border-color 0.3s;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rainbow);
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-card:hover {
    transform: translateY(-3px);
    border-color: rgba(67, 97, 238, 0.18);
    box-shadow: 0 10px 26px rgba(67, 97, 238, 0.14);
}

.featured-card:hover::before { opacity: 1; }

.featured-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), rgba(247, 37, 133, 0.06));
    color: var(--primary);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:nth-child(3n+1) .featured-icon { background: linear-gradient(135deg, rgba(67, 97, 238, 0.12), rgba(114, 9, 183, 0.07)); }
.featured-card:nth-child(3n+2) .featured-icon { background: linear-gradient(135deg, rgba(247, 37, 133, 0.12), rgba(251, 86, 7, 0.07)); }
.featured-card:nth-child(3n+3) .featured-icon { background: linear-gradient(135deg, rgba(6, 214, 160, 0.12), rgba(76, 201, 240, 0.07)); }

.featured-card:hover .featured-icon {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 8px 22px rgba(67, 97, 238, 0.14);
}

.featured-icon i { font-size: 24px; }

.featured-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.featured-info { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; min-width: 0; text-align: left; }

.featured-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.featured-zone {
    align-self: flex-start;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    background: linear-gradient(135deg, #4361ee, #7209b7);
}

.featured-zone.zone-chip-milu { background: linear-gradient(135deg, #ff9a9e, #f72585); }
.featured-zone.zone-chip-gm { background: linear-gradient(135deg, #4cc9f0, #4361ee); }
.featured-zone.zone-chip-aiqu { background: linear-gradient(135deg, #06d6a0, #0ea5a0); }
.featured-zone.zone-chip-butu { background: linear-gradient(135deg, #ffa94d, #e8590c); }
.featured-zone.zone-chip-youyo { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.featured-zone.zone-chip-local { background: linear-gradient(135deg, #f9c74f, #f8961e); }

/* ===== 融合单页模式：不显示分区按钮，左侧按分区列出分类，右侧显示全部导航 ===== */
body.fused-mode .content-wrap {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 0 24px;
}

body.fused-mode .category-sidebar {
    width: 240px;
    flex: 0 0 240px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.07);
    position: sticky;
    top: 76px;
    align-self: flex-start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    z-index: 50;
}

body.fused-mode .category-tabs {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    margin-bottom: 0;
}

body.fused-mode .category-tab {
    justify-content: flex-start;
    gap: 9px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: var(--text-secondary);
    transition: background 0.2s, color 0.2s;
}

body.fused-mode .fused-all-tab,
body.fused-mode .fused-all-tab.active {
    margin-bottom: 6px;
    padding: 11px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4361ee, #7209b7);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(67, 97, 238, 0.28);
}

body.fused-mode .fused-all-tab i { color: #fff; font-size: 14px; }

body.fused-mode .fused-all-tab:hover {
    transform: none;
    color: #fff;
    filter: brightness(1.06);
    box-shadow: 0 8px 18px rgba(67, 97, 238, 0.28);
}

body.fused-mode .fused-cat-tab {
    margin-left: 2px;
    gap: 9px;
    padding: 6px 8px;
    font-size: 13px;
    font-weight: 500;
}

body.fused-mode .fused-cat-tab:hover {
    background: var(--bg-card-hover);
    border-color: transparent;
    color: var(--primary);
    box-shadow: none;
    transform: none;
}

body.fused-mode .fused-cat-tab:hover i { color: var(--primary); }

body.fused-mode .fused-cat-tab.active {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    font-weight: 600;
    box-shadow: none;
}

body.fused-mode .fused-cat-tab.active i { color: var(--primary); }

body.fused-mode .fused-cat-ico {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.12), rgba(114, 9, 183, 0.07));
    color: var(--primary);
}

body.fused-mode .fused-cat-ico img {
    width: 17px;
    height: 17px;
    border-radius: 0;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(26, 26, 46, 0.2));
}

body.fused-mode .fused-cat-ico i { font-size: 12px; }

body.fused-mode .fused-cat-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.fused-mode .items-grid {
    flex: 1;
    min-width: 0;
    padding: 0 0 100px;
}

.fused-zone-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
    padding-top: 2px;
    border-top: none;
}

/* 分类侧栏只保留「全部」与子分类，隐藏本站/折扣手游/悠游等大分区标题 */
body.fused-mode .fused-zone-title {
    display: none;
}

.fused-zone-title {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.fused-zone-title:hover {
    background: var(--bg-card-hover);
    border-color: transparent;
    color: var(--text-primary);
}

.fused-zone-title.active {
    color: var(--primary);
    background: rgba(67, 97, 238, 0.08);
}

.fused-zone-ico {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(135deg, #4361ee, #7209b7);
    box-shadow: 0 3px 8px rgba(26, 26, 46, 0.12);
}

.fused-zone-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fused-zone-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fused-zone-title.zone-milu .fused-zone-ico { background: linear-gradient(135deg, #ff9a9e, #f72585); }
.fused-zone-title.zone-gm .fused-zone-ico { background: linear-gradient(135deg, #4cc9f0, #4361ee); }
.fused-zone-title.zone-aiqu .fused-zone-ico { background: linear-gradient(135deg, #06d6a0, #0ea5a0); }
.fused-zone-title.zone-butu .fused-zone-ico { background: linear-gradient(135deg, #ffa94d, #e8590c); }
.fused-zone-title.zone-youyo .fused-zone-ico { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.fused-zone-title.zone-local .fused-zone-ico { background: linear-gradient(135deg, #f9c74f, #f8961e); }

@media (max-width: 768px) {
    .featured-nav { width: auto; margin: 16px 12px 0; padding: 0; }
    .featured-track { grid-template-columns: 1fr; gap: 10px; padding: 2px 0 4px; }
    .featured-track.single { grid-template-columns: minmax(0, 1fr); }
    .featured-card { gap: 12px; padding: 13px 14px; border-radius: 15px; }
    .featured-icon { width: 50px; height: 50px; border-radius: 14px; }
    .featured-icon i { font-size: 21px; }
    .featured-name { font-size: 14px; }
    .featured-zone { font-size: 10px; padding: 2px 8px; }

    body.fused-mode .content-wrap {
        gap: 0;
        padding: 0 8px;
    }
    body.fused-mode .category-sidebar {
        width: 84px;
        flex: 0 0 84px;
        padding: 4px 0 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        top: 56px;
        max-height: calc(100dvh - 56px - 62px);
        scrollbar-width: none;
    }
    body.fused-mode .category-sidebar::-webkit-scrollbar { display: none; }
    body.fused-mode .category-tabs { gap: 6px; }
    body.fused-mode .category-tab {
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        padding: 8px 4px;
        border-radius: 10px;
        background: var(--bg-card);
        border-color: var(--border-color);
        box-shadow: var(--shadow-sm);
        font-size: 10px;
        text-align: center;
    }
    body.fused-mode .fused-all-tab,
    body.fused-mode .fused-all-tab.active {
        margin-bottom: 4px;
        padding: 9px 2px;
        background: linear-gradient(135deg, #4361ee, #7209b7);
        color: #fff;
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.22);
    }
    body.fused-mode .fused-zone-group { gap: 3px; margin-top: 2px; padding-top: 2px; border-top: none; }
    body.fused-mode .fused-cat-tab { margin-left: 0; padding: 6px 2px; }
    body.fused-mode .fused-cat-ico { width: 26px; height: 26px; border-radius: 8px; }
    body.fused-mode .fused-cat-ico img { width: 19px; height: 19px; }
    body.fused-mode .fused-zone-ico { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
    body.fused-mode .items-grid { margin: 6px 12px 132px 6px; }
}

/* ===== 公告入口（首页公告条） ===== */
.announcement-bar-link {
    width: 100%;
    gap: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.announcement-bar-link:hover {
    border-color: rgba(67,97,238,0.28);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.announcement-bar-link:active { transform: translateY(0); }
.announcement-title { font-weight: 700; color: var(--text-primary); }
.announcement-game { color: var(--text-secondary); font-size: 14px; }
.announcement-more {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== 公告弹窗 ===== */
.ann-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 12, 41, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}
.ann-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.ann-popup {
    width: min(760px, 100%);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(15, 12, 41, 0.28);
    overflow: hidden;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ann-popup-overlay.active .ann-popup { transform: none; }

.ann-popup-head {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border-light);
}
.ann-popup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.ann-popup-title > i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 18px;
}
.ann-popup-title h2 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.ann-popup-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}
.ann-popup-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.ann-popup-close:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.ann-popup-search {
    position: relative;
    flex-shrink: 0;
    padding: 14px 20px 12px;
}
.ann-popup-search > i {
    position: absolute;
    left: 34px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}
.ann-popup-search input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    padding: 0 14px 0 38px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.ann-popup-search input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* 弹窗顶部固定说明框：固定高度，超出部分内部滚动 */
.ann-popup-notice {
    display: flex;
    gap: 9px;
    flex-shrink: 0;
    height: 96px;
    max-height: 26vh;
    margin: 0 20px 4px;
    padding: 11px 14px;
    border: 1px solid rgba(251, 86, 7, 0.2);
    border-radius: 12px;
    background: rgba(251, 86, 7, 0.06);
    overflow-y: auto;
    overscroll-behavior: contain;
    font-size: 13px;
    line-height: 1.7;
}
.ann-popup-notice::-webkit-scrollbar { width: 6px; }
.ann-popup-notice::-webkit-scrollbar-thumb {
    background: rgba(251, 86, 7, 0.3);
    border-radius: 6px;
}
.ann-popup-notice > i {
    flex-shrink: 0;
    margin-top: 3px;
    color: #e8590c;
}
.ann-popup-notice-text {
    flex: 1;
    min-width: 0;
    color: var(--text-secondary);
    word-break: break-word;
}

.ann-popup-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 20px 20px;
    -webkit-overflow-scrolling: touch;
}
.ann-popup-body::-webkit-scrollbar { width: 6px; }
.ann-popup-body::-webkit-scrollbar-thumb {
    background: rgba(108, 122, 146, 0.28);
    border-radius: 6px;
}

.ann-date-group { flex: 0 0 auto; margin-top: 10px; }
/* 展开的日期按内容高度展开，内容区高度由脚本计算，保证下方至少露出一个日期标题 */
.ann-date-group.open {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ann-date-head {
    position: sticky;
    top: -4px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border: 0;
    border-radius: 10px;
    background: rgba(240, 242, 248, 0.96);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.ann-date-label { display: inline-flex; align-items: center; gap: 6px; }
.ann-date-label i { color: var(--primary); }
.ann-date-today {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
}
.ann-date-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}
.ann-date-arrow { transition: transform 0.2s; }
.ann-date-group.open .ann-date-arrow { transform: rotate(180deg); }
.ann-date-body { display: none; padding-top: 8px; }
.ann-date-group.open .ann-date-body {
    display: block;
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.ann-date-body::-webkit-scrollbar { width: 6px; }
.ann-date-body::-webkit-scrollbar-thumb {
    background: rgba(108, 122, 146, 0.28);
    border-radius: 6px;
}

.ann-card {
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ann-card:hover {
    border-color: rgba(67, 97, 238, 0.25);
    box-shadow: var(--shadow);
}
.ann-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 7px;
}
.ann-card-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-primary);
    word-break: break-word;
}
.ann-card-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ann-card-game,
.ann-card-source,
.ann-card-pin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.ann-card-game { color: var(--primary); background: var(--primary-light); }
.ann-card-source { color: #e8590c; background: rgba(251, 86, 7, 0.1); }
.ann-card-pin { color: #e84393; background: rgba(232, 67, 147, 0.1); }
.ann-card-content {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.75;
    word-break: break-word;
}
.ann-card.expanded .ann-card-content {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}
/* 富文本公告：用 max-height 收起，避免块级标签破坏行数限制 */
.ann-card-content.is-rich {
    display: block;
    max-height: 7em;
    overflow: hidden;
}
.ann-card.expanded .ann-card-content.is-rich {
    max-height: none;
}
.ann-card-content p { margin: 0 0 8px; }
.ann-card-content p:last-child { margin-bottom: 0; }
.ann-card-content h3 {
    margin: 10px 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.ann-card-content h3:first-child { margin-top: 0; }
.ann-card-content ul,
.ann-card-content ol { margin: 4px 0 8px; padding-left: 22px; }
.ann-card-content li { margin: 2px 0; }
.ann-card-content strong,
.ann-card-content b { color: var(--text-primary); }
.ann-card-content a { color: var(--primary); }
.ann-card-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.ann-popup-empty {
    padding: 48px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}
.ann-popup-empty i {
    display: block;
    margin-bottom: 10px;
    font-size: 26px;
    opacity: 0.5;
}
.ann-popup-empty p { margin: 0; }

@media (max-width: 768px) {
    .announcement-bar-link { width: calc(100% - 24px); gap: 10px; }
    .announcement-more { font-size: 12px; }
    .announcement-game { font-size: 12px; }

    .ann-popup-overlay {
        align-items: center;
        padding: 16px;
    }
    .ann-popup {
        width: 100%;
        max-height: 86vh;
        border-radius: 18px;
        transform: translateY(16px) scale(0.98);
    }
    .ann-popup-overlay.active .ann-popup { transform: none; }
    .ann-popup-head { padding: 16px 16px 12px; }
    .ann-popup-title > i { width: 36px; height: 36px; font-size: 16px; }
    .ann-popup-title h2 { font-size: 17px; }
    .ann-popup-search { padding: 12px 16px 10px; }
    .ann-popup-search > i { left: 30px; }
    .ann-popup-notice { height: 84px; margin: 0 16px 4px; padding: 10px 12px; font-size: 12.5px; max-height: 24vh; }
    .ann-popup-body { padding: 2px 16px 16px; }
    .ann-date-head { top: -2px; }
    .ann-card { padding: 13px 14px; border-radius: 13px; }
    .ann-card-title { font-size: 15px; }
}
