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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
    background: #f8f9fa;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* ===== 导航栏 ===== */
.header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; color: #e74c3c; }
.logo-icon { font-size: 28px; }
.logo-text { color: #2c3e50; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-link { padding: 8px 14px; border-radius: 20px; color: #555; font-size: 15px; transition: all .2s; }
.nav-link:hover { background: #f0f0f0; color: #e74c3c; }
.nav-link.active { background: #e74c3c; color: #fff; }
.nav-link.disabled { color: #ccc; pointer-events: none; }
.soon { font-size: 11px; background: #ddd; color: #fff; padding: 2px 6px; border-radius: 8px; margin-left: 4px; }

/* ===== 横幅 ===== */
.hero {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
}

.hero-title { font-size: 52px; font-weight: 800; margin-bottom: 10px; letter-spacing: 4px; }
.hero-subtitle { font-size: 20px; opacity: .9; margin-bottom: 36px; }

.hero-search { display: flex; justify-content: center; gap: 0; max-width: 560px; margin: 0 auto; }
.search-input {
    flex: 1; padding: 14px 20px; font-size: 16px; border: none; border-radius: 28px 0 0 28px;
    outline: none; font-family: inherit;
}
.search-btn {
    padding: 14px 32px; font-size: 16px; border: none; border-radius: 0 28px 28px 0;
    background: #2c3e50; color: #fff; cursor: pointer; font-family: inherit; font-weight: 600;
}
.search-btn:hover { background: #1a252f; }

/* ===== 通用区块 ===== */
.section { padding: 60px 0; }
.section-gray { background: #fff; }
.section-title { font-size: 24px; font-weight: 700; color: #2c3e50; margin-bottom: 30px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.section-header .section-title { margin-bottom: 0; }
.more-link { color: #e74c3c; font-weight: 600; }
.more-link:hover { text-decoration: underline; }

/* ===== 板块卡片 ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

.card {
    background: #fff; border-radius: 16px; padding: 30px 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06); transition: transform .25s, box-shadow .25s;
    display: block; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.card-featured { border: 2px solid #e74c3c; }
.card-icon { font-size: 42px; margin-bottom: 16px; }
.card-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; color: #2c3e50; }
.card-desc { color: #777; font-size: 14px; line-height: 1.7; }
.card-tag { position: absolute; top: 16px; right: 16px; font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.card-tag.hot { background: #e74c3c; color: #fff; }
.card-tag.soon-tag { background: #ddd; color: #888; }
.disabled-card { opacity: .75; cursor: default; }
.disabled-card:hover { transform: none; }

/* ===== 优惠列表 ===== */
.deal-list { display: flex; flex-direction: column; gap: 14px; }

.deal-item {
    background: #fff; border-radius: 12px; padding: 20px; display: flex;
    align-items: center; gap: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.deal-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

.deal-platform {
    min-width: 80px; text-align: center; font-size: 13px; font-weight: 700;
    color: #e74c3c; background: #fff0ef; padding: 8px 12px; border-radius: 8px;
}
.deal-content { flex: 1; min-width: 0; }
.deal-title { font-size: 16px; font-weight: 600; color: #2c3e50; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-desc { color: #888; font-size: 13px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-meta { display: flex; align-items: center; gap: 10px; }
.deal-tag { font-size: 12px; padding: 2px 10px; border-radius: 10px; }
.deal-tag.coupon { background: #e74c3c; color: #fff; }
.deal-tag.discount { background: #f39c12; color: #fff; }
.deal-tag.free { background: #27ae60; color: #fff; }
.deal-tag.event { background: #3498db; color: #fff; }
.deal-date { font-size: 12px; color: #bbb; }
.deal-btn {
    min-width: 100px; padding: 10px 18px; background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff; border-radius: 8px; font-size: 14px; font-weight: 600; text-align: center;
    transition: opacity .2s; white-space: nowrap;
}
.deal-btn:hover { opacity: .85; }
.deal-loading { text-align: center; color: #999; padding: 40px 0; }

/* ===== 页脚 ===== */
.footer { background: #2c3e50; color: #fff; padding: 40px 0; text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,.8); font-size: 14px; }
.footer-links a:hover { color: #f39c12; }
.footer-text { font-size: 14px; margin-bottom: 8px; opacity: .7; }
.footer-disclaimer { font-size: 12px; opacity: .5; }
.github-link { color: #f39c12; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; height: auto; padding: 12px 20px; gap: 10px; }
    .nav { justify-content: center; gap: 4px; }
    .nav-link { padding: 6px 10px; font-size: 13px; }
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 16px; }
    .hero-search { flex-direction: column; gap: 10px; }
    .search-input, .search-btn { border-radius: 28px; }
    .deal-item { flex-direction: column; align-items: flex-start; }
    .deal-btn { width: 100%; }
    .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .card-grid { grid-template-columns: 1fr; }
}

/* ===== deals.html 页面 ===== */
.page-header {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: #fff; padding: 60px 0; text-align: center;
}
.page-header h1 { font-size: 36px; font-weight: 800; margin-bottom: 10px; }
.page-header p { font-size: 16px; opacity: .9; }

/* ===== 关于页面 ===== */
.about-content { background: #fff; border-radius: 16px; padding: 40px; max-width: 800px; margin: 0 auto; }
.about-content h2 { font-size: 22px; color: #2c3e50; margin: 30px 0 12px; }
.about-content h2:first-child { margin-top: 0; }
.about-content p { color: #555; line-height: 1.8; margin-bottom: 12px; }
.about-content ul { padding-left: 20px; }
.about-content li { color: #555; line-height: 2; list-style: disc; }

/* ===== 壁纸页面 ===== */
.wp-filters {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.wp-filter, .wp-device {
    padding: 8px 18px; border-radius: 20px; border: 2px solid #e8e8e8;
    background: #fff; color: #555; font-size: 14px; cursor: pointer;
    transition: all .2s; font-family: inherit;
}
.wp-filter:hover, .wp-device:hover { border-color: #e74c3c; color: #e74c3c; }
.wp-filter.active, .wp-device.active { background: #e74c3c; border-color: #e74c3c; color: #fff; }

.wp-device-filters {
    display: flex; gap: 10px; margin-bottom: 30px;
}

.wp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.wp-card {
    border-radius: 12px; overflow: hidden; background: #fff;
    box-shadow: 0 3px 14px rgba(0,0,0,.08); cursor: pointer;
    transition: transform .25s, box-shadow .25s;
}
.wp-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.15); }

.wp-thumb-wrap { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.wp-card[data-device="mobile"] .wp-thumb-wrap { aspect-ratio: 9/16; max-height: 320px; }
.wp-thumb { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.wp-card:hover .wp-thumb { transform: scale(1.05); }

.wp-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .25s;
}
.wp-card:hover .wp-overlay { opacity: 1; }
.wp-view-btn {
    background: rgba(255,255,255,.9); color: #333; padding: 10px 22px;
    border-radius: 20px; font-size: 14px; font-weight: 600;
}

.wp-card-info {
    padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
}
.wp-card-title { font-size: 14px; font-weight: 600; color: #2c3e50; }
.wp-card-cat { font-size: 12px; color: #aaa; }

/* ===== 灯箱 ===== */
.lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.lightbox-content {
    position: relative; z-index: 1; max-width: 90vw; max-height: 90vh;
    background: #1a1a2e; border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%;
    width: 36px; height: 36px; font-size: 16px; cursor: pointer; line-height: 36px; text-align: center;
}
.lightbox-img {
    max-width: 80vw; max-height: 65vh; object-fit: contain; display: block; margin: 0 auto;
}
.lightbox-info {
    padding: 16px 20px; background: #1a1a2e; color: #fff;
}
.lightbox-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.lightbox-author { font-size: 13px; color: #aaa; margin-bottom: 10px; }
.lightbox-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lb-tag { background: rgba(255,255,255,.1); color: #ddd; padding: 3px 10px; border-radius: 10px; font-size: 12px; }
.lightbox-download {
    display: inline-block; background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff; padding: 10px 24px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.lightbox-download:hover { opacity: .85; }

@media (max-width: 768px) {
    .wp-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .wp-filters { gap: 6px; }
    .wp-filter, .wp-device { padding: 6px 12px; font-size: 13px; }
    .lightbox-img { max-width: 95vw; max-height: 55vh; }
}
@media (max-width: 480px) {
    .wp-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== AI工具 暗夜霓虹风格 ===== */
.ai-header {
    background: linear-gradient(135deg, #0d0015 0%, #1a0030 40%, #0d0d2b 100%);
    padding: 50px 0 40px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}
.ai-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -20%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139,92,246,0.15), transparent 70%);
    border-radius: 50%;
}
.ai-header::after {
    content: '';
    position: absolute;
    bottom: -30%; right: -10%;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(236,72,153,0.12), transparent 70%);
    border-radius: 50%;
}
.ai-header-inner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
    position: relative; z-index: 1;
}
.ai-header h1 {
    font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 8px;
    background: linear-gradient(90deg, #a78bfa, #f472b6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.ai-header p { color: #a78bfa; font-size: 16px; }
.ai-header-stats { display: flex; gap: 30px; }
.ai-stat { text-align: center; }
.ai-stat-num {
    display: block; font-size: 28px; font-weight: 800;
    background: linear-gradient(90deg, #a78bfa, #34d399);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.ai-stat-label { font-size: 13px; color: #6b7280; }

/* 分类筛选 */
.ai-filters {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px;
}
.ai-filter, .ai-price-btn {
    padding: 8px 20px; border-radius: 24px; border: 2px solid rgba(139,92,246,0.25);
    background: rgba(13,0,21,0.6); color: #a78bfa; font-size: 14px; cursor: pointer;
    transition: all .25s; font-family: inherit;
}
.ai-filter:hover, .ai-price-btn:hover {
    border-color: #8b5cf6; color: #fff; background: rgba(139,92,246,0.15);
}
.ai-filter.active, .ai-price-btn.active {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-color: transparent; color: #fff; box-shadow: 0 0 20px rgba(139,92,246,0.4);
}
.ai-price-filter { display: flex; gap: 10px; margin-bottom: 30px; }

/* 卡片网格 */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* AI卡片 */
.ai-card {
    background: rgba(15,0,35,0.85);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 16px; padding: 22px;
    transition: all .3s; backdrop-filter: blur(8px);
    display: flex; flex-direction: column; gap: 10px;
}
.ai-card:hover {
    border-color: rgba(139,92,246,0.6);
    box-shadow: 0 0 30px rgba(139,92,246,0.15), 0 8px 30px rgba(0,0,0,.4);
    transform: translateY(-3px);
}
.ai-card-top {
    display: flex; align-items: center; justify-content: space-between;
}
.ai-card-icon { font-size: 36px; line-height: 1; }
.ai-card-badges { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.ai-badge {
    font-size: 11px; padding: 3px 9px; border-radius: 8px; font-weight: 600;
}
.ai-badge-free { background: rgba(52,211,153,0.15); color: #34d399; }
.ai-badge-freemium { background: rgba(251,191,36,0.15); color: #fbbf24; }
.ai-badge-paid { background: rgba(236,72,153,0.15); color: #f472b6; }
.ai-badge-cat { background: rgba(139,92,246,0.15); color: #a78bfa; }
.ai-card-name {
    font-size: 18px; font-weight: 700; color: #fff; margin: 0;
    background: linear-gradient(90deg, #e2e8f0, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.ai-card-desc {
    font-size: 13px; color: #9ca3af; line-height: 1.6; flex: 1;
}
.ai-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-tag {
    font-size: 11px; padding: 2px 8px; border-radius: 6px;
    background: rgba(139,92,246,0.1); color: #818cf8; border: 1px solid rgba(139,92,246,0.2);
}
.ai-card-link {
    display: inline-block; text-align: center; padding: 10px;
    background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(236,72,153,0.3));
    border: 1px solid rgba(139,92,246,0.4);
    border-radius: 10px; color: #e2e8f0; font-size: 14px; font-weight: 600;
    transition: all .25s; text-decoration: none; margin-top: 4px;
}
.ai-card-link:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff; box-shadow: 0 0 20px rgba(139,92,246,0.3);
}

/* AI页底部 */
.footer-ai { background: rgba(10,0,25,0.95); }

/* 全站暗夜背景 */
body {
    background: linear-gradient(180deg, #0a0015 0%, #08001a 30%, #05001a 100%);
    min-height: 100vh;
}

/* 暗夜导航 */
.header { background: rgba(8,0,18,0.92); border-bottom-color: rgba(139,92,246,0.2); backdrop-filter: blur(12px); }
.nav-link { color: #c4b5fd; }
.nav-link:hover { color: #fff; }
.nav-link.active { color: #a78bfa; border-bottom-color: #7c3aed; }
.logo-text { background: linear-gradient(90deg, #a78bfa, #f472b6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* 暗夜页头 */
.page-header:not(.ai-header) {
    background: linear-gradient(135deg, #0d0015, #1a0030);
    border-bottom-color: rgba(139,92,246,0.25);
}
.page-header h1 {
    background: linear-gradient(90deg, #e2e8f0, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* 暗夜卡片 */
.card { background: rgba(15,0,35,0.85); border-color: rgba(139,92,246,0.2); }
.card:hover { border-color: rgba(139,92,246,0.5); box-shadow: 0 8px 30px rgba(139,92,246,0.12); }
.card-title { color: #e2e8f0; }
.card-desc { color: #9ca3af; }
.card-icon { filter: drop-shadow(0 0 8px rgba(139,92,246,0.5)); }

/* 暗夜标签 */
.skill-tag { background: rgba(139,92,246,0.15); color: #a78bfa; }
.hot { background: linear-gradient(135deg, #7c3aed, #db2777); color: #fff; }

/* 暗夜按钮 */
.btn-primary { background: linear-gradient(135deg, #7c3aed, #db2777); }
.btn-primary:hover { background: linear-gradient(135deg, #6d28d9, #be185d); box-shadow: 0 4px 20px rgba(124,58,237,0.4); }
.btn-secondary { border-color: rgba(139,92,246,0.4); color: #a78bfa; }
.btn-secondary:hover { border-color: #7c3aed; background: rgba(139,92,246,0.1); }

/* 暗夜折扣卡 */
.deal-card { background: rgba(15,0,35,0.85); border-color: rgba(139,92,246,0.2); }
.deal-card:hover { border-color: rgba(139,92,246,0.5); box-shadow: 0 6px 25px rgba(139,92,246,0.12); }
.deal-platform { color: #a78bfa; }
.deal-title { color: #e2e8f0; }
.deal-price { color: #f472b6; }
.deal-desc { color: #9ca3af; }
.deal-tag { background: rgba(139,92,246,0.15); color: #a78bfa; }
.deal-original { color: #6b7280; }

/* 暗夜页脚 */
.footer { background: rgba(8,0,18,0.95); border-top-color: rgba(139,92,246,0.15); }
.footer-text { color: #6b7280; }
.footer-links a { color: #9ca3af; }
.footer-links a:hover { color: #a78bfa; }

/* 暗夜加载 */
.deal-loading { color: #a78bfa; }

/* 暗夜表单 */
.search-input { background: rgba(15,0,35,0.8); border-color: rgba(139,92,246,0.3); color: #e2e8f0; }
.search-input::placeholder { color: #6b7280; }

/* 暗夜禁用卡片 */
.disabled-card { background: rgba(10,0,25,0.6); border-color: rgba(139,92,246,0.1); opacity: .6; }
.skill-tag.s-tag { background: rgba(139,92,246,0.08); color: #6b7280; }

/* 暗夜滚动条 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0015; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.6); }

@media (max-width: 768px) {
    .ai-header { padding: 30px 0; }
    .ai-header h1 { font-size: 26px; }
    .ai-header-stats { gap: 20px; }
    .ai-stat-num { font-size: 22px; }
    .ai-grid { grid-template-columns: 1fr; gap: 16px; }
    .ai-filters { gap: 7px; }
    .ai-filter, .ai-price-btn { padding: 6px 14px; font-size: 13px; }
}
