.wheel-container {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.wheel-wrapper {
    position: relative;
    width: 420px;
    height: 420px;
    flex-shrink: 0;
}

.wheel-border {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ffd700, #ff8c00, #ffd700, #ff8c00, #ffd700, #ff8c00, #ffd700, #ff8c00, #ffd700, #ff8c00, #ffd700, #ff8c00);
    box-shadow:
            0 0 40px rgba(255, 215, 0, 0.4),
            inset 0 0 20px rgba(0, 0, 0, 0.3);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 0 60px rgba(255, 215, 0, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.3); }
}

.light-dots {
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    z-index: 1;
}

.light-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%);
}

.light-dot.on {
    background: #ffd700;
    box-shadow: 0 0 8px 3px rgba(255, 215, 0, 0.9);
}

.light-dot.off {
    background: #ff4500;
    box-shadow: 0 0 6px 2px rgba(255, 69, 0, 0.6);
}

canvas {
    position: relative;
    z-index: 2;
    border-radius: 50%;
    cursor: pointer;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
}

.pointer {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 45px solid #ff2d55;
    filter: drop-shadow(0 3px 6px rgba(255, 45, 85, 0.6));
}

.pointer::after {
    content: '';
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: #ff2d55;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 45, 85, 0.8);
}

.center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(145deg, #ff416c, #ff2d55);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow:
            0 4px 15px rgba(255, 45, 85, 0.5),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2),
            inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 2px;
}

.center-btn:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow:
            0 6px 25px rgba(255, 45, 85, 0.7),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2),
            inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.center-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.center-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.result-panel {
    width: 320px;
    min-height: 420px;
    background: #fff0f3;
    border: 1px solid #fcd5df;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(255, 100, 130, 0.1);
}

.result-panel h2 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    background: linear-gradient(90deg, #ff6b8a, #ff2d55);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-current {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: rgba(255, 45, 85, 0.06);
    border: 1px dashed #f5b0c1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.result-current .prize-text {
    font-size: 28px;
    font-weight: bold;
    color: #e6335a;
    text-shadow: none;
}

.result-current .placeholder {
    color: #cba0aa;
    font-size: 16px;
}

.coupon-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coupon-code {
    font-size: 15px;
    color: #a03050;
    background: rgba(255, 45, 85, 0.08);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.copy-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.copy-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: #34c759;
    color: #fff;
}

.prize-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #fcd5df;
    box-shadow: 0 4px 15px rgba(255, 100, 130, 0.15);
}

.history-title {
    font-size: 14px;
    color: #c08090;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #fcd5df;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
}

.history-list::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-thumb {
    background: #f0c0cc;
    border-radius: 2px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 45, 85, 0.04);
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.history-item .num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 45, 85, 0.1);
    color: #e6335a;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-item .name {
    flex: 1;
    color: #5a2030;
}

.history-item .time {
    color: #c0a0a8;
    font-size: 12px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes resultPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

.prize-text.show {
    animation: resultPop 0.5s ease-out;
}

@media (max-width: 860px) {
    body {
        align-items: flex-start;
    }

    .wheel-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 40px 0 30px;
        width: 100%;
    }

    .wheel-wrapper {
        --scale: 0.78;
        --offset: calc((var(--scale) - 1) * 420px / 2);
        transform: scale(var(--scale));
        transform-origin: center center;
        margin: var(--offset) var(--offset);
    }

    .result-panel {
        width: calc(100vw - 40px);
        max-width: 380px;
        min-height: auto;
    }

    .center-btn {
        width: 70px;
        height: 70px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .wheel-container {
        padding: 35px 0 20px;
        gap: 16px;
    }

    .wheel-wrapper {
        --scale: 0.68;
    }

    .result-panel {
        width: calc(100vw - 30px);
        padding: 20px;
        border-radius: 16px;
    }

    .result-panel h2 {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .result-current .prize-text {
        font-size: 22px;
    }

    .prize-image {
        width: 100px;
        height: 100px;
    }

    .history-list {
        max-height: 180px;
    }
}

@media (max-width: 360px) {
    .wheel-wrapper {
        --scale: 0.6;
    }
}
