/* 公共样式：首页 + 二级页共用 */
html { scroll-behavior: smooth; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* 顶部导航 */
.nav-link { padding: .5rem 1rem; font-size: .875rem; font-weight: 500; color: #4b5563; white-space: nowrap; transition: all .2s; border-radius: .5rem; }
.nav-link:hover { color: #165DFF; }
.nav-link.active { color: #165DFF; background: rgba(22,93,255,.08); font-weight: 700; }

/* 板块标题 */
.category-title { font-size: 1.5rem; font-weight: 900; color: #1D2129; margin-bottom: 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; }
.category-title::after { content: ''; width: 3rem; height: .25rem; background: #165DFF; border-radius: 9999px; margin-top: .5rem; }

/* 资源卡片 */
.resource-card { background: #fff; padding: 1.5rem; border-radius: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid #f3f4f6; transition: all .3s; display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; cursor: pointer; }
.resource-card:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1); transform: translateY(-8px); }

/* 标签 */
.platform-tag { font-size: 10px; padding: .125rem .5rem; border-radius: .375rem; font-weight: 700; margin: 0 .125rem .25rem; display: inline-block; text-transform: uppercase; background: #f3f4f6; color: #6b7280; }
.tag-android { background: #dcfce7; color: #15803d; }
.tag-ios { background: #dbeafe; color: #1d4ed8; }
.tag-pc { background: #f3e8ff; color: #7e22ce; }
.tag-tv { background: #ffedd5; color: #c2410c; }
.tag-feature { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.tag-feature-a { background: #ffe4e6; color: #be123c; border: 1px solid #fecdd3; } /* 玫红 */
.tag-feature-b { background: #cffafe; color: #0e7490; border: 1px solid #a5f3fc; } /* 青色 */
.tag-feature-c { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; } /* 琥珀 */
.tag-feature-d { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; } /* 靛蓝 */

/* 按钮 */
.card-actions { margin-top: auto; width: 100%; display: flex; gap: .5rem; }
.btn-download, .btn-more { flex: 1; padding: .625rem .5rem; border-radius: .75rem; font-size: .875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: .5rem; transition: all .2s; cursor: pointer; white-space: nowrap; }
.btn-download { margin-top: auto; width: 100%; background: #165DFF; color: #fff; border: 1px solid #165DFF; box-shadow: 0 10px 15px -3px rgba(219,234,254,1), 0 4px 6px -4px rgba(219,234,254,1); }
.btn-download:hover { background: #1d4ed8; border-color: #1d4ed8; }
.btn-more { background: #fff; color: #165DFF; border: 1px solid #165DFF; }
.btn-more:hover { background: rgba(22,93,255,.08); }
.btn-download:focus-visible, .btn-more:focus-visible, .nav-link:focus-visible, .chip:focus-visible, .detail-close:focus-visible { outline: 3px solid #93b4ff; outline-offset: 2px; }

/* 首页使用提示横幅 */
.usage-tip { display: flex; align-items: center; justify-content: center; gap: .75rem; text-align: center; flex-wrap: wrap; background: linear-gradient(90deg, rgba(22,93,255,.08), rgba(114,46,209,.08)); border: 1px solid rgba(22,93,255,.2); color: #1D2129; font-size: 1rem; font-weight: 600; line-height: 1.7; padding: 1rem 1.5rem; border-radius: 1rem; margin: 0 auto 2.5rem; max-width: 56rem; }
.usage-tip i { color: #165DFF; font-size: 1.25rem; flex-shrink: 0; }
.usage-tip strong { color: #165DFF; }
@media (max-width: 640px) { .usage-tip { font-size: .875rem; padding: .875rem 1.125rem; } }

/* 分类快捷入口（移动端替代顶部导航） */
.chip { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .875rem; font-size: .8125rem; font-weight: 600; border-radius: 9999px; white-space: nowrap; border: 1px solid rgba(255,255,255,.25); color: #e5e7eb; background: rgba(255,255,255,.08); transition: all .2s; }
.chip:hover { background: rgba(255,255,255,.2); color: #fff; }
.chip.active { background: #165DFF; border-color: #165DFF; color: #fff; }

/* 详情弹窗 */
.detail-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 1rem; }
.detail-mask.open { display: flex; }
.detail-box { position: relative; background: #fff; border-radius: 1.25rem; width: 100%; max-width: 26rem; max-height: 85vh; overflow-y: auto; padding: 2rem 1.5rem 1.5rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); animation: popIn .22s ease; text-align: center; }
.detail-close { position: absolute; top: .5rem; right: .5rem; width: 2rem; height: 2rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 1.125rem; transition: all .2s; }
.detail-close:hover { color: #374151; background: #f3f4f6; }
.detail-cat { display: inline-flex; align-items: center; gap: .375rem; font-size: .75rem; font-weight: 700; color: #165DFF; background: rgba(22,93,255,.08); padding: .25rem .75rem; border-radius: 9999px; margin-bottom: 1rem; }
.detail-note { font-size: .75rem; color: #9ca3af; margin: 1rem 0 .75rem; }
.detail-actions { display: flex; flex-direction: column; gap: .625rem; }
.detail-actions .btn-download, .detail-actions .btn-more { flex: none; padding: .75rem; }
@keyframes popIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .detail-box { animation: none; }
    .resource-card, .resource-card:hover { transition: none; transform: none; }
}
