/* 拼搏在线风格 - 浅蓝主题 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: #f4f6f9;
    color: #333;
}

/* 顶部黑色条 */
.top-black-header {
    background: #1a1a1a;
    color: #bbb;
    font-size: 13px;
    line-height: 32px;
}
.top-black-header .container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}
.top-black-header a { color: #bbb; text-decoration: none; margin-left: 15px; }
.top-black-header a:hover { color: #fff; }
.top-black-header .announcement { color: #ffd700; }
.top-black-header .nav-right { display: flex; gap: 0; }

/* 头部 logo + 浏览量 */
.top-menu-logo {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
.top-menu-logo .container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
}
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-area .logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-img {
    height: 52px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}
.logo-area h1 { font-size: 24px; color: #d43c33; }
.logo-area .logo-sub { color: #999; font-size: 12px; }
.views {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}
.views b { color: #d43c33; font-size: 16px; margin: 0 3px; }

/* 红色导航 */
.top-red-header { background: #d43c33; }
.top-red-header .nav-menu {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    list-style: none;
}
.top-red-header .nav-menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0 18px;
    line-height: 40px;
    font-size: 14px;
}
.top-red-header .nav-menu li a:hover,
.top-red-header .nav-menu li.active a {
    background: #b9322a;
}
.nav-right-user { margin-left: auto; display: flex; }
.nav-right-user a { padding: 0 12px !important; }

/* 主内容 */
.container { max-width: 1000px; margin: 0 auto; padding: 0 10px; }
.content-wrap { padding: 15px 0; }

/* 最新开奖块 */
.latest-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}
.latest-box .box-title {
    background: linear-gradient(180deg, #f9f9f9, #f0f0f0);
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
    color: #d43c33;
}
.latest-box .box-title .term { color: #666; font-weight: normal; font-size: 13px; margin-left: 8px; }
.latest-box .box-body {
    padding: 20px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.latest-info { text-align: center; }
.latest-info .label { font-size: 13px; color: #999; margin-bottom: 6px; }
.latest-info .time { font-size: 14px; color: #555; }
.balls { display: flex; gap: 20px; align-items: center; }
.ball {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; font-weight: bold; color: #fff;
    box-shadow: inset -3px -3px 6px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.2);
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #d43c33);
}
.ball.green { background: radial-gradient(circle at 30% 30%, #6bcf7a, #2e9e44); }
.ball.blue  { background: radial-gradient(circle at 30% 30%, #6ba8ff, #2e6bd4); }
.ball.orange{ background: radial-gradient(circle at 30% 30%, #ffb56b, #e07b2e); }
.ball.purple{ background: radial-gradient(circle at 30% 30%, #c06bff, #8e2ed4); }
.ball.gray  { background: radial-gradient(circle at 30% 30%, #b0b0b0, #777); }
.ball-sep { font-size: 26px; color: #ccc; font-weight: bold; }

/* 统计区 */
.stats-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}
.stats-box .box-title {
    background: linear-gradient(180deg, #f9f9f9, #f0f0f0);
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
    color: #d43c33;
}
.stats-grid { display: flex; gap: 12px; padding: 15px; }
.stats-col { flex: 1; border: 1px solid #eee; border-radius: 4px; padding: 10px; }
.stats-col h4 { font-size: 14px; color: #666; margin-bottom: 8px; text-align: center; }
.stats-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; }
.stats-bar .num { width: 14px; text-align: center; color: #999; }
.stats-bar .bar-bg { flex: 1; background: #f0f0f0; height: 14px; border-radius: 3px; overflow: hidden; }
.stats-bar .bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, #ff8a80, #d43c33);
    min-width: 2px;
    transition: width .4s;
}
.stats-bar .cnt { width: 24px; text-align: center; color: #d43c33; font-weight: bold; }

/* 近50期表格 */
.table-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}
.table-box .box-title {
    background: linear-gradient(180deg, #f9f9f9, #f0f0f0);
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
    color: #d43c33;
}
table.history {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.history thead th {
    background: #fafafa;
    border-bottom: 2px solid #e5e5e5;
    padding: 9px 6px;
    font-weight: bold;
    color: #555;
    text-align: center;
}
table.history tbody td {
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 6px;
    text-align: center;
    color: #444;
}
table.history tbody tr:hover { background: #fff9f9; }
table.history .num-cell {
    font-weight: bold;
    letter-spacing: 1px;
}
.num-red { color: #d43c33; }
.num-green { color: #2e9e44; }
.num-blue { color: #2e6bd4; }
.small-tag { font-size: 12px; color: #888; }

/* 登录/注册表单 */
.auth-wrap {
    max-width: 420px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.auth-wrap h2 { text-align: center; color: #d43c33; margin-bottom: 24px; font-size: 20px; }
.auth-wrap .form-item { margin-bottom: 16px; }
.auth-wrap label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.auth-wrap input {
    width: 100%;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
}
.auth-wrap input:focus { border-color: #d43c33; }
.auth-wrap .btn {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 4px;
    background: #d43c33;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    margin-top: 6px;
}
.auth-wrap .btn:hover { background: #b9322a; }
.auth-wrap .switch { text-align: center; margin-top: 14px; font-size: 13px; }
.auth-wrap .switch a { color: #d43c33; text-decoration: none; }
.auth-tip { text-align: center; font-size: 12px; color: #999; margin-top: 8px; }
.msg { text-align: center; font-size: 13px; margin-top: 10px; }
.msg.error { color: #d43c33; }
.msg.success { color: #2e9e44; }

/* 管理页 */
.admin-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}
.admin-box .box-title {
    background: linear-gradient(180deg, #f9f9f9, #f0f0f0);
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: bold;
    color: #d43c33;
}
.admin-box .box-body { padding: 15px; }
.admin-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; align-items: flex-end; }
.admin-form input, .admin-form select {
    height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 13px;
    outline: none;
}
.admin-form .btn {
    height: 34px;
    border: none;
    border-radius: 4px;
    background: #d43c33;
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
    font-size: 13px;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
}
.badge.superadmin { background: #d43c33; }
.badge.admin { background: #e07b2e; }
.badge.user { background: #2e9e44; }
.badge.system { background: #666; }
.badge.manual { background: #2e6bd4; }
.badge.register { background: #888; }
.op-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 3px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    color: #555;
    margin: 0 2px;
}
.op-btn:hover { border-color: #d43c33; color: #d43c33; }
.op-btn.danger:hover { border-color: #d43c33; color: #d43c33; background: #fff5f5; }

/* 定时任务管理 */
.task-row { margin-bottom: 8px; font-size: 13px; color: #555; }
.task-label { display: inline-block; width: 90px; color: #999; text-align: right; margin-right: 8px; }
.task-value { color: #333; }
.task-actions .msg { font-size: 13px; }

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0 30px;
    color: #999;
    font-size: 12px;
}

/* ================= 移动端适配 (≤768px) ================= */
@media (max-width: 768px) {
    body { font-size: 14px; }

    /* 顶部黑色条: 隐藏公告, 只留右侧 */
    .top-black-header .container { padding: 0 10px; }
    .top-black-header .announcement { display: none; }
    .top-black-header .nav-right { margin-left: auto; }
    .top-black-header .nav-right a { margin-left: 10px; }

    /* logo 区 */
    .top-menu-logo .container { padding: 10px; }
    .logo-area h1 { font-size: 20px; }
    .logo-area .logo-sub { display: none; }
    .logo-img { height: 40px; max-width: 150px; }
    .views { font-size: 12px; padding: 5px 10px; }
    .views b { font-size: 14px; }

    /* 红色导航: 横向滚动, 触摸友好 */
    .top-red-header .nav-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        white-space: nowrap;
    }
    .top-red-header .nav-menu li a {
        padding: 0 14px;
        line-height: 38px;
        font-size: 13px;
    }
    .top-red-header .nav-menu::-webkit-scrollbar { display: none; }
    .top-red-header .nav-menu { scrollbar-width: none; }

    /* 内容区 */
    .content-wrap { padding: 10px 0; }
    .container { padding: 0 8px; }

    /* 最新开奖块 */
    .latest-box .box-body {
        flex-direction: column;
        gap: 14px;
        padding: 16px 10px;
    }
    .balls { gap: 14px; }
    .ball { width: 48px; height: 48px; font-size: 22px; }
    .ball-sep { font-size: 20px; }
    .latest-info .time { font-size: 13px; }

    /* 个十百位统计: 三列叠放 */
    .stats-grid { flex-direction: column; gap: 8px; padding: 10px; }
    .stats-col { padding: 8px; }
    .stats-col h4 { margin-bottom: 4px; }

    /* 近50期表格: 横向滚动 */
    .table-box { overflow-x: auto; }
    table.history { min-width: 640px; font-size: 12px; }
    table.history thead th { padding: 7px 4px; }
    table.history tbody td { padding: 6px 4px; }

    /* 认证表单 */
    .auth-wrap {
        margin: 30px auto;
        width: calc(100% - 24px);
        max-width: 420px;
        padding: 22px 18px;
        border-radius: 6px;
    }
    .auth-wrap h2 { font-size: 18px; margin-bottom: 18px; }

    /* 管理页 */
    .admin-box { overflow-x: auto; }
    .admin-box table.history { min-width: 560px; }
    .admin-box .box-body { padding: 12px; }
    .admin-form { gap: 8px; }
    .admin-form input, .admin-form select { flex: 1 1 100%; min-width: 0; }
    .admin-form .btn { flex: 1 1 100%; }

    /* 定时任务管理 */
    .task-row { font-size: 12px; }
    .task-label { width: 72px; }
    .task-actions .btn { padding: 0 12px; }

    /* 页脚 */
    .footer { padding: 14px 0 20px; }
}

/* 超小屏 (≤400px): 进一步压缩 */
@media (max-width: 400px) {
    .ball { width: 40px; height: 40px; font-size: 18px; }
    .balls { gap: 10px; }
    .views b { font-size: 13px; }
    .top-red-header .nav-menu li a { padding: 0 10px; font-size: 12px; }
}
