/* ==============================================
   永劫无间摸金选号网 · 前台样式
   暗色金橙主题, 致敬游戏风格
   ============================================== */
:root {
    --bg: #0f1115;
    --panel: #1a1d24;
    --panel-2: #232730;
    --border: #2a2e37;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --accent: #ffb13b;
    --accent-2: #ff7a00;
    --red: #ff453a;
    --green: #34c759;
    --blue: #5ac8fa;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

/* ============ 顶部公告 - 一条一行 ============ */
.announce-list {
    background: linear-gradient(90deg, #1a1d24, #232730, #1a1d24);
    border-bottom: 1px solid var(--border);
    padding: 6px 16px;
}
.announce-list:empty { display: none; }
.announce-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    font-size: 14px;
    border-bottom: 1px dashed rgba(255,255,255,0.05);
}
.announce-item:last-child { border-bottom: 0; }
.announce-item .tag {
    background: var(--red);
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: 1px;
}
.announce-item .text { flex: 1; }
.announce-item a.detail {
    text-decoration: underline;
    font-size: 12px;
}

/* ============ 头部 ============ */
.site-header {
    background: linear-gradient(135deg, #1a1d24 0%, #2a1810 100%);
    border-bottom: 1px solid var(--border);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.site-title { font-size: 22px; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.site-title .sword { font-size: 26px; }
.site-subtitle { color: var(--muted); font-size: 13px; margin-top: 4px; }
.nav-right { display: flex; gap: 10px; align-items: center; }
.nav-right a, .nav-right .btn {
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--text);
    font-size: 13px;
    border: 1px solid var(--border);
}
.nav-right a:hover, .nav-right .btn:hover { background: var(--accent); color: #1a1d24; }
.user-pill { background: var(--panel-2); padding: 6px 12px; border-radius: 16px; font-size: 13px; }

/* ============ 筛选区 (搜索 + 排序按钮) ============ */
.filter-bar {
    background: var(--panel);
    padding: 14px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.search-group {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg);
}
.search-group input {
    border: 0 !important;
    border-radius: 0 !important;
    padding: 8px 14px !important;
    min-width: 280px;
    background: transparent !important;
    outline: none;
}
.search-group .search-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #1a1d24;
    border: 0;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.search-group .search-btn:hover { filter: brightness(1.1); }
.sort-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sort-group .sort-label { color: var(--muted); font-size: 13px; margin-right: 2px; }
.sort-group .sort-btn {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.15s;
}
.sort-group .sort-btn:hover { border-color: var(--accent); color: var(--accent); }
.sort-group .sort-btn.active {
    background: var(--accent);
    color: #1a1d24;
    border-color: var(--accent);
    font-weight: 700;
}
.filter-bar .count {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
}

/* ============ 广告位 (头部下方, 搜索栏之上, 风格一致) ============ */
.ad-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 14px 30px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}
.ad-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    text-align: center;
    min-height: 56px;
    text-decoration: none;
    border: 2px solid var(--border);
    background: var(--bg);
    box-shadow: 0 1px 0 rgba(0,0,0,0.2) inset;
}
.ad-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.35);
    border-color: var(--accent);
}
.ad-cell-text {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}
.ad-cell-text strong { word-break: break-all; }
.ad-cell-img {
    padding: 0;
}
.ad-cell-img img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
}

/* ============ 账号卡片网格 ============ */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
    padding: 20px 30px;
}
.account-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}
.account-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 177, 59, 0.15);
}
.card-cover {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2a1810, #1a1d24);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .placeholder { color: var(--muted); font-size: 13px; }
.card-cover .badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}
.card-cover .featured {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: #1a1d24;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}
.card-body { padding: 14px 16px; }
.card-quick { margin-bottom: 10px; }
.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    font-size: 11px;
}
.quick-stats .qs {
    background: var(--panel-2);
    padding: 5px 4px;
    border-radius: 4px;
    text-align: center;
}
.quick-stats .qs .qv { color: var(--accent); font-weight: 700; display: block; font-size: 13px; line-height: 1.2; }
.quick-stats .qs .qk { color: var(--muted); font-size: 10px; }
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.price { font-size: 22px; font-weight: 800; color: var(--red); }
.price-tag { background: rgba(255, 69, 58, 0.12); color: var(--red); padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-left: 6px; }

/* ============ 详情页 ============ */
.detail-wrap { max-width: 1100px; margin: 20px auto; padding: 0 20px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 20px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.detail-table {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    border-collapse: collapse;
    overflow: hidden;
}
.detail-table th, .detail-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
}
.detail-table th { background: var(--panel-2); color: var(--accent); width: 120px; font-weight: 600; }
.detail-table tr:last-child td, .detail-table tr:last-child th { border-bottom: 0; }
.detail-price {
    background: linear-gradient(135deg, #ff7a00, #ff453a);
    padding: 18px 24px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}
.detail-price .lbl { color: rgba(255,255,255,0.8); font-size: 13px; }
.detail-price .num { color: #fff; font-size: 36px; font-weight: 800; }
.detail-desc { background: var(--panel); padding: 18px; border-radius: 10px; border: 1px solid var(--border); white-space: pre-wrap; }

/* ============ 表单 ============ */
.form-wrap { max-width: 480px; margin: 60px auto; padding: 30px; background: var(--panel); border-radius: 12px; border: 1px solid var(--border); }
.form-wrap h2 { margin: 0 0 20px; color: var(--accent); text-align: center; }
.form-wrap label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 13px; }
.form-wrap input { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 14px; box-sizing: border-box; }
.form-wrap button { width: 100%; margin-top: 20px; padding: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #1a1d24; font-weight: 700; border-radius: 6px; cursor: pointer; font-size: 15px; }
.form-wrap .alt { text-align: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.form-wrap .back-home {
    text-align: center;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}
.form-wrap .back-home a { color: var(--muted); }
.form-wrap .back-home a:hover { color: var(--accent); }

/* ============ 提示 ============ */
.flash { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 13px; }
.flash.err { background: #3b1d1d; color: #ff8080; }
.flash.ok  { background: #1d3b1d; color: #80ff80; }

/* ============ 分页 ============ */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 20px; }
.pagination a, .pagination span {
    padding: 6px 12px; background: var(--panel); border: 1px solid var(--border);
    border-radius: 4px; color: var(--text); font-size: 13px;
}
.pagination .current { background: var(--accent); color: #1a1d24; border-color: var(--accent); }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
    .account-grid { grid-template-columns: 1fr; padding: 14px; }
    .site-header { padding: 14px; }
    .filter-bar { padding: 10px 14px; }
    .site-title { font-size: 18px; }
}