* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(ellipse at center, #0c0c0c 0%, #1a1a2e 20%, #16213e 40%, #0f3460 70%, #e94560 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* 时光隧道背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(79, 172, 254, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(250, 112, 154, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(67, 233, 123, 0.1) 0%, transparent 50%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(79, 172, 254, 0.05) 25%, rgba(79, 172, 254, 0.05) 26%, transparent 27%, transparent 74%, rgba(79, 172, 254, 0.05) 75%, rgba(79, 172, 254, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(79, 172, 254, 0.05) 25%, rgba(79, 172, 254, 0.05) 26%, transparent 27%, transparent 74%, rgba(79, 172, 254, 0.05) 75%, rgba(79, 172, 254, 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    z-index: -2;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 时光隧道光线效果 */
.tunnel-light {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 200vw;
    height: 200vh;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(79, 172, 254, 0.1) 10deg, transparent 20deg, transparent 340deg, rgba(79, 172, 254, 0.1) 350deg, transparent 360deg);
    transform: translate(-50%, -50%) rotate(0deg);
    z-index: -1;
    animation: tunnelRotate 30s linear infinite;
}

@keyframes tunnelRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(79, 172, 254, 0.3);
    border-radius: 20px;
    box-shadow: 
        0 0 30px rgba(79, 172, 254, 0.2),
        inset 0 0 30px rgba(79, 172, 254, 0.05);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

header {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2) 0%, rgba(0, 242, 254, 0.2) 100%);
    color: #00f2fe;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(79, 172, 254, 0.3);
    box-shadow: 0 2px 20px rgba(79, 172, 254, 0.2);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 
        0 0 10px rgba(79, 172, 254, 0.8),
        0 0 20px rgba(79, 172, 254, 0.4);
    letter-spacing: 2px;
}

main {
    padding: 30px;
}

section {
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(22, 33, 62, 0.7);
    border: 1px solid rgba(79, 172, 254, 0.2);
    border-radius: 15px;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(79, 172, 254, 0.1);
    transition: all 0.3s ease;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 10px 25px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.4);
}

section h2 {
    color: #4facfe;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
    letter-spacing: 1px;
}

/* 上传区域 */
.upload-area {
    text-align: center;
    padding: 30px;
    background: rgba(22, 33, 62, 0.8);
    border: 2px dashed rgba(79, 172, 254, 0.5);
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 30px rgba(79, 172, 254, 0.1);
}

.upload-area:hover {
    border-color: #00f2fe;
    background: rgba(79, 172, 254, 0.1);
    box-shadow: 
        inset 0 0 50px rgba(79, 172, 254, 0.2),
        0 0 30px rgba(79, 172, 254, 0.3);
}

#excelFile {
    display: none;
}

.upload-btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.8) 0%, rgba(0, 242, 254, 0.8) 100%);
    color: white;
    border: 1px solid rgba(79, 172, 254, 0.5);
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(79, 172, 254, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.upload-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(79, 172, 254, 1) 0%, rgba(0, 242, 254, 1) 100%);
    box-shadow: 
        0 8px 20px rgba(79, 172, 254, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

#fileInfo {
    margin-top: 15px;
    color: #00f2fe;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
}

/* 设置区域 */
.settings {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    font-weight: 600;
    color: #00f2fe;
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
}

.setting-item input,
.setting-item select {
    padding: 10px 15px;
    background: rgba(22, 33, 62, 0.8);
    border: 2px solid rgba(79, 172, 254, 0.5);
    border-radius: 10px;
    font-size: 16px;
    color: #00f2fe;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(79, 172, 254, 0.2);
    cursor: pointer;
}

.setting-item input {
    width: 100px;
}

.setting-item select {
    width: 120px;
}

.setting-item input:focus,
.setting-item select:focus {
    outline: none;
    border-color: #00f2fe;
    box-shadow: 
        inset 0 0 15px rgba(0, 242, 254, 0.4),
        0 0 20px rgba(0, 242, 254, 0.3);
}

.setting-item select option {
    background: #16213e;
    color: #00f2fe;
    border: none;
    padding: 10px;
}

.setting-item select option:hover {
    background: #0f3460;
}

/* 按钮样式 */
.btn {
    padding: 12px 25px;
    border: 1px solid rgba(79, 172, 254, 0.5);
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    color: white;
    border-color: rgba(102, 126, 234, 0.5);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
    box-shadow: 
        0 8px 20px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.8) 0%, rgba(238, 90, 36, 0.8) 100%);
    color: white;
    border-color: rgba(255, 107, 107, 0.5);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    position: relative;
    z-index: 20; /* 确保按钮在时光隧道上方 */
}

