﻿:root {
    --primary: #0d9488;
    --primary-light: #14b8a6;
    --primary-lighter: #ccfbf1;
    --primary-dark: #0f766e;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --bg: #f0fdfa;
    --bg-card: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --font-display: 'ZCOOL QingKe HuangYou',cursive;
    --font-body: 'Noto Sans SC',-apple-system,BlinkMacSystemFont,sans-serif
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none
}

input {
    font-family: inherit;
    border: none;
    outline: none
}

::-webkit-scrollbar {
    width: 6px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-secondary)
    }

.bg-deco {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden
}

    .bg-deco .circle {
        position: absolute;
        border-radius: 50%;
        opacity: 0.3
    }

        .bg-deco .circle:nth-child(1) {
            width: 600px;
            height: 600px;
            top: -200px;
            right: -150px;
            background: radial-gradient(circle,rgba(13,148,136,0.15),transparent 70%)
        }

        .bg-deco .circle:nth-child(2) {
            width: 400px;
            height: 400px;
            bottom: -100px;
            left: -100px;
            background: radial-gradient(circle,rgba(245,158,11,0.1),transparent 70%)
        }

        .bg-deco .circle:nth-child(3) {
            width: 300px;
            height: 300px;
            top: 40%;
            left: 50%;
            background: radial-gradient(circle,rgba(6,182,212,0.08),transparent 70%)
        }

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    background: rgba(240,253,250,0.8);
    border-bottom: 1px solid rgba(226,232,240,0.6);
    padding: 0 24px
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--primary-dark);
    letter-spacing: 1px;
    position: relative
}

.logo-text-wrap {
    position: relative;
    display: inline-block
}

.logo .domain-label {
    font-size: 11px;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-left: 6px;
    align-self: flex-end;
    line-height: 2;
    user-select: none
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg,var(--primary),var(--primary-light));
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 700
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

    .header-actions .fav-btn {
        font-size: 20px;
        cursor: pointer;
        transition: var(--transition);
        color: var(--text-muted);
        background: var(--border-light);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1
    }

        .header-actions .fav-btn:hover {
            color: #ef4444;
            background: #fef2f2
        }

        .header-actions .fav-btn.active {
            color: #ef4444;
            background: #fef2f2
        }

    .header-actions .count-badge {
        font-size: 14px;
        color: var(--text-secondary);
        background: linear-gradient(135deg, #ccfbf1, #f0fdfa);
        padding: 6px 14px;
        border-radius: 20px;
        display: inline-flex;
        align-items: center;
        gap: 2px;
        border: 1px solid rgba(13,148,136,0.12);
        box-shadow: 0 1px 4px rgba(13,148,136,0.06);
        font-weight: 500;
    }

    .count-num {
        display: inline-flex;
        overflow: hidden;
        vertical-align: bottom;
        line-height: 1;
    }

        .count-num .digit {
            display: inline-block;
            animation: digitFloat 2.5s ease-in-out infinite both;
            min-width: 0.5em;
            text-align: center;
            font-weight: 700;
            font-size: 15px;
            background: linear-gradient(135deg, #0d9488, #0891b2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: none;
            filter: drop-shadow(0 1px 2px rgba(13,148,136,0.15));
        }

            .count-num .digit:nth-child(1) { animation-delay: 0s; }
            .count-num .digit:nth-child(2) { animation-delay: 0.15s; }
            .count-num .digit:nth-child(3) { animation-delay: 0.3s; }
            .count-num .digit:nth-child(4) { animation-delay: 0.45s; }
            .count-num .digit:nth-child(5) { animation-delay: 0.6s; }
            .count-num .digit:nth-child(6) { animation-delay: 0.75s; }

    @keyframes digitFloat {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-2px);
        }
    }

.hero {
    padding: 40px 24px 20px;
    text-align: center;
    position: relative
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px,6vw,56px);
    color: var(--primary-dark);
    letter-spacing: 3px;
    line-height: 1.2;
    margin-bottom: 12px
}

.hero-subtitle {
    font-size: clamp(15px,2vw,18px);
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto
}

