/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #333333 100%); /* 黑白渐变 */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 700px;
    width: 90%;
    text-align: center;
}

.logo-container {
    margin-bottom: 15px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo {
    width: 100%;
    max-width: 520px;
    height: auto;
}

h1 {
    color: #000; /* 黑色标题 */
    margin-bottom: 20px;
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.config-section {
    margin: 20px 0;
    padding: 15px;
    background-color: #f0f0f0; /* 浅灰色背景 */
    border-radius: 10px;
    border: 1px solid #d6d6d6;
}

.config-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #000; /* 黑色文字 */
}

.file-label {
    display: inline-block;
    position: relative;
    overflow: hidden;
    background-color: #000; /* 黑色 */
    color: white; /* 白色文字，确保清晰可见 */
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border: none;
    font-family: inherit;
    font-weight: bold;
    text-align: center;
}

.file-label:hover {
    background-color: #333; /* 深灰色 */
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white !important; /* 强制白色文字 */
    font-weight: bold;
}

.info-panel {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background-color: #f0f0f0; /* 浅灰色背景 */
    border-radius: 10px;
    border: 1px solid #d6d6d6;
}

.info-panel p {
    font-size: 1.2em;
    font-weight: bold;
    color: #000; /* 黑色文字 */
}

.additional-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.current-people-list, .remaining-prizes-list {
    flex: 1;
    min-width: 250px;
    background-color: #f0f0f0; /* 浅灰色背景 */
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #d6d6d6;
}

.current-people-list h3, .remaining-prizes-list h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #000; /* 黑色标题 */
    text-align: center;
    font-weight: bold;
}

#currentPeopleList, #remainingPrizesList {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ccc; /* 灰色边框 */
    border-radius: 5px;
    margin: 0;
    background-color: white;
}

#currentPeopleList li, #remainingPrizesList li {
    padding: 5px;
    border-bottom: 1px solid #eee;
    text-align: center;
    color: #333;
}

#currentPeopleList li:last-child, #remainingPrizesList li:last-child {
    border-bottom: none;
}

.result-display {
    margin: 30px 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#resultArea {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f7f7; /* 浅灰色 */
    border: 2px dashed #999; /* 灰色虚线边框 */
    border-radius: 10px;
    overflow: hidden;
}

#resultText {
    font-size: 2em;
    font-weight: bold;
    color: #000; /* 黑色文字 */
    transition: all 0.1s ease;
}

/* 动画效果 */
.spinning {
    animation: spin 0.1s infinite;
}

@keyframes spin {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.winner {
    color: #000 !important; /* 黑色中奖颜色 */
    font-size: 2.5em !important;
    animation: celebrate 1s ease;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1); }
}

.controls {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

#startBtn {
    background-color: #000; /* 黑色 */
    color: white;
    border: none;
    flex: 1;
    max-width: 200px;
}

#startBtn:hover:not(:disabled) {
    background-color: #333; /* 深灰色 */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

#resetBtn {
    background-color: white; /* 白色 */
    color: black; /* 黑色文字 */
    border: 2px solid #000; /* 黑色边框 */
    flex: 1;
    max-width: 200px;
}

#resetBtn:hover:not(:disabled) {
    background-color: #f0f0f0; /* 浅灰色 */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.admin-link button {
    background-color: white; /* 白色 */
    color: black; /* 黑色文字 */
    border: 2px solid #000; /* 黑色边框 */
    text-decoration: none;
    flex: 1;
    max-width: 200px;
    display: inline-block;
    text-align: center;
    padding: 15px 20px;
}

.admin-link button:hover {
    background-color: #f0f0f0; /* 浅灰色 */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

button:disabled {
    background-color: #000; /* 黑色 */
    color: white; /* 白色文字 */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6; /* 降低透明度表示禁用状态 */
}

.history {
    margin-top: 30px;
    text-align: left;
}

.history h3 {
    color: #000; /* 黑色标题 */
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}

#historyList {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc; /* 灰色边框 */
    border-radius: 5px;
    padding: 10px;
    background-color: #f7f7f7; /* 浅灰色背景 */
}

#historyList li {
    padding: 8px;
    border-bottom: 1px solid #eee; /* 浅灰色分割线 */
    display: flex;
    justify-content: space-between;
}

#historyList li:last-child {
    border-bottom: none;
}

.winner-item {
    color: #000; /* 黑色 */
    font-weight: bold;
}

.prize-item {
    color: #333; /* 深灰色 */
    font-weight: bold;
}

.admin-link {
    margin: 20px 0;
    text-align: center;
}

.admin-link a {
    background-color: #000; /* 黑色背景 */
    color: white; /* 白色文字 */
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 20px;
    border: none; /* 移除边框 */
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.admin-link a:hover {
    background-color: #333; /* 深灰色 */
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
    }

    .logo {
        max-width: 320px;
    }

    h1 {
        font-size: 2em;
    }

    #resultText {
        font-size: 1.5em;
    }

    button {
        padding: 12px 20px;
        font-size: 16px;
        margin: 5px;
        display: block;
        width: 100%;
    }

    .info-panel {
        flex-direction: column;
        gap: 10px;
    }

    .additional-info {
        flex-direction: column;
    }

    .current-people-list, .remaining-prizes-list {
        min-width: auto;
    }

    .admin-link a {
        display: block;
        margin: 10px 0;
    }
}