:root {
    --primary: #7C3AED;
    --primary-dark: #6D28D9;
    --primary-light: #A78BFA;
    --bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-secondary: #475569;
    --text-light: #94A3B8;
    --shadow: 0 4px 20px rgba(124, 58, 237, 0.10);
    --shadow-hover: 0 12px 40px rgba(124, 58, 237, 0.18);
    --radius: 18px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --btn-gradient: linear-gradient(135deg, #F59E0B, #EF4444);
    --btn-gradient-hover: linear-gradient(135deg, #D97706, #DC2626);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* 导航 */
.navbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.6);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Logo 图片样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}
.logo img {
    height: 65px;
    width: auto;
    display: block;
    max-height: 75px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
}
.nav-links a { transition: color var(--transition); position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 4px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 40px;
    padding: 6px 16px 6px 20px;
    transition: border-color var(--transition), box-shadow var(--transition);
    min-width: 200px;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(124,58,237,0.12); }
.search-box input {
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-main);
    width: 100%;
}
.search-box input::placeholder { color: var(--text-light); }
.search-box button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 0 4px 8px;
    font-size: 16px;
    transition: color var(--transition);
}
.search-box button:hover { color: var(--primary); }

/* 横幅 */
.banner {
    padding: 40px 0 30px;
    background: linear-gradient(135deg, rgba(124,58,237,0.05), rgba(124,58,237,0.02));
    border-bottom: 1px solid #E2E8F0;
}
.banner .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}
.banner-left { flex: 1; min-width: 200px; }
.banner-left h1 { font-size: 28px; font-weight: 700; color: var(--text-main); margin-bottom: 8px; }
.banner-left p { font-size: 16px; color: var(--text-secondary); line-height: 1.6; max-width: 500px; }
.banner-right { flex-shrink: 0; }
.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 24px;
}
.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #E2E8F0;
    transition: all var(--transition);
}
.badge-item i { color: var(--primary-light); font-size: 18px; }
.badge-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }

/* 统计条 */
.stats { padding: 16px 0 8px; }
.stats .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.stats .count {
    font-size: 16px;
    color: var(--text-secondary);
}
.stats .count strong {
    color: var(--text-main);
    font-weight: 700;
}

/* 网格 */
.grid { padding: 8px 0 48px; }
.grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px 24px;
}

/* 卡片 */
.app-item {
    display: flex;
    flex-direction: column;
    animation: fadeUp 0.5s ease both;
}
.app-item:nth-child(1) { animation-delay: 0.02s; }
.app-item:nth-child(2) { animation-delay: 0.06s; }
.app-item:nth-child(3) { animation-delay: 0.10s; }
.app-item:nth-child(4) { animation-delay: 0.14s; }
.app-item:nth-child(5) { animation-delay: 0.18s; }
.app-item:nth-child(6) { animation-delay: 0.22s; }
.app-item:nth-child(7) { animation-delay: 0.26s; }
.app-item:nth-child(8) { animation-delay: 0.30s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.app-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 22px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
    border: 1px solid rgba(255,255,255,0.5);
    position: relative;
    overflow: hidden;
}
.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity var(--transition);
}
.app-item:hover .app-card {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.app-item:hover .app-card::before { opacity: 1; }

.app-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #F1F5F9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.app-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #F1F5F9;
}
.app-cover .fallback-icon {
    font-size: 48px;
    color: var(--text-light);
}

.app-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-main);
    margin-bottom: 6px;
}
.app-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.app-meta .size { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.app-meta .size i { font-size: 13px; color: var(--text-light); }
.platform-tags { display: flex; gap: 6px; }
.platform-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: #E2E8F0;
    color: var(--text-secondary);
}
.platform-tag.android { background: #DCFCE7; color: #15803D; }
.platform-tag.ios { background: #DBEAFE; color: #1D4ED8; }
.platform-tag.both { background: #E0E7FF; color: #4338CA; }

.app-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    flex: 1;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E2E8F0;
    font-size: 13px;
    color: var(--text-secondary);
}
.app-stats .stat-item { display: flex; align-items: center; gap: 4px; }
.app-stats .stat-item i { font-size: 14px; color: var(--primary-light); }
.app-stats .stat-item strong { color: var(--text-main); font-weight: 700; }

.download-btn-wrap { margin-top: 16px; display: flex; justify-content: center; }
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 60px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    background: var(--btn-gradient);
    box-shadow: 0 6px 24px rgba(239,68,68,0.30);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}
.download-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--btn-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition);
}
.download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 32px rgba(239,68,68,0.40);
}
.download-btn:hover::after { opacity: 1; }
.download-btn span, .download-btn i { position: relative; z-index: 1; }
.download-btn i { font-size: 18px; }
.download-btn:active { transform: scale(0.96); transition-duration: 0.08s; }

/* 页脚 */
.footer {
    background: #fff;
    border-top: 1px solid #E2E8F0;
    padding: 28px 0 24px;
    margin-top: auto;
}
.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}
.footer p { font-size: 14px; color: var(--text-secondary); }
.footer .footer-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}
.footer .footer-links a { transition: color var(--transition); }
.footer .footer-links a:hover { color: var(--primary); }
.footer .copyright { font-size: 13px; color: var(--text-light); }
.footer-stats {
    display: flex;
    gap: 30px;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.footer-stats strong {
    color: var(--primary);
    font-weight: 700;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .grid .container { grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 28px 20px; }
}

@media (max-width: 768px) {
    .navbar .container { flex-direction: column; align-items: stretch; gap: 12px; }
    .logo { justify-content: center; }
    .logo img { height: 50px; }
    .nav-links { justify-content: center; gap: 24px; font-size: 15px; flex-wrap: wrap; }
    .search-box { width: 100%; min-width: unset; }

    /* ===== 横幅区域 - 手机居中 ===== */
    .banner .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .banner-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    .banner-left h1 { font-size: 22px; }
    .banner-left p {
        max-width: 100%;
        text-align: center;
        font-size: 15px;
    }
    .banner-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 12px;
        justify-items: center;
        width: 100%;
        max-width: 400px;
    }
    .badge-item {
        font-size: 12px;
        padding: 5px 10px;
        white-space: nowrap;
    }
    .badge-item i { font-size: 15px; }

    .stats .container { flex-direction: column; align-items: center; text-align: center; }
    .grid .container { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 24px 16px; }
    .app-card { padding: 20px 18px 18px; }
    .app-name { font-size: 18px; }
    .download-btn { padding: 10px 24px; font-size: 17px; min-width: 120px; }
    .footer-stats { flex-direction: column; gap: 6px; align-items: center; }
}

@media (max-width: 480px) {
    .grid .container { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
    .container { padding: 0 16px; }
    .app-card { padding: 18px 14px 16px; }
    .app-desc { font-size: 13px; -webkit-line-clamp: 3; }
    .download-btn { padding: 10px 20px; font-size: 16px; min-width: 100px; }
    .nav-links { gap: 16px; font-size: 14px; }
    .badge-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .badge-item { font-size: 11px; padding: 4px 8px; }
    .badge-item i { font-size: 13px; }
    .logo img { height: 40px; }
    .banner-left h1 { font-size: 20px; }
    .banner-left p { font-size: 14px; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #E2E8F0; border-radius: 8px; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }