/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f1419;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-card-hover: #21262d;
    --border-color: rgba(48, 54, 61, 0.8);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent-cyan: #39d0d8;
    --accent-cyan-dark: #2a9d8f;
    --accent-cyan-light: rgba(57, 208, 216, 0.15);
    --accent-gradient: linear-gradient(135deg, #39d0d8 0%, #2a9d8f 100%);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 24px rgba(57, 208, 216, 0.25);
}

html, body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ========== 顶部 Header ========== */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 28px; color: var(--accent-cyan); }
.logo h1 { font-size: 22px; font-weight: 700; color: var(--accent-cyan); }

.search-box { position: relative; flex: 1; max-width: 400px; }
.search-box input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}
.search-box input:focus { border-color: var(--accent-cyan); }
.search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); opacity: 0.5; }

/* ========== 分类栏 ========== */
.category-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    overflow-x: auto;
}

.category-list { display: flex; gap: 12px; flex-wrap: wrap; }

.category-item {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.category-item.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.cat-count {
    margin-left: 6px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    font-size: 11px;
}

.category-enter { border-color: var(--accent-cyan); color: var(--accent-cyan); }

/* ========== 面包屑 ========== */
#activeBreadcrumb { padding: 12px 0; font-size: 14px; color: var(--text-muted); }
.bc-root { color: var(--accent-cyan); cursor: pointer; }
.bc-sep { margin: 0 8px; }
.bc-current { color: var(--text-primary); }

/* ========== Banner - 高端动态版 ========== */
.banner-section { padding: 16px 0; }
.banner-link { display: block; text-decoration: none; }

.banner-premium {
    position: relative;
    background: linear-gradient(135deg, #0a0f14 0%, #111820 50%, #0d1218 100%);
    border: 1px solid rgba(57, 208, 216, 0.3);
    border-radius: 20px;
    padding: 50px 40px;
    overflow: hidden;
    text-align: center;
    box-shadow: 
        0 0 0 1px rgba(57, 208, 216, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(57, 208, 216, 0.1);
    transition: all 0.4s ease;
}

.banner-premium:hover {
    border-color: rgba(57, 208, 216, 0.5);
    box-shadow: 
        0 0 0 1px rgba(57, 208, 216, 0.2),
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 120px rgba(57, 208, 216, 0.15);
    transform: translateY(-2px);
}

/* 背景光晕 */
.banner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(57, 208, 216, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* 粒子效果 */
.banner-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.banner-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(57, 208, 216, 0.6);
    border-radius: 50%;
    animation: particleFloat 15s infinite;
    box-shadow: 0 0 10px rgba(57, 208, 216, 0.8);
}

.banner-particles span:nth-child(1) { left: 10%; top: 80%; animation-delay: 0s; }
.banner-particles span:nth-child(2) { left: 20%; top: 20%; animation-delay: 1s; }
.banner-particles span:nth-child(3) { left: 30%; top: 70%; animation-delay: 2s; }
.banner-particles span:nth-child(4) { left: 40%; top: 30%; animation-delay: 3s; }
.banner-particles span:nth-child(5) { left: 50%; top: 60%; animation-delay: 4s; }
.banner-particles span:nth-child(6) { left: 60%; top: 25%; animation-delay: 5s; }
.banner-particles span:nth-child(7) { left: 70%; top: 75%; animation-delay: 6s; }
.banner-particles span:nth-child(8) { left: 80%; top: 35%; animation-delay: 7s; }
.banner-particles span:nth-child(9) { left: 90%; top: 65%; animation-delay: 8s; }
.banner-particles span:nth-child(10) { left: 15%; top: 45%; animation-delay: 9s; }

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0) translateX(0); 
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-100px) translateX(50px); 
        opacity: 0;
    }
}

/* 扫光效果 */
.banner-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(57, 208, 216, 0.1), transparent);
    transform: skewX(-25deg);
    animation: shineSweep 5s infinite;
    pointer-events: none;
}

@keyframes shineSweep {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* 内容样式 */
.banner-content {
    position: relative;
    z-index: 1;
}

.banner-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(57, 208, 216, 0.15);
    border: 1px solid rgba(57, 208, 216, 0.3);
    border-radius: 20px;
    font-size: 12px;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    margin-bottom: 20px;
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(57, 208, 216, 0.3); }
    50% { box-shadow: 0 0 20px rgba(57, 208, 216, 0.6); }
}

.banner-title {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #39d0d8 0%, #2a9d8f 50%, #39d0d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(57, 208, 216, 0.3);
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.banner-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    margin: 0 auto 16px;
    border-radius: 2px;
}

.banner-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 3px;
    margin-bottom: 30px;
}

/* 统计数据 */
.banner-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 20px rgba(57, 208, 216, 0.5);
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* ========== 黄金组件 ========== */
.gold-widget-wrapper { padding: 0 0 12px 0; }
.gold-loading { text-align: center; padding: 20px; color: var(--text-muted); }

