/* ==================== 基础重置与全局设置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    color: #333;
}


/* ==================== Header区域样式 ==================== */
.app-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.header-content {
    position: relative;
    z-index: 2;
}

.app-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.app-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
    margin-top: 4px;
}

.header-decoration {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100px;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
    border-radius: 50px;
}


/* ==================== 主容器样式 ==================== */
.container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 25px;
    margin: 20px auto;
    flex: 1;
}


/* ==================== 圆盘区域样式 ==================== */
.wheel-container {
    position: relative;
    width: 80vw;
    height: 80vw;
    max-width: 300px;
    max-height: 300px;
    margin: 0 auto 30px;
}

.outer-wheel, .inner-wheel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
}

/* 外圈红球盘 */
.outer-wheel {
    width: 100%;
    height: 100%;
    background: #fff0f0;
    border: 3px solid #ff6b6b;
}

/* 内圈蓝球盘 */
.inner-wheel {
    width: 60%;
    height: 60%;
    background: #f0f8ff;
    border: 3px solid #4dabf7;
}

/* 数字标签（固定位置核心） */
.number-tag {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    cursor: default;
    transition: all 0.3s ease;
    box-sizing: border-box;
    padding: 2px;
    transform: translate(-50%, -50%); /* 中心对齐 */
}

.red-number { 
    background: #ffe3e3; 
    color: #e03131; 
    border: 1px solid #ffc9c9; 
}
.blue-number { 
    background: #d0ebff; 
    color: #1971c2; 
    border: 1px solid #a5d8ff; 
}

/* 已选数字隐藏（核心功能） */
.number-tag.selected {
    display: none;
}

/* 闪烁动画（选号时视觉反馈） */
@keyframes blink {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.3; transform: translate(-50%, -50%) scale(0.9); }
}
.blink { animation: blink 0.5s infinite; }


/* ==================== 结果显示球样式 ==================== */
.balls-display {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.empty { 
    background: #f1f3f5; 
    color: #adb5bd; 
    border: 2px dashed #dee2e6;
}
.red-ball.filled { 
    background: linear-gradient(135deg, #ff6b6b 0%, #e03131 100%); 
    color: white; 
    border-color: #c92a2a;
    transform: scale(1.1); /* 选中时放大 */
}
.blue-ball.filled { 
    background: linear-gradient(135deg, #4dabf7 0%, #1971c2 100%); 
    color: white; 
    border-color: #1864ab;
    transform: scale(1.1); /* 选中时放大 */
}


/* ==================== 操作按钮样式 ==================== */
.control-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn {
    flex: 1;
    height: 50px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* 按钮悬停光波效果 */
.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.start-btn { 
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%); 
}
.select-btn { 
    background: linear-gradient(135deg, #339af0 0%, #228be6 100%); 
}
.btn:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none;
}
.btn:active:not(:disabled) { 
    transform: translateY(2px); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


/* ==================== 历史记录区样式 ==================== */
.records-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.records-section h3 {
    font-size: 16px;
    color: #495057;
    margin-bottom: 15px;
    text-align: left;
    padding-left: 10px;
    border-left: 4px solid #4dabf7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.record-item {
    background: white;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #343a40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.record-item:hover {
    transform: translateX(5px); /* 悬停右移效果 */
}

.record-red { 
    color: #e03131; 
    font-weight: bold; 
    background: #fff5f5;
    padding: 2px 6px;
    border-radius: 4px;
}
.record-blue { 
    color: #1971c2; 
    font-weight: bold; 
    background: #e7f5ff;
    padding: 2px 6px;
    border-radius: 4px;
}


/* ==================== Footer区域样式 ==================== */
.app-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.disclaimer h4 {
    color: #ffd43b;
    margin-bottom: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.disclaimer ul {
    list-style: none;
    margin-bottom: 20px;
}

.disclaimer li {
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    font-size: 12px;
    opacity: 0.8;
}


/* ==================== 响应式调整 ==================== */
@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: 20px;
    }
    
    .app-title {
        font-size: 20px;
    }
    
    .btn {
        height: 45px;
        font-size: 15px;
    }
    
    .wheel-container {
        max-width: 280px;
        max-height: 280px;
    }
}