/**
 * EKAY抽奖系统前台样式文件
 * 包含浮动图标、弹窗、动画等样式
 */

/* 抽奖浮动图标样式 */
.lottery-float-icon {
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 80px;
    height: 80px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.lottery-icon-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #feca57, #ff9ff3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    overflow: hidden;
}

.lottery-icon-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 2s linear infinite;
}

.lottery-pulse {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 107, 107, 0.6);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.lottery-float-icon:hover .lottery-icon-inner {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.6);
}

.lottery-icon-inner i {
    font-size: 24px;
    color: white;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lottery-icon-text {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #333;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lottery-float-icon:hover .lottery-icon-text {
    opacity: 1;
}

/* 抽奖弹窗样式 */
.lottery-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.lottery-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s ease-out;
}

.lottery-header {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    padding: 20px;
    text-align: center;
    position: relative;
}

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lottery-content {
    background: white;
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

/* 活动说明样式 */
.lottery-description {
    margin-bottom: 30px;
    text-align: center;
}

.lottery-description h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

.description-text p {
    color: #666;
    font-size: 16px;
    margin: 8px 0;
    line-height: 1.6;
}

/* 奖品展示样式 */
.prizes-display {
    margin-bottom: 30px;
}

.prizes-display h3 {
    text-align: center;
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

.prizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.prize-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.prize-item:hover {
    transform: translateY(-5px);
}

.prize-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.prize-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.prize-desc {
    font-size: 12px;
    opacity: 0.9;
}

/* 转盘样式 */
.lottery-wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.lottery-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.wheel-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: 30px solid #ff6b6b;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.lottery-btn {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lottery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.lottery-btn:active {
    transform: translateY(0);
}

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

/* 抽奖结果弹窗 */
.lottery-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(10px);
}

.result-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: bounceIn 0.6s ease-out;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.result-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.result-prize {
    font-size: 20px;
    color: #ff6b6b;
    margin-bottom: 20px;
    font-weight: bold;
}

.result-message {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.result-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* 抽奖通知 */
.lottery-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.lottery-notification.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.lottery-notification.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.lottery-notification.info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.lottery-notification.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

/* 抽奖特效 */
.lottery-fireworks {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    z-index: 10000;
    animation: fireworks 2s ease-out forwards;
    pointer-events: none;
}

.lottery-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 9999;
    pointer-events: none;
}