.gold-widget-card {
    background: linear-gradient(135deg, rgba(57, 208, 216, 0.08) 0%, rgba(42, 157, 143, 0.08) 100%);
    border: 1px solid rgba(57, 208, 216, 0.3);
    border-radius: 16px;
    padding: 20px;
}

.gold-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.gold-widget-title { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--accent-cyan); }
.gold-widget-meta { display: flex; align-items: center; gap: 12px; }
.gold-update-time { font-size: 12px; color: var(--text-muted); }

.gold-refresh-btn {
    background: rgba(57, 208, 216, 0.15);
    border: 1px solid rgba(57, 208, 216, 0.3);
    color: var(--accent-cyan);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.gold-price-main { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.gold-price-cny { display: flex; align-items: baseline; gap: 4px; }
.gold-price-label { font-size: 13px; color: var(--text-muted); }
.gold-price-value { font-size: 36px; font-weight: 700; color: var(--accent-cyan); }
.gold-price-unit { font-size: 14px; color: var(--accent-cyan); opacity: 0.8; }
.gold-price-usd { font-size: 13px; color: var(--text-muted); }

/* ========== 小喇叭广播 ========== */
.broadcast-wrapper { padding: 0 0 16px; }
.broadcast-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(57, 208, 216, 0.15) 0%, rgba(42, 157, 143, 0.15) 100%);
    border: 1px solid rgba(57, 208, 216, 0.3);
    border-radius: 12px;
}

.broadcast-icon { font-size: 28px; }
.broadcast-text { font-size: 15px; font-weight: 500; color: var(--accent-cyan); }

/* ========== 主内容 ========== */
.apps-main { padding: 24px 0 120px; min-height: calc(100vh - 200px); }
.stats-bar { margin-bottom: 24px; color: var(--text-muted); font-size: 14px; }

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ========== 应用卡片 ========== */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s;
}

.app-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.app-header { margin-bottom: 12px; }
.app-name { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.app-category { font-size: 12px; color: var(--text-muted); }
.app-description { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.app-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.app-tag {
    padding: 3px 10px;
    background: var(--accent-cyan-light);
    color: var(--accent-cyan);
    border-radius: 10px;
    font-size: 11px;
}
.app-tag.blogger-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-weight: 500;
}

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 24px;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
}

.bottom-nav-item:hover, .bottom-nav-item.active { color: var(--accent-cyan); }
.bottom-nav-icon { font-size: 22px; }
.bottom-nav-text { font-size: 11px; }

/* ========== 底部 ========== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 24px 0 140px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.footer-icp {
    color: var(--accent-cyan);
    font-weight: 500;
    margin-bottom: 8px;
}

.footer-sync {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.footer-notice {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
    padding: 12px 16px;
    background: rgba(57, 208, 216, 0.05);
    border: 1px solid rgba(57, 208, 216, 0.15);
    border-radius: 8px;
    margin-top: 8px;
}

/* ========== 联系弹窗 ========== */
.contact-modal { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; }
.contact-modal.active { display: flex; }
.contact-modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); }
.contact-modal-box { position: relative; z-index: 1; width: 420px; max-width: 90vw; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 36px 32px; }
.contact-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; }
.contact-modal-header { text-align: center; margin-bottom: 28px; }
.contact-modal-header h2 { font-size: 22px; color: var(--text-primary); margin-bottom: 8px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input { width: 100%; padding: 12px 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; color: var(--text-primary); font-size: 15px; }
.form-submit { width: 100%; padding: 14px; background: var(--accent-gradient); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; }

/* ========== 浮动按钮 ========== */
.float-contact-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(57, 208, 216, 0.4);
}

/* ========== 手机端适配 ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .category-bar {
        padding: 8px 0;
    }
    
    .category-list {
        gap: 8px;
        padding: 0 4px;
    }
    
    .category-item {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 4px;
    }
    
    .app-card {
        padding: 18px;
        margin-bottom: 4px;
    }
    
    .app-name {
        font-size: 15px;
    }
    
    .banner-premium {
        padding: 24px 20px;
    }
    
    .banner-premium h2 {
        font-size: 24px;
    }
    
    .gold-widget-card {
        padding: 16px;
    }
    
    .gold-price-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .broadcast-box {
        padding: 12px 16px;
    }
    
    .bottom-nav {
        padding: 8px 0;
    }
    
    .bottom-nav-item {
        font-size: 11px;
    }
    
    .bottom-nav-icon {
        font-size: 20px;
    }
    
    .float-contact-btn {
        bottom: 90px;
        right: 12px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .site-footer {
        padding: 20px 0 140px;
    }
    
    .footer-notice {
        font-size: 11px;
        padding: 10px 12px;
    }
    
    .apps-main {
        padding-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .app-card {
        padding: 14px;
    }
    
    .app-name {
        font-size: 13px;
    }
    
    .category-item {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .category-item span:first-child {
        font-size: 14px;
    }
    
    .app-description {
        font-size: 11px;
    }
    
    .app-tag {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    .stats-bar {
        font-size: 12px;
    }
}
