body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    background: #f5f7fa;
    padding: 15px;
}

/* ===== 顶部导航 ===== */
.topbar {
    display: flex;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 15px;
}

.top-left { font-size: 24px; font-weight: bold; color:#E56E1F;}
.top-right { display: flex; align-items: center; justify-content: flex-end; flex: 1; gap: 10px; }

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.bg-red { background: #e64340; color: #fff;margin-top:2px; }
.bg-blue { background: #1677ff; color: #fff; }
.bg-green { background: #00b578; color: #fff; }

/* ===== 选项卡 ===== */
.tabs {
    display: flex;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.tabs > div {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 16px;
    color: #666;
    cursor: pointer;
}

.tabs > div.active {
    color: #1677ff;
    font-weight: bold;
}

/* ===== 内容区 ===== */
.content-wrapper {
    overflow: hidden;
    border-radius: 10px;
    margin-top: 10px;
}

.content-slider {
    display: flex;
    transition: transform .3s ease;
}

.content-panel {
    min-width: 100%;
    box-sizing: border-box;
    background: #fff;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

/* ===== 表格 ===== */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    padding: 1px 1px;
    border: 1px solid #e5e7eb;
    text-align: center;
    font-size: 16px;
    word-break: break-all;
}

.table-wrap thead {
    background: #f5f7fa;
}

.table-wrap tbody tr:hover {
    background: #fafafa;
}

/* ===== 弹窗板块 ===== */
.pop-row {
    margin-bottom: 15px;
}

.pop-label {
    font-size: 16px;
    margin-bottom: 6px;
    color: #333;
}

.pop-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

textarea.pop-input {
    height: 120px;
    resize: vertical;
}

/* ===== 弹窗 (Modal) ===== */
.modal-mask {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.4);
    z-index: 999;
    display: none;
    overflow-y: auto; 
}

.modal {
    width: 80%;
    margin: 40px auto; 
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-sizing: border-box;
}

@media screen and (max-width: 768px) {
    .modal {
        width: 92%;
        margin: 20px auto;
        padding: 15px;
    }

    .modal-row {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-bottom: 12px;
    }

    .modal-label {
        width: auto;
        min-width: px;
        text-align: right;
        margin-right: 0;
        flex-shrink: 0;
    }

    .modal input {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .modal-row:first-child input, 
    .modal-row:last-child input {
        width: 80px; 
    }
    
    .table-wrap th,
    .table-wrap td {
        padding: 6px 4px; 
        font-size: 16px;
    }

    /* 移动端球体样式 */
    .ball-num {
        width: 24px !important;
        height: 24px !important;
        border-width: 2px !important;
        font-size: 16px !important;
    }

    .ball div {
        font-size: 10px !important;
    }

    .module-name-input {
        width: 90px !important;
        padding: 0px 0px !important;
        font-size: 18px !important;
    }

    .update-module-name {
        padding: 6px 8px !important;
        font-size: 16px !important;
        margin-top:4px;
    }

    .table-wrap .btn {
        padding: 12px 6px;
        font-size: 16px;
    }
}

.modal-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.modal-label {
    font-size: 16px;
    text-align: right;
    margin-right: 6px;
}

.modal input {
    width: 45px;
    height: 45px;
    padding: 4px 6px;
    font-size: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.modal input:focus {
    outline: none;
    border-color: #1677ff;
}

/* ===== 广告卡片 ===== */
.ad-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
}

.ad-row {
    margin-bottom: 10px;
}

.ad-img-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.ad-img-box img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.ad-img-label {
    display: inline-block;
    padding: 6px 12px;
    background: #1677ff;
    color: #fff;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
}

.ad-img-label input {
    display: none;
}

.ad-action-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ad-pos {
    width: 70px !important;
}

.update-ad{}

/* ===== 模块开关 (通用) ===== */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0;
    right: 0; bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform .3s;
}

.switch input:checked + .slider {
    background-color: #1677ff;
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

/* ===== 排序按钮 ===== */
.sort-btn {
    cursor: pointer;
    font-size: 20px;
    padding: 0 6px;
    user-select: none;
}

/* ==========================================
   新增：开奖球 & 状态样式 (从JS剥离)
========================================== */

.ball {
    display: inline-block;
    margin: 0 1px;     /* ✅ 球与球之间的间距 */
    padding: 0;
}

.ball-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;              /* ✅ 去掉边框 */
    background: #999;          /* ✅ 默认实心背景 */
    color: #fff;               /* ✅ 白字 */
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.ball-red  { border-color: #ff4040; color: #ff4040; }
.ball-blue { border-color: #1e90ff; color: #1e90ff; }
.ball-green{ border-color: #00cd66; color: #00cd66; }





/* 状态背景色 */
.status-waiting { background: #fff; }      /* 等待开奖 */
.status-opening { background: #fff3cd; }   /* 正在开奖 */
.status-opened { background: #d4edda; }   /* 已开奖 */


/* ===== 按钮 ===== */
/* ===== 按钮 ===== */
.btn2 {
    padding: 8px 16px;
    border: none;

    width: 90%;
    text-align: center;
    margin: 0 auto;
    background: green;
    color: #fff;
    font-size: 23px;
    border-radius: 7px;
    margin-top:20px;
}




/* =====================
   每一期外层容器
===================== */
.mb-group {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #ffffff;
    margin-bottom: 12px;
    overflow: hidden;
}

/* =====================
   期号标题
===================== */
.mb-group-title {
    padding: 8px 12px;
    font-weight: 600;
    font-size: 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #e0e0e0;
}

/* =====================
   按钮区域
===================== */
.mb-field-buttons {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    
}

/* =====================
   单个按钮
===================== */
.mb-field-btn {
    padding: 6px 12px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background: #3cb371;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
}

/* =====================
   按钮 hover / active
===================== */
.mb-field-btn:hover {
    background: #d4d4d4;
    color: #3cb371;
}

.mb-field-btn:active {
    background: #e6ecff;
}

.textarea{
font-size: 18px;
    
}




/* 开奖时间输入框样式 */
.kj-time-group .kj-num {
    width: 80px;
    height: 30px;
    padding: 0 8px;
    font-size: 14px;
    line-height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: center;
    margin: 0 2px;
}

/* 分隔符样式 */
.kj-time-group .split {
    font-size: 14px;
    line-height: 36px;
    color: #666;
    margin: 0 2px;
}

/* 整体行布局 */
.kj-time-group {
    display: flex;
    align-items: center;
    gap: 4px;
}


/* 两行共用样式 */
.number-row {
  display: flex;
  justify-content: flex-start; /* ✅ 关键：统一靠左 */
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* 输入框 */
#pingmaInputs input {
  width: 22px;
  height: 22px;
  text-align: center;
  font-size: 14px;
  padding: 0;
}

/* 号码信息块 */
.num-info {
  width: 32px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-left: 2px;
  line-height: 32px;

}

/* 波色圆点 */
.dot {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  padding: 2px;
}


/* ==============================
   下拉框整体样式
============================== */
.kj-time-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  height: 36px;
  min-width: 64px;
  padding: 0 22px 0 8px;

  font-size: 14px;
  text-align: center;
  color: #333;

  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;

  border: 1px solid #d0d0d0;
  border-radius: 6px;
  outline: none;

  cursor: pointer;
}

/* 去掉 IE 箭头 */
.kj-time-group select::-ms-expand {
  display: none;
}

/* hover / focus */
.kj-time-group select:hover {
  border-color: #1e90ff;
}

.kj-time-group select:focus {
  border-color: #1e90ff;
  box-shadow: 0 0 0 2px rgba(30,144,255,.25);
}



