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

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    padding: 30px;
    gap: 30px;
}

.qr-section, .participants-section {
    flex: 1;
    min-width: 300px;
}

.qr-section h2, .participants-section h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.qr-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    border: 3px dashed #dee2e6;
}

.qr-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.loading {
    padding: 50px;
    color: #6c757d;
}

.instructions {
    background: #e8f4fd;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.instructions h3 {
    color: #0d6efd;
    margin-bottom: 15px;
}

.instructions ol {
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.participants-list {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #0d6efd;
}

.user-info h4 {
    color: #333;
    margin-bottom: 5px;
}

.user-info p {
    color: #6c757d;
    font-size: 0.9em;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3em;
    margin-bottom: 20px;
    color: #adb5bd;
}

.admin-section {
    background: #f8f9fa;
    padding: 30px;
    border-top: 2px solid #dee2e6;
}

.admin-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: #0d6efd;
    color: white;
}

.btn-success {
    background: #198754;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-info {
    background: #0dcaf0;
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.stats {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-flex;
    gap: 30px;
}

.lottery-controls {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 30px;
}

.control-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.control-group input, .control-group select {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1em;
}

.prize-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
}

.winner-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-top: 5px solid #0d6efd;
}

.winner-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid #ffc107;
}

.winner-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.winner-prize {
    color: #198754;
    font-weight: bold;
}

.export-section {
    padding: 30px;
    text-align: center;
    border-top: 2px solid #dee2e6;
}

.footer {
    background: #343a40;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .admin-controls {
        justify-content: center;
    }
    
    .winners-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-item, .winner-card {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动条样式 */
.participants-list::-webkit-scrollbar {
    width: 8px;
}

.participants-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.participants-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.participants-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}