* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #ffeb3b;
}

h2 {
    font-size: 1.6rem;
    margin: 15px 0;
    color: #ffeb3b;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

/* 调整面板布局，确保抽奖区域有更多空间 */
.panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex: 1;
    min-width: 300px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
}

/* 调整左右面板比例 */
.panel:first-child {
    flex: 1; /* 抽奖面板占更大比例 */
    min-width: 400px;
}

.panel:last-child {
    flex: 1; /* 中奖名单面板占较小比例 */
    min-width: 300px;
}

.class-stats {
    visibility:hidden;
}

/* 确保抽奖区域能够扩展 */
.draw-section {
    text-align: center;
    margin-bottom: 25px;
    flex: 1; /* 允许抽奖区域扩展 */
    display: flex;
    flex-direction: column;
}

.result-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 30px 25px; /* 增加内边距 */
    margin: 20px 0;
    min-height: 350px; /* 增加最小高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* 增大抽奖结果显示字体 */
.winner-name {
    font-size: 4.5rem; /* 增大字体 */
    font-weight: bold;
    color: #ffeb3b;
    margin: 15px 0; /* 增加间距 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2; /* 调整行高 */
}

.winner-class {
    font-size: 3rem; /* 增大字体 */
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    line-height: 1.2; /* 调整行高 */
}

/* 调整按钮组位置 */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: auto; /* 将按钮推到底部 */
    padding-top: 20px;
}

