/* ============================================================
   ZD牢鬼电竞 - H5移动端样式
   参考: gdsjz88.com (怪兽游戏) 设计风格
   ============================================================ */

:root {
    --bg: #f5f5f5;
    --white: #fff;
    --text: #1a1a1a;
    --text2: #666;
    --text3: #999;
    --border: #eee;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);

    /* 暗区 */
    --dz: #e94560;
    --dz-light: #ff6b81;
    --dz-bg: linear-gradient(135deg, #1a1a2e, #2d1b2e);
    --dz-tag: #ff4757;

    /* 三角洲 */
    --dt: #0984e3;
    --dt-light: #00a8ff;
    --dt-bg: linear-gradient(135deg, #0c1e35, #0a2a1a);
    --dt-tag: #00b894;

    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

/* ========== 顶部导航 ========== */
.nav-bar {
    position: sticky; top: 0; z-index: 100;
    background: var(--white);
    padding: 12px 16px;
    display: flex; align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.nav-bar .logo {
    font-size: 17px; font-weight: 700;
    color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.nav-bar .logo .logo-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #00b894;
}
.nav-back {
    display: flex; align-items: center; gap: 4px;
    color: var(--text2); font-size: 14px;
    text-decoration: none;
}

/* ========== 游戏选择大厅 ========== */
.game-lobby {
    padding: 20px 14px;
}
.lobby-title {
    text-align: center;
    margin-bottom: 24px;
}
.lobby-title h1 {
    font-size: 22px; font-weight: 700;
    margin-bottom: 6px;
}
.lobby-title p {
    font-size: 13px; color: var(--text3);
}

.game-select-card {
    display: block;
    text-decoration: none;
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.15s;
    position: relative;
}
.game-select-card:active { transform: scale(0.985); }

.game-select-card .card-banner {
    height: 100px;
    display: flex; align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.game-select-card .card-banner.dz { background: var(--dz-bg); }
.game-select-card .card-banner.dt { background: var(--dt-bg); }

.card-banner .banner-icon {
    font-size: 48px;
    opacity: 0.9;
}
.card-banner .banner-tag {
    position: absolute; top: 12px; right: 12px;
    font-size: 11px; color: #fff;
    padding: 3px 10px; border-radius: 20px;
    font-weight: 500;
}
.card-banner .banner-tag.dz { background: var(--dz-tag); }
.card-banner .banner-tag.dt { background: var(--dt-tag); }

.game-select-card .card-body {
    padding: 16px;
}
.game-select-card .card-body .game-name {
    font-size: 18px; font-weight: 700;
    margin-bottom: 4px;
}
.game-select-card .card-body .game-name.dz { color: var(--dz); }
.game-select-card .card-body .game-name.dt { color: var(--dt); }

.game-select-card .card-body .game-desc {
    font-size: 12px; color: var(--text3);
    line-height: 1.5;
    margin-bottom: 12px;
}

.game-select-card .card-body .entry-tags {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.entry-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; padding: 6px 12px;
    border-radius: 20px; font-weight: 500;
    text-decoration: none;
}
.entry-tag.dz {
    background: rgba(233,69,96,0.08);
    color: var(--dz);
}
.entry-tag.dt {
    background: rgba(9,132,227,0.08);
    color: var(--dt);
}

/* ========== 公告栏 ========== */
.notice-bar {
    margin: 0 14px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text2);
    box-shadow: var(--shadow);
}
.notice-bar .icon { font-size: 16px; }
.notice-bar .text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ========== 底部信息 ========== */
.footer-info {
    text-align: center;
    padding: 24px 16px 32px;
    font-size: 11px; color: #bbb;
    line-height: 1.8;
}

/* ========== 子页面通用 ========== */
.sub-page { min-height: 100vh; background: var(--bg); }

.page-header {
    background: var(--white);
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 12px;
}
.page-header h2 { font-size: 20px; font-weight: 700; }
.page-header p { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ========== 表单卡片 ========== */
.form-card {
    margin: 0 14px 16px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 16px;
    box-shadow: var(--shadow);
}
.form-card h3 {
    font-size: 16px; font-weight: 600;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px; font-weight: 500;
    color: var(--text2);
    margin-bottom: 6px;
}
.form-group label .required { color: #e74c3c; margin-left: 2px; }

.form-input, .form-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafafa;
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus {
    border-color: #0984e3;
    background: var(--white);
}
.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px;
    height: 46px; padding: 0 24px;
    font-size: 15px; font-weight: 600;
    border: none; border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: #0984e3; color: #fff; }
.btn-primary:active { background: #0873c9; }
.btn-dz { background: var(--dz); color: #fff; }
.btn-dt { background: var(--dt); color: #fff; }
.btn-outline {
    background: var(--white); color: var(--text2);
    border: 1px solid var(--border);
}

/* ========== 报价结果卡片 ========== */
.price-card {
    margin: 0 14px 16px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}
.price-card .price-value {
    font-size: 42px; font-weight: 800;
    color: #e74c3c;
}
.price-card .price-value .unit {
    font-size: 18px; font-weight: 500;
    color: var(--text3);
}
.price-card .price-detail {
    font-size: 12px; color: var(--text3);
    margin-top: 4px;
}

/* ========== 账号列表 ========== */
.account-list { padding: 0 14px; }
.account-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.account-item .acc-header {
    display: flex; justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.account-item .acc-code {
    font-size: 16px; font-weight: 700;
}
.account-item .acc-price {
    font-size: 20px; font-weight: 700;
    color: #e74c3c;
}
.account-item .acc-info {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 12px; color: var(--text2);
}
.account-item .acc-tag {
    display: inline-block;
    font-size: 10px; padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.acc-tag.available { background: #d4edda; color: #155724; }
.acc-tag.rented { background: #f8d7da; color: #721c24; }

/* ========== Tab切换 ========== */
.tab-bar {
    display: flex;
    background: var(--white);
    padding: 0;
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.tab-bar a {
    flex: 1; text-align: center;
    padding: 14px 0; font-size: 14px; font-weight: 500;
    color: var(--text3); text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.tab-bar a.active {
    color: #0984e3;
    border-bottom-color: #0984e3;
}

/* ========== 出号表筛选 ========== */
.filter-bar {
    display: flex; gap: 8px;
    padding: 12px 14px;
    background: var(--white);
    margin-bottom: 8px;
}
.filter-bar .form-select {
    flex: 1; height: 38px; font-size: 13px;
}

/* ========== 响应式 ========== */
@media (min-width: 768px) {
    body { max-width: 480px; margin: 0 auto; }
}

/* ============================================================
   PC模式 - 桌面端适配 (body.pc)
   ============================================================ */
body.pc {
    max-width: 100% !important;
    background: #eef1f5;
}
body.pc.sub-page {
    max-width: 100% !important;
}

/* ---- 全局容器 ---- */
body.pc .nav-bar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 32px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
body.pc .nav-bar .logo {
    font-size: 20px;
}

/* ---- 首页 ---- */
body.pc .game-lobby {
    max-width: 960px;
    margin: 48px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
body.pc .lobby-title {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}
body.pc .lobby-title h1 { font-size: 28px; }
body.pc .lobby-title p { font-size: 15px; }
body.pc .game-select-card {
    margin-bottom: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
body.pc .game-select-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
body.pc .game-select-card .card-banner {
    height: 140px;
}
body.pc .game-select-card .card-body .game-name {
    font-size: 20px;
}
body.pc .game-select-card .card-body .game-desc {
    font-size: 13px;
}
body.pc .footer-info {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 48px;
    font-size: 12px;
}

/* ---- 公告按钮 ---- */
body.pc button[onclick*="announce-modal"] {
    margin: 0 auto 32px !important;
    max-width: 500px;
}

/* ---- 子页面容器 ---- */
body.pc .page-header {
    max-width: 1100px;
    margin: 0 auto 16px;
    border-radius: 0 0 12px 12px;
    padding: 28px 32px;
}
body.pc .page-header h2 { font-size: 24px; }

/* ---- 表单卡片 PC ---- */
body.pc .form-card {
    max-width: 1100px;
    margin: 0 auto 20px;
    padding: 28px 32px;
    border-radius: 14px;
}
body.pc .form-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
}
body.pc .form-group {
    margin-bottom: 18px;
}
body.pc .form-group label {
    font-size: 14px;
}
body.pc .form-input, body.pc .form-select {
    height: 48px;
    font-size: 15px;
    border-radius: 10px;
}

/* ---- 表单双栏布局 ---- */
body.pc .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}
body.pc .form-grid .form-group-full {
    grid-column: 1 / -1;
}

/* ---- 按钮 hover ---- */
body.pc .btn:hover {
    opacity: 0.9;
    filter: brightness(1.08);
}
body.pc .btn:active {
    transform: scale(0.98);
}
body.pc .btn-opt:hover {
    border-color: #0984e3;
    background: rgba(9,132,227,0.05);
}
body.pc .btn-opt.active:hover {
    filter: brightness(1.1);
}

/* ---- 出号表 PC ---- */
body.pc .account-list {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
body.pc .account-item {
    margin-bottom: 0;
}
body.pc .account-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* ---- 筛选栏 PC ---- */
body.pc .filter-bar {
    max-width: 1100px;
    margin: 0 auto 12px;
    border-radius: 12px;
    padding: 14px 20px;
    gap: 12px;
}
body.pc .filter-bar .form-select {
    height: 42px;
    font-size: 14px;
}

/* ---- 历史记录 PC ---- */
body.pc .history-card {
    max-width: 1100px;
    margin: 0 auto 12px;
    transition: box-shadow 0.2s;
}
body.pc .history-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ---- 报价卡片 PC ---- */
body.pc .price-card {
    max-width: 1100px;
    margin: 0 auto 20px;
    border-radius: 14px;
    padding: 28px;
}
body.pc .price-card .price-value {
    font-size: 52px;
}

/* ---- 后台管理 PC ---- */
body.pc .list-table-wrap {
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: auto;
    border-radius: 12px;
}
body.pc .list-table {
    min-width: 100%;
    font-size: 13px;
}
body.pc .admin-filter-row {
    max-width: 1100px;
    margin: 0 auto 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- 公告弹窗 PC ---- */
body.pc #announce-modal > div {
    max-width: 420px !important;
    padding: 32px 28px !important;
}

/* ---- Tab栏 PC ---- */
body.pc .tab-bar {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 12px 12px 0 0;
}
body.pc .tab-bar a {
    font-size: 15px;
    padding: 16px 0;
}
body.pc .tab-bar a:hover {
    color: #0984e3;
    background: rgba(9,132,227,0.04);
}

/* ---- 协议弹窗 PC ---- */
body.pc .modal-box {
    max-width: 500px;
    padding: 32px;
}

/* ---- 图片上传区 PC ---- */
body.pc .upload-zone {
    min-height: 120px;
    font-size: 15px;
}
body.pc .upload-zone:hover {
    border-color: #0984e3;
    background: rgba(9,132,227,0.03);
}

/* ---- 子页面卡片 PC ---- */
body.pc .card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
body.pc .card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
body.pc .nav-back {
    font-size: 15px;
}