.search-wrapper {
    max-width: 640px;
    margin: 0 auto 28px;
    position: relative
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 4px 4px 4px 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm)
}

    .search-box:focus-within {
        border-color: var(--primary-light);
        box-shadow: 0 0 0 4px rgba(13,148,136,0.1)
    }

    .search-box .search-icon {
        color: var(--text-muted);
        font-size: 18px;
        flex-shrink: 0
    }

    .search-box input {
        flex: 1;
        min-width: 0;
        padding: 12px 14px;
        font-size: 16px;
        background: transparent;
        color: var(--text)
    }

    .search-box .clear-btn,
    .search-box .search-submit {
        flex-shrink: 0
    }

        .search-box input::placeholder {
            color: var(--text-muted)
        }

    .search-box .clear-btn {
        display: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        color: var(--text-muted);
        font-size: 16px;
        transition: var(--transition)
    }

        .search-box .clear-btn:hover {
            color: var(--text-secondary)
        }

        .search-box .clear-btn.visible {
            display: flex;
            align-items: center;
            justify-content: center
        }

    .search-box .search-submit {
        padding: 10px 28px;
        background: linear-gradient(135deg,var(--primary),var(--primary-light));
        color: white;
        border-radius: 50px;
        font-size: 15px;
        font-weight: 500;
        transition: var(--transition);
        white-space: nowrap
    }

    .search-box .search-submit:hover {
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(13,148,136,0.3)
    }

/* ===== Keyword Suggestion Dropdown ===== */
.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 60;
    padding: 6px 0;
}

    .search-suggest.show {
        display: block;
        animation: suggestFadeIn 0.15s ease;
    }

@keyframes suggestFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

    .search-suggest .suggest-item {
        padding: 8px 18px;
        font-size: 14px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: background 0.15s, padding-left 0.15s;
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
    }

        .search-suggest .suggest-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 4px;
            bottom: 4px;
            width: 3px;
            background: var(--primary);
            border-radius: 0 3px 3px 0;
            opacity: 0;
            transition: opacity 0.15s;
        }

        .search-suggest .suggest-item:hover {
            background: #f0fdfa;
            padding-left: 22px;
        }

            .search-suggest .suggest-item:hover::before {
                opacity: 1;
            }

        .search-suggest .suggest-item .suggest-icon {
            width: 26px;
            height: 26px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            color: var(--text-muted);
            background: var(--border-light);
            border-radius: 6px;
            flex-shrink: 0;
            transition: background 0.15s;
        }

        .search-suggest .suggest-item:hover .suggest-icon {
            background: var(--primary-lighter);
        }

        .search-suggest .suggest-item .kw-highlight {
            color: var(--primary);
            font-weight: 600;
            padding: 0;
            margin: 0;
        }

            .search-suggest .suggest-item:not(:last-child) {
            border-bottom: none;
        }

    /* Custom scrollbar for suggest */
    .search-suggest::-webkit-scrollbar {
        width: 4px;
    }

    .search-suggest::-webkit-scrollbar-thumb {
        background: var(--text-muted);
        border-radius: 2px;
    }

        .search-suggest::-webkit-scrollbar-thumb:hover {
            background: var(--text-secondary);
        }

    .search-suggest::-webkit-scrollbar-track {
        background: transparent;
    }

.tags-section {
    max-width: 800px;
    margin: 0 auto 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 24px
}

.tag {
    padding: 7px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    user-select: none
}

    .tag:hover {
        border-color: var(--primary-light);
        color: var(--primary)
    }

    .tag.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary)
    }

.stats-bar {
    max-width: 1200px;
    margin: 0 auto 8px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px
}

    .stats-bar .result-count {
        font-size: 14px;
        color: var(--text-secondary);
        background: var(--bg-card);
        padding: 6px 16px;
        border-radius: 20px;
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 500;
    }

        .stats-bar .result-count .rc-icon {
            font-size: 15px;
            line-height: 1;
        }

        .stats-bar .result-count .rc-num {
            font-weight: 700;
            color: var(--primary-dark);
            font-size: 16px;
            margin: 0 2px;
        }

    .stats-bar .sort-options {
        display: flex;
        gap: 4px
    }

    .stats-bar .sort-btn {
        padding: 4px 14px;
        font-size: 13px;
        border-radius: 20px;
        color: var(--text-muted);
        transition: var(--transition)
    }

        .stats-bar .sort-btn:hover {
            color: var(--text-secondary)
        }

        .stats-bar .sort-btn.active {
            color: var(--primary);
            background: var(--primary-lighter)
        }

.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 20px
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
    gap: 20px
}

    .app-grid.empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 300px;
        color: var(--text-muted)
    }

    .app-grid .empty-icon {
        font-size: 48px;
        margin-bottom: 12px;
        opacity: 0.5
    }

    .app-grid .empty-text {
        font-size: 16px
    }

