* {margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
    background: #f5f7fa;
    color: #303133;
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 70px;
}

/* 顶部渐变头部 */
.header {
    background: linear-gradient(135deg, #e62429 0%, #c2181e 100%);
    color: #fff;
    padding: 28px 20px 36px;
    text-align: center;
}
.header h1 {font-size:22px;font-weight:600;margin-bottom:6px;letter-spacing:1px;}
.header .tip {font-size:12px;opacity:0.85;line-height:1.6;}

/* 卡片通用 */
.card {
    background: #fff;
    border-radius: 16px;
    margin: -20px 16px 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.card.plain {margin: 16px;}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1f2937;
}

/* 按钮 */
.btn {
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-primary {background: linear-gradient(135deg, #e62429, #c2181e);color:#fff;box-shadow:0 4px 12px rgba(230,36,41,0.3);}
.btn-primary:active {transform: translateY(1px);}
.btn-default {background:#fff;color:#333;border:1px solid #e5e7eb;}
.btn-warn {background:#fff;color:#e62429;border:1px solid #e62429;}
.btn-block {width:100%;}
.btn-sm {padding:8px 14px;font-size:13px;border-radius:8px;}

/* 摇奖区 */
.ball-panel {
    text-align: center;
    padding: 10px 0 20px;
}
.ball-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 60px;
    align-items: center;
}
.ball {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.ball.red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #d32f2f);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}
.ball.blue {
    background: radial-gradient(circle at 30% 30%, #64b5f6, #1565c0);
    box-shadow: 0 4px 10px rgba(21, 101, 192, 0.3);
}
.ball.rolling {animation: ballShake 0.1s infinite alternate;}
@keyframes ballShake {
    from {transform: translateY(-3px) scale(1.05);}
    to {transform: translateY(3px) scale(0.95);}
}

/* 表单 */
.form-group {margin-bottom: 16px;}
.form-label {font-size:14px;color:#606266;margin-bottom:8px;display:block;}
.form-input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus {border-color: #e62429;}
.form-select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    background: #fff;
    outline: none;
}

/* 折叠面板 */
.collapse-title {
    padding: 12px 0;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f3f4f6;
}
.collapse-content {display: none;}
.collapse-content.show {display: block;padding-bottom: 8px;}

/* 结果列表 */
.result-item {
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.result-item:last-child {border-bottom: none;}
.result-nums .r {color:#e62429;margin-right:4px;}
.result-nums .b {color:#1565c0;}
.result-meta {font-size:12px;color:#9ca3af;margin-top:4px;}

/* 底部导航 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    display: flex;
    border-top: 1px solid #f3f4f6;
    z-index: 99;
    padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #909399;
    gap: 2px;
    text-decoration: none;
}
.tab-item.active {color: #e62429;}
.tab-icon {font-size: 22px;}

/* 分页 */
.page-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
}
.page-btn {
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #606266;
    text-decoration: none;
    font-size: 13px;
}
.page-info {font-size: 13px;color: #909399;}

/* 统计面板 */
.stat-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    line-height: 2;
    color: #4b5563;
}
.stat-box b {color: #e62429;}

/* 列表项 */
.list-item {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.list-item:last-child {border-bottom: none;}
.list-left {color: #606266;font-size: 13px;}
.list-right {font-size: 14px;}

/* 后台布局 */
.admin-layout {padding-bottom: 0;}
.admin-header {
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header h1 {font-size: 18px;font-weight: 600;}
.admin-menu {
    background: #fff;
    display: flex;
    border-bottom: 1px solid #f3f4f6;
    overflow-x: auto;
}
.admin-menu a {
    padding: 14px 20px;
    color: #606266;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.admin-menu a.active {color: #e62429;border-bottom: 2px solid #e62429;}
.admin-content {padding: 20px 16px;}

/* 数据看板 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.stat-card .num {font-size: 24px;font-weight: bold;color: #1f2937;margin-bottom: 4px;}
.stat-card .label {font-size: 12px;color: #909399;}

/* 提示文字 */
.tip-text {font-size: 12px;color: #909399;line-height: 1.6;}
.warn-text {color: #e6a23c;}
.footer-tip {
    text-align: center;
    font-size: 11px;
    color: #c0c4cc;
    padding: 20px 24px;
    line-height: 1.6;
}
.empty {
    text-align: center;
    color: #c0c4cc;
    font-size: 13px;
    padding: 40px 0;
}

/* 表格 */
.table-wrap {overflow-x: auto;}
table {width: 100%;border-collapse: collapse;font-size: 13px;}
th, td {padding: 10px 8px;text-align: left;border-bottom: 1px solid #f3f4f6;}
th {background: #f8fafc;font-weight: 500;color: #606266;}

/* 用户卡片 */
.user-card {
    background: linear-gradient(135deg, #e62429 0%, #c2181e 100%);
    color: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    margin: -20px 16px 16px;
}
.user-name {font-size: 20px;font-weight: 600;margin-bottom: 8px;}
.user-meta {display: flex;gap: 24px;font-size: 13px;opacity: 0.9;}

/* 菜单列表 */
.menu-list {
    background: #fff;
    border-radius: 12px;
    margin: 0 16px 16px;
    overflow: hidden;
}
.menu-item {
    padding: 16px 20px;
    font-size: 15px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.menu-item:last-child {border-bottom: none;}
.menu-item .arrow {color: #c0c4cc;}

/* 操作成功/错误提示 */
.msg-box {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.msg-success {background: #f0f9ff;color: #0e7490;border: 1px solid #bae6fd;}
.msg-error {background: #fef2f2;color: #dc2626;border: 1px solid #fecaca;}