.btn-danger:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 107, 107, 1) 0%, rgba(238, 90, 36, 1) 100%);
    box-shadow: 
        0 8px 20px rgba(255, 107, 107, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 词云区域 */
.wordcloud-section {
    background: rgba(22, 33, 62, 0.8);
    display: none;
    visibility: hidden;

}

.wordcloud {
    width: 100%;
    height: 400px;
    background: radial-gradient(circle at center, rgba(22, 33, 62, 0.9) 0%, rgba(15, 52, 96, 0.9) 100%);
    border-radius: 10px;
    border: 1px solid rgba(79, 172, 254, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.wordcloud::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, rgba(79, 172, 254, 0.1) 49%, rgba(79, 172, 254, 0.1) 51%, transparent 52%);
    background-size: 20px 20px;
    animation: wordcloudGrid 10s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes wordcloudGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* 结果区域 */
.result-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.winner-display, .history-display {
    background: rgba(22, 33, 62, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(79, 172, 254, 0.3);
    box-shadow: inset 0 0 20px rgba(79, 172, 254, 0.1);
}

.winner-display h3, .history-display h3 {
    color: #00f2fe;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    text-align: center;
}

.winners {
    min-height: 150px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

/* 科幻圆圈中奖者样式 */
.winner-item {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.05) 70%, transparent 100%);
    border-radius: 50%;
    margin: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #00f2fe;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    animation: winnerAppear 0.8s ease-out;
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.8);
}

.winner-item::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #4facfe, #00f2fe, #43e97b, #38f9d7);
    border-radius: 50%;
    z-index: -1;
    animation: winnerGlow 2s ease-in-out infinite;
}

.winner-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: rgba(22, 33, 62, 0.9);
    border-radius: 50%;
    z-index: -1;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.winners.history .winner-item {
    color: #fa709a;
    text-shadow: 0 0 5px rgba(250, 112, 154, 0.8);
}

.winners.history .winner-item::before {
    background: linear-gradient(45deg, #fa709a, #fee140, #fa709a, #fee140);
}

@keyframes winnerAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2) rotate(180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
}

@keyframes winnerGlow {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
        filter: blur(5px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
        filter: blur(8px);
    }
}

/* 人员池信息 */
.pool-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.pool-info p {
    background: rgba(22, 33, 62, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #00f2fe;
    border: 1px solid rgba(79, 172, 254, 0.3);
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(79, 172, 254, 0.1);
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
}

.pool-info p:hover {
    border-color: #00f2fe;
    transform: translateY(-2px);
    box-shadow: 
        0 10px 25px rgba(79, 172, 254, 0.3),
        inset 0 1px 0 rgba(79, 172, 254, 0.2);
}

.pool-info span {
    display: block;
    font-size: 2.5rem;
    color: #00f2fe;
    margin-top: 5px;
    text-shadow: 
        0 0 10px rgba(0, 242, 254, 0.8),
        0 0 20px rgba(0, 242, 254, 0.5);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.9) 0%, rgba(15, 52, 96, 0.95) 100%);
    backdrop-filter: blur(10px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(22, 33, 62, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 0 50px rgba(79, 172, 254, 0.5),
        inset 0 0 50px rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.5);
    max-width: 80%;
    width: 80%;
    position: relative;
    overflow: hidden;
    perspective: 1000px; /* 添加3D透视效果 */
}

/* 时光隧道效果样式 */
.tunnel-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none; /* 不影响点击事件 */
    overflow: hidden;
    z-index: 0; /* 位于主抽奖动画下方 */
    perspective: 1000px;
}

.tunnel-name {
    position: absolute;
    color: rgba(0, 242, 254, 0.8);
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    white-space: nowrap;
    animation: tunnelMove linear infinite;
    opacity: 0.8;
    transform-style: preserve-3d;
}

/* 时光隧道动画 */
@keyframes tunnelMove {
    0% {
        transform: translateZ(-1000px) translateX(0) translateY(0) rotateY(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateZ(1000px) translateX(0) translateY(0) rotateY(360deg);
        opacity: 0;
    }
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #4facfe, #00f2fe, #43e97b, #38f9d7, #fa709a, #fee140);
    border-radius: 25px;
    z-index: -1;
    animation: modalGlow 3s ease-in-out infinite;
}

@keyframes modalGlow {
    0%, 100% { opacity: 0.7; filter: blur(10px); }
    50% { opacity: 1; filter: blur(15px); }
}

.lottery-animation {
    font-size: 12rem;
    font-weight: 700;
    color: #0c2440;
    margin-bottom: 30px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 
        0 0 20px rgba(0, 242, 254, 0.8),
        0 0 40px rgba(0, 242, 254, 0.5),
        0 0 60px rgba(0, 242, 254, 0.3);
    animation: lotterySpin 0.1s infinite;
    /* 移除可能导致中文乱码的background-clip属性 */
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', sans-serif;
    /* 确保使用支持中文的字体 */
    letter-spacing: 2px;
    /* 增加字间距，使中文显示更清晰 */
    position: relative;
    z-index: 10; /* 确保主抽奖动画在时光隧道上方 */
}

@keyframes lotterySpin {
    0% { 
        opacity: 0.7;
        transform: scale(0.95);
        filter: blur(2px);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .result-container {
        grid-template-columns: 1fr;
    }
    
    .settings {
        flex-direction: column;
        align-items: stretch;
    }
    
    .setting-item {
        justify-content: center;
    }
    
    .wordcloud {
        height: 300px;
    }
    
    .lottery-animation {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 15px;
    }
    
    .upload-area {
        padding: 20px;
    }
}