/* 抽奖轮盘样式 */
.spin-wheel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spin-wheel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spin-wheel-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    position: relative;
    display: flex;
    gap: 30px;
    align-items: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.spin-wheel-overlay.active .spin-wheel-container {
    transform: translateX(0);
}

.spin-wheel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 32px;
    line-height: 1;
    color: #333;
    transition: transform 0.2s ease;
    padding: 0;
    z-index: 10;
}

.spin-wheel-close:hover {
    transform: rotate(90deg);
    color: #000;
}

.spin-wheel-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spin-wheel-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
}

.spin-wheel-canvas-container {
    width: 100%;
    height: 100%;
}

.spin-wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.spin-wheel-pointer {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: auto;
    z-index: 10;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.spin-wheel-pointer svg {
    width: 100%;
    height: auto;
    display: block;
}

.spin-wheel-center-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #f44336);
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
    z-index: 5;
}

.spin-wheel-center-button:hover:not(.disabled):not([data-disabled="true"]) {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.spin-wheel-center-button.disabled,
.spin-wheel-center-button[data-disabled="true"] {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.spin-wheel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spin-wheel-title {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.spin-wheel-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.spin-wheel-email-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spin-wheel-email-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.spin-wheel-email-input:focus {
    outline: none;
    border-color: #ff6b35;
}

.spin-wheel-email-input.invalid {
    border-color: #f44336;
}

.spin-wheel-email-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.spin-wheel-spin-button {
    width: 100%;
    padding: 16px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spin-wheel-spin-button:hover:not(:disabled) {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.spin-wheel-spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.spin-wheel-disclaimer {
    font-size: 11px;
    color: #999;
    text-align: center;
    line-height: 1.5;
}

/* 侧边标签 */
.spin-wheel-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #b43304, #0f0303);
    color: white;
    padding: 12px 4px;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: -3px 3px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 2px;
}

.spin-wheel-tab:hover {
    transform: translateY(-50%) translateX(-5px);
    box-shadow: -5px 5px 20px rgba(255, 107, 53, 0.4);
}

.spin-wheel-tab.hidden {
    display: none;
}

/* 结果弹窗 */
.spin-wheel-result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.spin-wheel-result-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spin-wheel-result-content {
    background: white;
    border-radius: 20px;
    padding: 50px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.spin-wheel-result-overlay.active .spin-wheel-result-content {
    transform: scale(1);
}

.spin-wheel-result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.spin-wheel-result-title {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
}

.spin-wheel-result-prize {
    font-size: 42px;
    font-weight: bold;
    color: #ff6b35;
    margin: 20px 0;
}

.spin-wheel-result-code {
    background: #f5f5f5;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
    letter-spacing: 2px;
    border: 2px dashed #ff6b35;
}

.spin-wheel-result-description {
    font-size: 14px;
    color: #666;
    margin: 15px 0 25px 0;
}

.spin-wheel-result-button {
    width: 100%;
    padding: 16px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spin-wheel-result-button:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .spin-wheel-container {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
    }

    .spin-wheel-wrapper {
        width: 280px;
        height: 280px;
    }

    .spin-wheel-center-button {
        width: 65px;
        height: 65px;
        font-size: 12px;
    }

    .spin-wheel-title {
        font-size: 24px;
    }

    .spin-wheel-tab {
        font-size: 14px;
        padding: 15px 10px;
    }

    .spin-wheel-result-content {
        padding: 30px 20px;
    }

    .spin-wheel-result-prize {
        font-size: 32px;
    }

    .spin-wheel-result-code {
        font-size: 18px;
        padding: 12px 20px;
    }
}

/* 旋转动画 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spin-wheel-canvas.spinning {
    animation: spin linear;
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.spin-wheel-center-button.ready {
    animation: pulse 1.5s ease-in-out infinite;
}
