/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    font-size: 2.5em;
    text-align: center;
}

/* 转盘容器 */
.wheel-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 20px auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.3), inset 0 0 20px rgba(255,255,255,0.1);
    border: 10px solid #fff;
    background: conic-gradient(
        #FF6B6B 0deg 60deg,
        #4ECDC4 60deg 120deg,
        #45B7D1 120deg 180deg,
        #96CEB4 180deg 240deg,
        #FFEAA7 240deg 300deg,
        #DDA0DD 300deg 360deg
    );
    transition: transform 0.1s ease-out;
}

.wheel.spinning {
    animation: spin 4s cubic-bezier(0.17, 0.67, 0.12, 0.99) forwards;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(var(--spin-deg, 0deg)); }
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    font-size: 16px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #e74c3c;
    z-index: 20;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

.prize-label {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    padding-top: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-size: 16px;
    pointer-events: none;
}

/* 按钮样式 */
.spin-btn {
    margin-top: 30px;
    padding: 15px 50px;
    font-size: 20px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    font-family: 'Microsoft YaHei', sans-serif;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.5);
}

.spin-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* 结果显示 */
.result {
    margin-top: 20px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    font-size: 1.5em;
    color: #333;
    text-align: center;
    display: none;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* 彩花效果 */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f00;
    animation: confetti-fall 3s ease-in-out forwards;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(-20px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* 奖品列表 */
.prizes-list {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
}

.prizes-list h3 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

.prizes-list ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.prizes-list li {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    text-align: center;
    color: white;
    font-size: 15px;
    transition: transform 0.2s ease;
}

.prizes-list li:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wheel-container {
        width: 300px;
        height: 300px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .prize-label {
        font-size: 14px;
    }
    
    .spin-btn {
        padding: 12px 40px;
        font-size: 18px;
    }
    
    .prizes-list ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .wheel-container {
        width: 250px;
        height: 250px;
    }
}