/* 年会抽奖系统 - 自定义样式 */

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(124, 58, 237, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7C3AED, #A78BFA);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #A78BFA, #7C3AED);
}

/* 选择文本样式 */
::selection {
    background: rgba(124, 58, 237, 0.4);
    color: white;
}

/* 粒子背景 */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #7C3AED, #F97316);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translate(20px, -30px) scale(1.2);
        opacity: 0.6;
    }

    50% {
        transform: translate(-10px, 20px) scale(0.8);
        opacity: 0.4;
    }

    75% {
        transform: translate(-30px, -10px) scale(1.1);
        opacity: 0.5;
    }
}

/* 老虎机滚动效果 */
.slot-spinning .slot-text {
    animation: slot-roll 0.1s linear infinite;
}

@keyframes slot-roll {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* 奖品卡片样式 */
.prize-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prize-card:hover {
    transform: translateX(8px);
}

.prize-card.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(167, 139, 250, 0.2));
    border-color: #7C3AED;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3), 0 0 40px rgba(124, 58, 237, 0.1);
}

.prize-card.special {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(249, 115, 22, 0.2));
    border-color: #FFD700;
}

.prize-card.first {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(249, 115, 22, 0.2));
    border-color: #FFD700;
}

.prize-card.second {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(156, 163, 175, 0.2));
    border-color: #C0C0C0;
}

.prize-card.third {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(180, 83, 9, 0.2));
    border-color: #CD7F32;
}

/* 中奖者卡片 */
.winner-card {
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* 彩带动画 */
.confetti {
    position: fixed;
    width: 10px;
    height: 20px;
    background: linear-gradient(135deg, var(--color1), var(--color2));
    animation: confetti-fall 3s ease-out forwards;
    border-radius: 2px;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* 按钮涟漪效果 */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out;
    pointer-events: none;
}

.btn-ripple:active::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 模态框动画 */
.modal-enter {
    animation: modal-enter 0.3s ease-out;
}

@keyframes modal-enter {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 脉冲发光效果 */
.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(124, 58, 237, 0.4),
            0 0 40px rgba(124, 58, 237, 0.2),
            0 0 60px rgba(124, 58, 237, 0.1);
    }

    50% {
        box-shadow: 0 0 40px rgba(124, 58, 237, 0.6),
            0 0 80px rgba(124, 58, 237, 0.4),
            0 0 120px rgba(124, 58, 237, 0.2);
    }
}

/* 输入框焦点样式 */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

/* 数字输入框隐藏箭头 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .slot-window {
        width: 80px !important;
        height: 100px !important;
    }

    .slot-text {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .slot-window {
        width: 60px !important;
        height: 80px !important;
    }

    .slot-text {
        font-size: 1.5rem !important;
    }
}

/* 减少动画（无障碍支持） */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 金色闪烁效果 */
.gold-shimmer {
    background: linear-gradient(90deg,
            #FFD700 0%,
            #FFF6B7 25%,
            #FFD700 50%,
            #FFF6B7 75%,
            #FFD700 100%);
    background-size: 200% 100%;
    animation: gold-shimmer 3s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gold-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* 抽奖进行中的边框动画 */
.lottery-active {
    border: 2px solid transparent;
    background-origin: border-box;
    background-clip: padding-box, border-box;
    animation: border-dance 1s linear infinite;
}

@keyframes border-dance {
    0% {
        border-color: #7C3AED;
    }

    33% {
        border-color: #F97316;
    }

    66% {
        border-color: #FFD700;
    }

    100% {
        border-color: #7C3AED;
    }
}

/* 星星装饰 */
.star-decoration {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #FFD700 0%, transparent 70%);
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* 倒计时动画 */
.countdown-pulse {
    animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* 烟花效果 */
.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: firework-burst 1.5s ease-out forwards;
}

@keyframes firework-burst {
    0% {
        opacity: 1;
        transform: scale(0);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.firework-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: firework-trail 0.8s ease-out forwards;
}

@keyframes firework-trail {
    0% {
        opacity: 1;
        transform: translate(0, 0);
    }

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty));
    }
}

/* 进度条样式 */
.prize-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.prize-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* 全屏模式 */
.fullscreen-mode {
    padding: 20px !important;
}

.fullscreen-mode header {
    position: static !important;
    margin: 0 0 20px 0 !important;
}

.fullscreen-mode main {
    padding-top: 0 !important;
}

/* 移动端优化 */
@media (max-width: 640px) {

    /* 导航栏按钮适配 */
    header nav {
        padding: 0.75rem 1rem !important;
        margin: 0.5rem !important;
    }

    /* 标题适配 */
    .text-5xl {
        font-size: 2rem !important;
    }

    /* 按钮组适配 */
    .flex.items-center.gap-2>button {
        padding: 0.5rem !important;
    }

    /* 统计数字适配 */
    .text-3xl {
        font-size: 1.5rem !important;
    }

    /* 设置弹窗适配 */
    .max-w-2xl {
        max-width: 100% !important;
    }

    /* 奖品卡片网格适配 */
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
}

/* 平板优化 */
@media (min-width: 641px) and (max-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr 2fr !important;
    }

    .slot-window {
        width: 100px !important;
        height: 120px !important;
    }
}

/* 大屏幕全屏优化 */
@media (min-width: 1920px) {
    .slot-window {
        width: 180px !important;
        height: 220px !important;
    }

    .slot-text {
        font-size: 5rem !important;
    }
}

/* 闪光特效 */
.flash-effect {
    animation: flash 0.3s ease-out;
}

@keyframes flash {
    0% {
        opacity: 0;
        background: white;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

/* 弹跳进入动画 */
.animate-bounce-in {
    animation: bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 金色文字效果 */
.text-gold {
    color: #FFD700 !important;
}