/* 加载动画 */
.lottery-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lottery-float-icon {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 15px;
    }
    
    .lottery-icon-inner i {
        font-size: 20px;
    }
    
    .lottery-modal-content {
        width: 95%;
        height: 95%;
        border-radius: 10px;
    }
    
    .lottery-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .lottery-fireworks {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .lottery-float-icon {
        width: 45px;
        height: 45px;
        bottom: 70px;
        right: 10px;
    }
    
    .lottery-icon-inner i {
        font-size: 18px;
    }
    
    .lottery-icon-text {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .lottery-modal-content {
        width: 98%;
        height: 98%;
        border-radius: 8px;
    }
    
    .lottery-modal-close {
        width: 25px;
        height: 25px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* 抽奖码输入区域 */
.code-input-section {
    text-align: center;
    margin-bottom: 30px;
}

.code-input-section h3 {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    max-width: 300px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.lottery-tips {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.lottery-tips p {
    margin: 5px 0;
}

/* 用户信息表单 */
.user-info-form {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
}

.user-info-form h3 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: #ff6b6b;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.privacy-notice {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 10px;
}

.privacy-notice p {
    color: #666;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

.privacy-notice i {
    color: #ff6b6b;
    margin-right: 5px;
}

/* 九宫格区域 */
.lottery-grid-section {
    display: none;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 轮盘抽奖样式 */
.lottery-wheel-section {
    text-align: center;
    padding: 20px;
}

.lottery-wheel-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.wheel {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-pointer {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 20px solid #fff;
    position: absolute;
    top: -25px;
}

.wheel-segments {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.wheel-segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    overflow: hidden;
}

.wheel-segment:nth-child(1) { background: #ff6b6b; transform: rotate(0deg); }
.wheel-segment:nth-child(2) { background: #4ecdc4; transform: rotate(45deg); }
.wheel-segment:nth-child(3) { background: #45b7d1; transform: rotate(90deg); }
.wheel-segment:nth-child(4) { background: #f9ca24; transform: rotate(135deg); }
.wheel-segment:nth-child(5) { background: #6c5ce7; transform: rotate(180deg); }
.wheel-segment:nth-child(6) { background: #a29bfe; transform: rotate(225deg); }
.wheel-segment:nth-child(7) { background: #fd79a8; transform: rotate(270deg); }
.wheel-segment:nth-child(8) { background: #00b894; transform: rotate(315deg); }

.wheel-segment-text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 20%;
    left: 0;
    transform: rotate(-22.5deg);
    font-size: 0.8em;
    line-height: 1.2;
}

.spin-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

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

.wheel-instructions {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.wheel-instructions p {
    margin: 5px 0;
}

@keyframes wheelSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.grid-item {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.grid-item:nth-child(1) { background: linear-gradient(135deg, #ff6b6b, #ee5a52); }
.grid-item:nth-child(2) { background: linear-gradient(135deg, #4ecdc4, #44a08d); }
.grid-item:nth-child(3) { background: linear-gradient(135deg, #45b7d1, #3498db); }
.grid-item:nth-child(4) { background: linear-gradient(135deg, #96ceb4, #85c1a3); }
.grid-item:nth-child(5) { background: linear-gradient(135deg, #feca57, #ff9ff3); }
.grid-item:nth-child(6) { background: linear-gradient(135deg, #ff9ff3, #f368e0); }
.grid-item:nth-child(7) { background: linear-gradient(135deg, #54a0ff, #2e86de); }
.grid-item:nth-child(8) { background: linear-gradient(135deg, #5f27cd, #341f97); }
.grid-item:nth-child(9) { background: linear-gradient(135deg, #00d2d3, #01a3a4); }

.grid-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.grid-item.selected {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    border: 3px solid #ffd700;
}

.grid-item.revealed {
    animation: revealPrize 0.6s ease-out;
}

.grid-cover {
    font-size: 36px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.grid-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.grid-item-emoji {
    font-size: 24px;
    margin-bottom: 5px;
}

.grid-item-text {
    font-size: 12px;
    line-height: 1.2;
}

.grid-instruction {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 500;
}

@keyframes revealPrize {
    0% {
        transform: scale(1.1) rotateY(0deg);
    }
    50% {
        transform: scale(1.2) rotateY(180deg);
    }
    100% {
        transform: scale(1.1) rotateY(360deg);
    }
}

/* 结果展示 */
.lottery-result {
    text-align: center;
    margin: 30px 0;
}

.result-content {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    margin-bottom: 20px;
    animation: bounceIn 0.8s ease-out;
}

.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease-out;
}

.result-text h2 {
    font-size: 28px;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.result-text p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

.result-prize {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.prize-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.prize-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.prize-info h4 {
    font-size: 20px;
    margin: 0;
}

.prize-info p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.result-actions {
    margin-top: 20px;
}

/* 通知样式 */
.lottery-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.lottery-notification.show {
    transform: translateX(0);
}

.notification-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-message {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.lottery-notification.success {
    border-left: 4px solid #4caf50;
}

.lottery-notification.error {
    border-left: 4px solid #f44336;
}

.lottery-notification.warning {
    border-left: 4px solid #ff9800;
}

.lottery-notification.info {
    border-left: 4px solid #2196f3;
}

/* 动画定义 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(1800deg);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .lottery-float-icon {
        width: 50px;
        height: 50px;
        right: 15px;
        bottom: 80px;
    }
    
    .lottery-float-icon .icon {
        font-size: 20px;
    }
    
    .lottery-float-icon .text {
        font-size: 10px;
    }
    
    .lottery-container {
        width: 95%;
        max-width: none;
        margin: 10px;
        padding: 20px;
    }
    
    .lottery-header h2 {
        font-size: 20px;
    }
    
    .lottery-wheel {
        width: 250px;
        height: 250px;
    }
    
    .wheel-item {
        font-size: 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 15px;
    }
    
    .result-content {
        padding: 30px 20px;
    }
    
    .result-icon {
        font-size: 60px;
    }
    
    .result-text h2 {
        font-size: 22px;
    }
    
    .lottery-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .lottery-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .lottery-container {
        padding: 15px;
    }
    
    .lottery-wheel {
        width: 200px;
        height: 200px;
    }
    
    .wheel-item {
        font-size: 12px;
    }
    
    .wheel-center {
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .input-group input {
        max-width: none;
        width: 100%;
    }
    
    .code-input-section h3 {
        font-size: 18px;
    }
    
    .result-content {
        padding: 25px 15px;
    }
    
    .result-icon {
        font-size: 50px;
    }
    
    .result-text h2 {
        font-size: 20px;
    }
    
    .prize-info img {
        width: 60px;
        height: 60px;
    }
}

/* 打印样式 */
@media print {
    .lottery-float-icon,
    .lottery-popup {
        display: none !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .lottery-float-icon {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .lottery-container {
        background: #fff;
        border: 2px solid #000;
    }
    
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .form-group input,
    .form-group textarea {
        border: 2px solid #000;
        background: #fff;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .lottery-float-icon,
    .lottery-wheel,
    .result-content,
    .lottery-notification {
        animation: none !important;
        transition: none !important;
    }
    
    .lottery-wheel.spinning {
        transform: rotate(360deg);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fireworks {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1.5);
        opacity: 0;
    }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes loadingSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 状态样式 */
.lottery-float-icon.success .lottery-icon-inner {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%) !important;
    animation: successPulse 0.6s ease-in-out;
}

.lottery-float-icon.error .lottery-icon-inner {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
    animation: errorShake 0.6s ease-in-out;
}

.lottery-float-icon.loading .lottery-icon-inner {
    animation: loadingSpin 1s linear infinite;
}

/* 主题变量 */
:root {
    --lottery-primary-color: #ff6b35;
    --lottery-secondary-color: #f7931e;
    --lottery-accent-color: #ffd23f;
    --lottery-success-color: #4caf50;
    --lottery-error-color: #f44336;
    --lottery-warning-color: #ff9800;
    --lottery-info-color: #2196f3;
    --lottery-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
    --lottery-border-radius: 15px;
    --lottery-transition: all 0.3s ease;
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
    .lottery-modal {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .lottery-modal-content {
        background: #1a1a1a;
        color: white;
    }
    
    .lottery-icon-text {
        background: rgba(255, 255, 255, 0.9);
        color: #333;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .lottery-float-icon {
        border: 2px solid #000;
    }
    
    .lottery-modal-close {
        border: 1px solid #fff;
    }
    
    .lottery-notification {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* 减少动画支持 */
@media (prefers-reduced-motion: reduce) {
    .lottery-float-icon,
    .lottery-icon-inner::before,
    .lottery-modal,
    .lottery-modal-content,
    .lottery-notification {
        animation: none;
    }
    
    .lottery-float-icon {
        transition: transform 0.1s ease;
    }
}

/* 打印样式 */
@media print {
    .lottery-float-icon,
    .lottery-modal,
    .lottery-notification {
        display: none !important;
    }
}