* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.input-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.name-input {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    resize: vertical;
    font-size: 16px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.draw-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="number"] {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    opacity: 0.9;
}

.primary-btn {
    background-color: #3498db;
    color: #fff;
    font-size: 16px;
    padding: 10px 20px;
}

#clearNames {
    background-color: #e74c3c;
    color: #fff;
}

.result-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.winner-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    min-height: 50px;
    position: relative;
}

.winner-list-empty {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: #999;
    font-size: 14px;
}

.winner {
    color: #333;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 200px;
    border-bottom: 1px solid #eee;
}

.winner.new {
    animation: popIn 0.5s ease;
}

.winner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.winner-number {
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.winner-name {
    font-size: 16px;
    font-weight: 500;
}

.winner .delete-btn {
    color: #999;
    font-size: 18px;
    padding: 0 8px;
    font-weight: bold;
    transition: color 0.3s;
}

.winner .delete-btn:hover {
    color: #e74c3c;
}

.history {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.secondary-btn {
    background-color: #95a5a6;
    color: #fff;
    font-size: 14px;
}

.history-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item span {
    color: #666;
    font-size: 14px;
}

.delete-record {
    background-color: transparent;
    color: #e74c3c;
    padding: 4px 8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
}

.history-item:hover .delete-record {
    opacity: 1;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
    color: #666;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.footer-bottom {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 14px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-record {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.footer-record img {
    height: 16px;
    margin-right: 5px;
    vertical-align: middle;
}

.footer-record a {
    color: #999;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.divider {
    color: #ddd;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    min-width: 300px;
}

.rolling-name {
    font-size: 24px;
    margin: 20px 0;
    min-height: 36px;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 设置按钮样式 */
.icon {
    margin-right: 5px;
}

/* 设置模态框样式 */
.settings-modal .modal-content {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
}

.setting-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-group label {
    min-width: 120px;
}

.setting-group input[type="number"] {
    width: 100px;
}

.icon-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    padding: 8px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.icon-btn:hover {
    opacity: 1;
}

.setting-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .draw-settings {
        flex-direction: column;
        gap: 10px;
    }

    .setting-item {
        width: 100%;
        justify-content: space-between;
    }

    .primary-btn {
        width: 100%;
    }

    .setting-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-group input[type="number"] {
        width: 100%;
    }

    .winner {
        min-width: 100%;
    }

    .winner-content {
        gap: 10px;
    }

    .winner-number {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .winner-name {
        font-size: 14px;
    }

    .footer-info {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links,
    .footer-record {
        flex-direction: column;
        gap: 10px;
    }

    .divider {
        display: none;
    }
} 