* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    color: #fff;
    padding-bottom: 60px;
}

/* 顶部标题 */
.page-header {
    text-align: center;
    padding: 22px 10px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}
.page-header h1 {
    font-size: 22px;
    margin-bottom: 6px;
}
.page-header p {
    font-size: 13px;
    color: #ccc;
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* 圆盘 */
.lottery-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    box-shadow: 0 0 40px rgba(0,119,255,0.25);
}
.red-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%,-50%);
}
.blue-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160px;
    height: 160px;
    transform: translate(-50%,-50%);
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}

/* 数字球 */
.wheel-number {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    margin-top: -18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: 0.25s;
}
.red-number {
    background: #e63946;
    color: #fff;
    border: 2px solid #fff;
}
.blue-number {
    background: #0096c7;
    color: #fff;
    border: 2px solid #fff;
}

/* 闪烁动画 */
.red-number.flash {
    animation: flashRed 0.22s infinite alternate;
}
.blue-number.flash {
    animation: flashBlue 0.22s infinite alternate;
}
@keyframes flashRed {
    0%{box-shadow:0 0 6px #f77; transform:scale(1);}
    100%{box-shadow:0 0 22px #e63946; transform:scale(1.18);}
}
@keyframes flashBlue {
    0%{box-shadow:0 0 6px #7dd; transform:scale(1);}
    100%{box-shadow:0 0 22px #0096c7; transform:scale(1.18);}
}

.red-number.disabled {
    background: #555;
    opacity: 0.5;
}

/* 结果球 */
.result-balls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.ball {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: bold;
    border: 2px solid #fff;
}
.ball.red { background:#e63946; color:#fff; }
.ball.blue { background:#0096c7; color:#fff; }
.ball.empty {
    background: transparent;
    border: 2px dashed rgba(255,255,255,0.25);
}

/* 按钮 */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.btn {
    padding: 13px 20px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.start-btn { background: linear-gradient(45deg,#e63946,#c1121f); }
.save-btn { background: linear-gradient(45deg,#0096c7,#023e8a); }
.predict-btn { background: linear-gradient(45deg,#9d4edd,#7b2cbf); }
.btn:disabled { opacity: 0.45; }

/* 预测 */
.predict-section {
    text-align: center;
}
.predict-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
}
.predict-result {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.predict-ball {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 1px solid #fff;
}
.predict-ball.red { background:#e63946; color:#fff; }
.predict-ball.blue { background:#0096c7; color:#fff; }
.predict-tip {
    font-size: 12px;
    color: #aaa;
    margin-top: 6px;
}

/* 历史 */
.history-section h3, .analysis-section h3 {
    text-align: center;
    font-size: 16px;
    margin-bottom: 12px;
}
.history-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 230px;
    overflow-y: auto;
}
.history-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}
.history-ball {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 1px solid #fff;
}
.history-ball.red { background:#e63946; color:#fff; }
.history-ball.blue { background:#0096c7; color:#fff; }

/* 统计 */
.analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.analysis-card {
    background: rgba(255,255,255,0.05);
    border-radius: 13px;
    padding: 13px;
}
.analysis-card h4 {
    font-size: 15px;
    margin-bottom: 8px;
}
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}
.stat-item {
    background: rgba(255,255,255,0.1);
    padding: 4px 7px;
    border-radius: 7px;
}
.stat-item.red { color:#ff758f; }
.stat-item.blue { color:#4cc9f0; }

/* 底部 */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.3);
    text-align: center;
    padding: 12px 10px;
    font-size: 12px;
    color: #ccc;
}