.app-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    animation: cardFadeIn 0.4s ease both;
    position: relative;
    overflow: hidden
}

    .app-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg,var(--primary),var(--primary-light));
        opacity: 0;
        transition: var(--transition)
    }

    .app-card:hover {
        animation: cardFloat 1.6s ease-in-out infinite;
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light)
    }

        .app-card:hover::before {
            opacity: 1
        }

@keyframes cardFloat {
    0%, 100% {
        transform: translateY(-4px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.app-card .card-category {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: var(--primary-lighter);
    padding: 4px 14px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 20px;
}

.app-card .card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.app-card .card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.app-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border-light)
}

.app-card .card-source {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px
}

.app-card .card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent)
}

    .app-card .card-rating .star {
        color: var(--accent-light);
        font-size: 13px
    }

.card-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap
}

    .card-header-row .card-category {
        margin-bottom: 0
    }

.type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    line-height: 1.4
}

    .type-badge.WEB {
        color: #1d4ed8;
        background: #dbeafe
    }

    .type-badge.EXE {
        color: #b45309;
        background: #fef3c7
    }

    .type-badge.APK {
        color: #047857;
        background: #d1fae5
    }

    .type-badge.DMG {
        color: #7c3aed;
        background: #ede9fe
    }

    .type-badge.LINUX {
        color: #dc2626;
        background: #fee2e2
    }

    .type-badge + .type-badge {
        margin-left: 4px;
    }

.ai-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 5px;
    line-height: 1.4;
    color: #7c3aed;
    background: #ede9fe
}

.footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 13px
}

    .footer a {
        color: var(--primary)
    }

        .footer a:hover {
            text-decoration: underline
        }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    margin-bottom: 14px;
    font-size: 13px
}

    .footer-links .fl-title {
        color: var(--text-muted);
        font-weight: 500
    }

    .footer-links a {
        color: var(--text-secondary);
        text-decoration: none;
        transition: var(--transition)
    }

        .footer-links a:hover {
            color: var(--primary);
            text-decoration: none
        }

.footer-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted)
}




.footer-icp {
    margin-top: 6px;
    font-size: 12px
}

    .footer-icp a {
        color: var(--text-muted) !important;
        text-decoration: none
    }

        .footer-icp a:hover {
            color: var(--primary) !important
        }

/* ===== Floating Actions (QQ + 收藏 + 回到顶部) ===== */
.float-actions {
    position: fixed;
    right: 24px;
    bottom: 32px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
    border: none;
    outline: none;
    text-decoration: none;
    flex-shrink: 0;
}

    .float-btn:hover {
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    }

.float-top {
    background: #0f172a;
    color: #fff;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s, visibility 0.3s;
}

    .float-top.show {
        opacity: 1;
        visibility: visible;
    }

    .float-top:hover {
        background: #1e293b;
    }

.float-fav {
    background: #fff;
    color: #cbd5e1;
}

    .float-fav.active,
    .float-fav:hover {
        color: #ef4444;
        background: #fef2f2;
    }

.float-qq {
    background: #0d9488;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(13,148,136,0.3);
}

    .float-qq:hover {
        box-shadow: 0 6px 24px rgba(13,148,136,0.4);
        background: #0f766e;
    }

    .float-top:hover {
        background: #1e293b;
    }

@media (max-width:768px) {
    .header-inner {
        height: 56px
    }

    .logo {
        font-size: 20px
    }

    .hero {
        padding: 40px 16px 28px
    }

    .search-box {
        padding: 2px 2px 2px 14px
    }

        .search-box input {
            font-size: 15px;
            padding: 10px 10px
        }

        .search-box .search-submit {
            padding: 8px 16px;
            font-size: 13px
        }

    .app-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .grid-container {
        padding: 12px 16px 20px
    }

    .header-actions {
        display: none
    }

    .hero-subtitle {
        text-align: left
    }

    .footer {
        font-size: 11px;
        padding: 24px 16px
    }

    .tags-section {
        gap: 6px
    }

    .tag {
        font-size: 13px;
        padding: 5px 14px
    }

    .float-actions {
        right: 16px;
        gap: 8px;
    }

    .float-btn {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }
}

@media (max-width:480px) {
    .app-grid {
        grid-template-columns: 1fr
    }

    .stats-bar {
        flex-direction: column;
        align-items: flex-start
    }
}

.hidden {
    display: none !important
}
