* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 标题样式 */
.header {
    text-align: center;
    padding: 20px 0;
    color: #fff;
}

.header h1 {
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

/* 转盘容器 */
.wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-outer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.wheel-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

/* 指针样式 */
.pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
}

.pointer-triangle {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #ff4757;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.pointer-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #ff4757, #ff3838);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.5);
    border: 3px solid #fff;
}

.pointer-circle span {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
}

/* 按钮样式 */
.btn-container {
    text-align: center;
    margin: 30px 0;
}

.start-btn {
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    border: none;
    padding: 15px 60px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    color: #8b4513;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.start-btn:active {
    transform: translateY(0);
}

.start-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

/* 剩余次数 */
.chances {
    text-align: center;
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.chances .count {
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
}

/* 中奖记录 */
.record-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.record-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.record-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}

.record-list li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.record-list li:last-child {
    border-bottom: none;
}

.record-list .no-record {
    text-align: center;
    color: #999;
    justify-content: center;
}

.record-list .prize-name {
    color: #ff4757;
    font-weight: bold;
}

.record-list .prize-time {
    color: #999;
    font-size: 12px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 20px;
    width: 80%;
    max-width: 320px;
    overflow: hidden;
    animation: modalPop 0.3s ease;
}

@keyframes modalPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(145deg, #ff4757, #ff3838);
    color: #fff;
    padding: 20px;
    text-align: center;
}

.modal-header h2 {
    font-size: 24px;
}

.modal-body {
    padding: 30px 20px;
    text-align: center;
}

.prize-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.prize-text {
    font-size: 18px;
    color: #333;
}

.prize-text span {
    color: #ff4757;
    font-weight: bold;
    font-size: 22px;
}

.modal-footer {
    padding: 0 20px 20px;
    text-align: center;
}

.confirm-btn {
    background: linear-gradient(145deg, #667eea, #764ba2);
    border: none;
    padding: 12px 50px;
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 提示弹窗 */
.tip-modal .modal-content {
    max-width: 280px;
}

.tip-modal .modal-body {
    padding: 30px 20px;
}

.tip-modal p {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

/* 转盘旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式适配 */
@media (max-width: 375px) {
    .wheel-container {
        width: 280px;
        height: 280px;
    }
    
    .wheel-wrapper {
        width: 245px;
        height: 245px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .start-btn {
        padding: 12px 50px;
        font-size: 18px;
    }
}

/* 滚动条样式 */
.record-list::-webkit-scrollbar {
    width: 4px;
}

.record-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.record-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.record-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}
