/* ============================================================
   新感觉传奇联盟 - 深色复古资源站风格
   配色: 深色背景 + 金色主调 + 红点缀
   ============================================================ */
:root {
    --bg: #0f1115;
    --bg-2: #161a21;
    --bg-card: #1c222e;
    --border: #2a3242;
    --gold: #c8a040;
    --gold-light: #e6c26a;
    --red: #c0392b;
    --red-light: #e74c3c;
    --text: #cfd3dc;
    --text-dim: #8a919e;
    --green: #27ae60;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ---------- 顶部导航 ---------- */
.site-header {
    background: var(--bg-2);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
}
.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo-title {
    font-size: 22px; font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}
.logo-accent { color: var(--gold); }
.logo-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.main-nav { display: flex; gap: 22px; }
.main-nav a {
    color: var(--text);
    font-size: 15px;
    padding: 6px 2px;
    position: relative;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a.active { color: var(--gold); font-weight: 600; }
.main-nav a.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 2px; background: var(--gold);
}

.header-user { display: flex; align-items: center; gap: 12px; }
.btn-login, .btn-user-link {
    color: var(--text); font-size: 14px;
}
.btn-register, .btn-user {
    background: var(--gold); color: #1a1208;
    padding: 6px 16px; border-radius: 4px;
    font-size: 14px; font-weight: 600;
}
.btn-register:hover { background: var(--gold-light); color: #1a1208; }

/* ---------- Banner ---------- */
.banner {
    position: relative;
    background: linear-gradient(135deg, #1a2130 0%, #0f1115 100%);
    border-bottom: 1px solid var(--border);
    min-height: 320px;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.banner-track { width: 100%; }
.banner-slide { display: none; padding: 60px 20px; text-align: center; }
.banner-slide.active { display: block; }
.banner-slide h2 {
    font-size: 40px; color: var(--gold);
    margin-bottom: 14px; text-shadow: 0 2px 8px rgba(0,0,0,.6);
}
.banner-slide p { font-size: 18px; color: var(--text-dim); margin-bottom: 24px; }
.banner-dots {
    position: absolute; bottom: 20px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 8px;
}
.banner-dots .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--border); cursor: pointer;
}
.banner-dots .dot.active { background: var(--gold); }

/* ---------- 区块 ---------- */
.section { padding: 36px 0; }
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; border-left: 4px solid var(--gold);
    padding-left: 12px;
}
.section-title h3 { font-size: 20px; color: var(--text); }
.more-link { font-size: 14px; color: var(--gold); }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block; padding: 10px 24px;
    border-radius: 4px; font-size: 15px; font-weight: 600;
    text-align: center; transition: all .2s;
    border: none; cursor: pointer;
}
.btn-gold { background: var(--gold); color: #1a1208; }
.btn-gold:hover { background: var(--gold-light); color: #1a1208; }
.btn-buy { background: var(--red-light); color: #fff; }
.btn-buy:hover { background: var(--red); color: #fff; }
.btn-download { background: var(--green); color: #fff; }
.btn-download:hover { opacity: .85; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #1a1208; }

/* ---------- 分类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.cat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; padding: 24px; text-align: center;
    transition: all .2s;
}
.cat-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.cat-name { font-size: 16px; color: var(--text); font-weight: 600; }
.cat-more { font-size: 13px; color: var(--gold); margin-top: 6px; }

/* ---------- 资源卡片 ---------- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.res-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
    transition: all .2s;
}
.res-card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.res-thumb {
    display: block; height: 160px; overflow: hidden; position: relative;
    background: var(--bg-2);
}
.res-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder {
    height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 18px; text-align: center; line-height: 1.4;
}
.res-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 3px; color: #fff; }
.tag-free { background: var(--green); }
.tag-paid { background: var(--red-light); }
.tag-src { background: var(--gold); color: #1a1208; }
.res-body { padding: 14px; }
.res-title {
    display: block; font-size: 16px; color: var(--text); font-weight: 600;
    margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.res-title:hover { color: var(--gold); }
.res-brief { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; height: 38px; overflow: hidden; }
.res-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 12px; }
.res-foot { display: flex; align-items: center; justify-content: space-between; }
.res-price { font-size: 18px; color: var(--gold); font-weight: 700; }
.res-price.price-free { color: var(--green); }
.res-foot .btn { padding: 7px 18px; font-size: 14px; }

/* ---------- 公告 ---------- */
.notice-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; }
.notice-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    color: var(--text);
}
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--bg-2); color: var(--gold); }
.notice-time { font-size: 13px; color: var(--text-dim); }

/* ---------- 合规声明 ---------- */
.compliance {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 8px; padding: 24px;
}
.compliance h3 { color: var(--gold); margin-bottom: 12px; }
.compliance p { font-size: 14px; color: var(--text-dim); margin-bottom: 8px; }

/* ---------- 页脚 ---------- */
.site-footer {
    background: var(--bg-2); border-top: 2px solid var(--border);
    margin-top: auto;
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 20px; flex-wrap: wrap; gap: 16px;
}
.footer-brand p { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.footer-links { display: flex; gap: 18px; font-size: 14px; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 16px 20px; text-align: center;
}
.footer-bottom p { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.footer-icp { font-size: 13px; color: var(--text-dim); }

/* ---------- 通用 ---------- */
.empty-tip { color: var(--text-dim); padding: 20px; text-align: center; }
.main { flex: 1; }

/* ---------- 列表页 ---------- */
.filter-bar {
    display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; padding: 16px 18px; margin-bottom: 24px;
}
.filter-bar label { font-size: 14px; color: var(--text-dim); }
.filter-select {
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
    padding: 7px 12px; border-radius: 4px; font-size: 14px;
}
.filter-select:focus { outline: none; border-color: var(--gold); }
.filter-btn { margin-left: auto; }

/* ---------- 详情页 ---------- */
.detail-top {
    display: flex; gap: 30px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px; padding: 24px; margin-bottom: 30px;
    flex-wrap: wrap;
}
.detail-thumb {
    width: 340px; height: 220px; overflow: hidden; border-radius: 8px;
    background: var(--bg-2); flex-shrink: 0;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 280px; }
.detail-info h1 { font-size: 26px; color: var(--text); margin-bottom: 10px; }
.detail-brief { color: var(--text-dim); margin-bottom: 16px; }
.detail-spec { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 18px; }
.detail-spec span { font-size: 14px; color: var(--text-dim); }
.detail-spec b { color: var(--text); margin-left: 4px; }
.detail-price {
    display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.price-item {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 8px; padding: 14px 20px; min-width: 180px;
}
.price-item.checked { border-color: var(--gold); }
.price-item .lic { font-size: 14px; color: var(--text-dim); margin-bottom: 6px; }
.price-item .num { font-size: 22px; color: var(--gold); font-weight: 700; }
.detail-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 详情内容块 ---------- */
.detail-block {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 24px; margin-bottom: 24px;
}
.detail-block h3 {
    font-size: 18px; color: var(--gold);
    border-left: 4px solid var(--gold); padding-left: 12px; margin-bottom: 16px;
}
.detail-block p { font-size: 14px; color: var(--text); margin-bottom: 10px; }
.screenshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 12px; }
.screenshot-grid img { width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.license-note {
    background: var(--bg-2); border: 1px solid var(--border); border-left: 4px solid var(--red);
    border-radius: 6px; padding: 16px; font-size: 13px; color: var(--text-dim); margin-top: 16px;
}

/* ---------- 表单 ---------- */
.form-box {
    max-width: 420px; margin: 40px auto; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 10px; padding: 30px;
}
.form-box h2 { font-size: 22px; text-align: center; color: var(--text); margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: var(--text-dim); margin-bottom: 6px; }
.form-input {
    width: 100%; background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text); padding: 10px 12px; border-radius: 4px; font-size: 14px;
}
.form-input:focus { outline: none; border-color: var(--gold); }
.form-input.invalid { border-color: var(--red-light); }
.form-error { color: var(--red-light); font-size: 13px; margin-top: 4px; }
.form-tip { text-align: center; font-size: 13px; color: var(--text-dim); margin-top: 16px; }
.form-tip a { color: var(--gold); }
.btn-block { width: 100%; }

/* ---------- 用户中心 ---------- */
.user-layout { display: flex; gap: 24px; margin: 30px 0; }
.user-side {
    width: 220px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px; flex-shrink: 0;
}
.user-avatar { text-align: center; margin-bottom: 16px; }
.user-avatar .avatar {
    width: 64px; height: 64px; border-radius: 50%; background: var(--bg-2);
    border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--gold); margin: 0 auto;
}
.user-avatar .name { margin-top: 8px; font-size: 15px; }
.user-menu { display: flex; flex-direction: column; gap: 4px; }
.user-menu a {
    padding: 10px 12px; border-radius: 6px; font-size: 14px; color: var(--text);
}
.user-menu a:hover, .user-menu a.active { background: var(--bg-2); color: var(--gold); }
.user-main { flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 24px; min-height: 400px; }
.user-main h3 { color: var(--gold); margin-bottom: 18px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--gold); font-weight: 600; background: var(--bg-2); }
.table td { color: var(--text); }
.table tr:hover td { background: var(--bg-2); }

/* ---------- 状态徽章 ---------- */
.badge { padding: 3px 10px; border-radius: 3px; font-size: 12px; color: #fff; }
.badge-pending { background: #8a919e; }
.badge-paid { background: var(--green); }
.badge-closed { background: #555; }
.badge-open { background: var(--gold); color: #1a1208; }
.badge-replied { background: #2980b9; }

@media (max-width: 768px) {
    .header-inner { flex-direction: column; }
    .main-nav { flex-wrap: wrap; justify-content: center; gap: 12px; }
    .detail-thumb { width: 100%; }
    .user-layout { flex-direction: column; }
    .user-side { width: 100%; }
}
