/* Wheel Panel */
.wheel-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 
        0 0 0 8px var(--surface-color),
        0 8px 32px rgba(0, 0, 0, 0.15);
    background: var(--surface-color);
    transition: transform 4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: var(--surface-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border: 2px solid var(--border-color);
    z-index: 10;
}

.spin-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.spin-btn:active {
    transform: scale(0.98);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spin-btn i {
    font-size: 20px;
    margin-bottom: 4px;
}

.spin-btn span {
    font-size: 12px;
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 20;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Result Section */
.result-section {
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.result-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-display {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 16px 0;
    padding: 20px;
    background: var(--background-color);
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}

.result-display.winner {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #fff, var(--background-color));
    transform: scale(1.05);
    box-shadow: 
        0 4px 16px rgba(16, 185, 129, 0.2),
        var(--shadow);
    color: var(--success-color);
}

.placeholder {
    color: var(--text-muted);
    font-weight: normal;
    font-style: italic;
}

.result-history {
    margin-top: 20px;
}

.result-history h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.history-list {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    padding: 12px;
    background: var(--background-color);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
    font-size: 14px;
    display: flex;
    justify-content: between;
    align-items: center;
}

.history-item .entry {
    flex: 1;
    font-weight: 500;
}

.history-item .time {
    font-size: 12px;
    color: var(--text-muted);
}

/* History Panel */
.history-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--background-color);
    padding: 16px;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detailed-history {
    max-height: 300px;
    overflow-y: auto;
}

.history-record {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-record:last-child {
    border-bottom: none;
}

.history-record .entry {
    font-weight: 500;
}

.history-record .timestamp {
    font-size: 12px;
    color: var(--text-muted);
}

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 3s ease-in-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Wheel Spin Animation */
@keyframes wheel-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(calc(360deg * 3 + var(--final-rotation)));
    }
}

.wheel-spinning {
    animation: wheel-spin var(--spin-duration) cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}