button {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 调整等待抽奖提示的样式 */
.result-display > div:first-child {
    font-size: 3rem; /* 增大提示文字 */
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

/* 调整恭喜中奖提示的样式 */
.result-display > div:first-child:contains("恭喜") {
    font-size: 3rem;
    color: #ffeb3b;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #ff9800 0%, #ef6c00 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}


.btn-info {
    background: linear-gradient(135deg, #2196f3 0%, #0d47a1 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #0b7dda 0%, #002171 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 修改数据导入模块样式 */
.import-section {
    margin-bottom: 15px;
    text-align: center;
    height: auto; /* 改为自动高度 */
    min-height: 80px; /* 设置最小高度 */
}

.file-upload {
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 15px; /* 减小内边距 */
    text-align: center;
    margin-bottom: 10px;
    transition: all 0.3s;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    height: auto; /* 改为自动高度 */
    min-height: 100px; /* 设置最小高度 */
}

.file-upload:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.file-upload i {
    font-size: 2rem; /* 减小图标大小 */
    margin-bottom: 8px; /* 减小底部间距 */
    color: #ffeb3b;
}

.file-upload p {
    font-size: 0.9rem; /* 减小字体大小 */
    margin-bottom: 8px; /* 减小底部间距 */
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    padding: 8px 16px; /* 减小内边距 */
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-radius: 50px;
    cursor: pointer;
    margin: 8px auto; /* 减小外边距 */
    width: 80%;
    transition: all 0.3s;
    font-size: 0.85rem; /* 减小字体大小 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.file-label:hover {
    background: linear-gradient(135deg, #388e3c 0%, #1b5e20 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 10px 0; /* 减小外边距 */
    text-align: center;
}

.stat-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px; /* 减小内边距 */
    border-radius: 10px;
    width: 45%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-box div:first-child {
    font-size: 0.8rem; /* 减小标题字体大小 */
    margin-bottom: 5px; /* 减小底部间距 */
}

.stat-number {
    font-size: 1.5rem; /* 减小数字字体大小 */
    font-weight: bold;
    color: #ffeb3b;
}

/* 中奖名单样式优化 */
.winners-container {
    max-height: 1500px; /* 减小最大高度 */
    overflow-y: auto;
    margin-top: 10px; /* 减小顶部间距 */
}

.winners-grid {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 减小间隙 */
    padding: 5px;
}

.prize-section {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px; /* 减小内边距 */
    margin-bottom: 8px; /* 减小底部间距 */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prize-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px; /* 减小底部间距 */
    padding-bottom: 8px; /* 减小内边距 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.prize-title {
    display: flex;
    align-items: center;
    gap: 8px; /* 减小间隙 */
    font-size: 2rem; /* 减小字体大小 */
    font-weight: bold;
    color: #ffeb3b;
}

.prize-icon {
    font-size: 2rem; /* 减小图标大小 */
}

.prize-quota-display {
    font-size: 0.9rem; /* 减小字体大小 */
    color: #ffeb3b;
}

.winners-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.winner-tag {
    background: linear-gradient(135deg, #ffeb3b 0%, #fbc02d 100%);
    color: #d32f2f;
    padding: 5px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.winner-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.winner-tag-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: #b71c1c;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winner-tag-class {
    font-size: 0.9rem;
    color: #c62828;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-list {
    text-align: center;
    padding: 20px; /* 减小内边距 */
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    grid-column: 1 / -1;
    font-size: 0.9rem; /* 减小字体大小 */
}

.class-limit-info {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px; /* 减小内边距 */
    border-radius: 8px;
    margin-top: 8px; /* 减小顶部间距 */
    font-size: 0.8rem; /* 减小字体大小 */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.rolling {
    animation: roll 0.1s infinite;
}

@keyframes roll {
    0% { transform: translateY(5px); opacity: 0.8; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-5px); opacity: 0.9; }
}

.highlight {
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% {
        background: rgba(255, 235, 59, 0.4);
        transform: scale(1.05);
    }
    100% {
        background: rgba(0, 0, 0, 0.3);
        transform: scale(1);
    }
}

footer {
    margin-top: 20px; /* 减小顶部间距 */
    text-align: center;
    opacity: 0.8;
    font-size: 0.8rem; /* 减小字体大小 */
    color: rgba(255, 255, 255, 0.8);
}

.file-name {
    margin-top: 5px; /* 减小顶部间距 */
    font-size: 0.8rem; /* 减小字体大小 */
    color: rgba(255, 255, 255, 0.8);
}

.audio-control {
    margin-top: 12px; /* 减小顶部间距 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 减小间隙 */
}

.announcement-control {
    margin-top: 12px; /* 减小顶部间距 */
    padding: 8px; /* 减小内边距 */
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 减小间隙 */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speaker-icon {
    font-size: 1.3rem; /* 减小图标大小 */
    color: #ffeb3b;
}

/* 奖项设置样式 */
.prize-settings {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px; /* 减小内边距 */
    border-radius: 10px;
    margin-bottom: 12px; /* 减小底部间距 */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prize-settings h3 {
    font-size: 1.2rem; /* 减小字体大小 */
    margin-bottom: 8px; /* 减小底部间距 */
}

.prize-controls {
    display: flex;
    gap: 8px; /* 减小间隙 */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px; /* 减小底部间距 */
}

.prize-select {
    padding: 6px 12px; /* 减小内边距 */
    border-radius: 5px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem; /* 减小字体大小 */
    min-width: 100px; /* 减小最小宽度 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prize-quota {
    display: flex;
    align-items: center;
    gap: 4px; /* 减小间隙 */
    font-size: 0.8rem; /* 减小字体大小 */
}

.prize-quota input {
    width: 50px; /* 减小宽度 */
    padding: 4px; /* 减小内边距 */
    border-radius: 5px;
    border: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 0.8rem; /* 减小字体大小 */
}

.prize-quota span {
    font-weight: bold;
    color: #ffeb3b;
}

.prize-progress {
    width: 100%;
    height: 6px; /* 减小高度 */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-top: 4px; /* 减小顶部间距 */
    overflow: hidden;
}

.prize-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.export-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px; /* 减小顶部间距 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .result-display {
        min-height: 220px; /* 移动端适当减小高度 */
        padding: 20px;
    }

    .winner-name {
        font-size: 2.8rem;
    }

    .winner-class {
        font-size: 2rem;
    }

    .import-section {
        min-height: 100px;
    }

    .file-upload {
        min-height: 80px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .result-display {
        min-height: 200px;
        padding: 15px;
    }

    .winner-name {
        font-size: 2.2rem;
    }

    .winner-class {
        font-size: 1.6rem;
    }
}

/* 修改抽奖结果显示区域 */
.result-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 30px; /* 增加内边距 */
    margin: 20px 0;
    min-height: 380px; /* 增大最小高度 */
    height: auto; /* 改为自动高度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 100%; /* 确保宽度一致 */
}