/* 多奖项随机抽取系统的CSS样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

main {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 30px;
}

.display-container {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 40px 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.display-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
}

#name-display {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

#name-display.highlight {
    animation: pulse 0.5s ease-in-out 4;
    transform: scale(1.1);
}

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

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 音频控制按钮样式 */
.audio-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.audio-btn {
    background-color: #6c5ce7;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
}

.audio-btn:hover {
    background-color: #5f3dc4;
}

.audio-btn.active {
    background-color: #00b894;
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.5);
}

/* 中奖动画效果 */
.win-animation {
    animation: winPulse 0.5s ease-in-out 4 alternate;
    text-shadow: 0 0 20px #ff6b6b, 0 0 40px #ff6b6b, 0 0 60px #ff6b6b;
    color: #fff;
}

@keyframes winPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

/* 奖池滚动动画效果 */
.pool-animation {
    animation: poolFloat 2s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(75, 192, 192, 0.7);
}

@keyframes poolFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(0) rotate(-1deg);
    }
    75% {
        transform: translateY(5px) rotate(1deg);
    }
}

/* 粒子效果样式 */
.particle {
    pointer-events: none;
    filter: blur(1px);
    animation: particleGlow 0.5s ease-in-out infinite alternate;
}

@keyframes particleGlow {
    0% {
        box-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
    }
    100% {
        box-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
    }
}

/* 粒子容器 */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.start-btn {
    background-color: #27ae60;
    color: white;
}

.start-btn:hover:not(:disabled) {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.reset-btn {
    background-color: #f39c12;
    color: white;
}

.reset-btn:hover:not(:disabled) {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stop-btn {
    background-color: #e74c3c;
    color: white;
}

.stop-btn:hover:not(:disabled) {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 奖项展示区域样式 */
.prize-display {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 30px 0;
    margin-bottom: 30px;
}

.prize-display h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.8rem;
    text-align: center;
}

.prize-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.prize-item {
    text-align: center;
    border-radius: 10px;
    padding: 25px 30px;
    min-width: 200px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.prize-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
}

.prize-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.winner-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    padding: 10px;
    background-color: rgba(0,0,0,0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* 特等奖样式 */
.special-prize {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 3px solid #FFD700;
}

/* 一等奖样式 */
.first-prize {
    background: linear-gradient(135deg, #C0C0C0 0%, #A9A9A9 100%);
    border: 3px solid #C0C0C0;
}

.name-management {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.name-management h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.8rem;
}

.add-name {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#name-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

#name-input:focus {
    outline: none;
    border-color: #667eea;
}

.add-btn {
    background-color: #3498db;
    color: white;
}

.add-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.import-btn {
    background-color: #9b59b6;
    color: white;
    margin-top: 10px;
    cursor: pointer;
    display: inline-block;
}

.import-btn:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.import-file {
    margin-bottom: 20px;
}

#import-file {
    display: none;
}

#import-info {
    margin-left: 10px;
    font-size: 0.9rem;
    color: #666;
}

.name-list-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.4rem;
}

#name-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

#name-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

#name-list li:hover {
    background-color: #e9ecef;
}

.delete-btn {
    padding: 6px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    #name-display {
        font-size: 2.2rem;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .add-name {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    /* 响应式奖项展示 */
    .prize-row {
        flex-direction: column;
        align-items: center;
    }
    
    .prize-item {
        width: 100%;
        max-width: 300px;
        margin-bottom: 15px;
    }
    
    .prize-row:last-child .prize-item:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    #name-display {
        font-size: 1.8rem;
    }
    
    .display-container {
        padding: 30px 15px;
    }
}