﻿: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;
    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;
}

.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 40px;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 30%, #fef0f5 60%, #f5f0ff 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;
    bottom: -300px;
    right: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(247,37,133,0.04) 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);
}

.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;
}

.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: 20px;
    line-height: 1.5;
}

.carousel-btn {
    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: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.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;
}

.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 { min-width: 0; }
.item-detail-card h2 { font-size: 22px; margin-bottom: 8px; }
.item-detail-card .detail-head-info h2 { font-size: 21px; margin: 0 0 8px; font-weight: 700; }

.item-detail-card .detail-category {
    display: inline-block;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(67,97,238,0.08);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.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-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 36px; }

    .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 {
        padding: 7px 20px;
        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: wrap;
        gap: 6px;
        margin-top: 6px;
        justify-content: flex-start;
    }
    .item-card .tag-pill {
        font-size: 11.5px;
        padding: 3px 10px;
        border-radius: 8px;
        font-weight: 600;
    }
    .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;
}
@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; }
}
