/* 7色转盘游戏样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    overflow-x: hidden;
}

.game-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.game-header {
    margin-bottom: 30px;
    padding-top: env(safe-area-inset-top, 20px);
}

.game-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
}

#wheel {
    display: block;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease-out;
}

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

.pointer::after {
    content: '';
    position: absolute;
    top: -18px;
    left: -10px;
    width: 20px;
    height: 20px;
    background: #ff4757;
    border-radius: 50%;
    border: 3px solid white;
}

.controls {
    margin-bottom: 30px;
}

.spin-button {
    background: linear-gradient(45deg, #ff4757, #ff3838);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    min-width: 160px;
    min-height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: all 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

.spin-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.4);
}

.spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.result-container {
    margin-bottom: env(safe-area-inset-bottom, 20px);
}

.result-display {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    min-height: 30px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin: 0 auto;
    max-width: 200px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.result-display.show {
    opacity: 1;
    transform: translateY(0);
}

.result-display.winner {
    background: linear-gradient(45deg, #2ed573, #1e90ff);
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

/* 转盘旋转动画 */
.wheel-spinning {
    animation: spin-wheel var(--spin-duration, 4s) cubic-bezier(0.17, 0.67, 0.12, 0.99) forwards;
}

@keyframes spin-wheel {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(var(--final-rotation, 1800deg));
    }
}