/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 抽奖页面样式 */
.lottery-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.lottery-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.lottery-header h1 {
    font-size: 28px;
    color: #333;
    font-weight: bold;
}

.lottery-main {
    display: flex;
    gap: 30px;
}

.lottery-left {
    flex: 1;
    min-width: 400px;
}

.lottery-right {
    width: 270px;
    max-width: 350px;
}

.lottery-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lottery-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.lottery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lottery-list-item {
    background-color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lottery-list-item:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.prize-settings {
    margin-bottom: 20px;
}

.prize-item {
    margin-bottom: 15px;
}

.prize-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.prize-radio {
    margin-right: 5px;
}

.prize-name {
    font-weight: bold;
}

.prize-count {
    color: #666;
    font-size: 14px;
}

.lottery-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.start-btn, .stop-btn, .reset-btn, .toggle-view-btn {
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
    max-width: 120px;
    height: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-btn {
    background-color: #4CAF50;
    color: white;
}

.start-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.stop-btn {
    background-color: #f44336;
    color: white;
}

.stop-btn:hover:not(:disabled) {
    background-color: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.stop-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.reset-btn {
    background-color: #ff9800;
    color: white;
}

.reset-btn:hover {
    background-color: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-view-btn {
    background-color: #2196F3;
    color: white;
}

.toggle-view-btn:hover {
    background-color: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.lottery-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.winner-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.winner-category {
    margin-bottom: 15px;
}

.winner-category h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.winner-names {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.winner-item {
    background-color: #4CAF50;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.winner-item:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.lottery-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.admin-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-link:hover {
    background-color: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 管理页面样式 */
.admin-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.admin-header h1 {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.admin-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-section h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.prizes-container {
    margin-bottom: 20px;
}

.prize-form {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 15px;
    position: relative;
}

.prize-form h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.prize-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.prize-form-col {
    flex: 1;
}

.remove-prize-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-prize-btn:hover {
    background-color: #da190b;
    transform: scale(1.1);
}

.add-prize-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-prize-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.save-btn, .preview-btn, .back-link {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
}

.save-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.preview-btn {
    background-color: #2196F3;
    color: white;
}

.preview-btn:hover {
    background-color: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-link {
    background-color: #9e9e9e;
    color: white;
}

.back-link:hover {
    background-color: #757575;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.winner-item {
    animation: pulse 0.5s ease-in-out;
}

.lottery-list-item.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* 响应式设计 - 仅调整内边距和字体大小 */
@media (max-width: 768px) {
    .lottery-container {
        padding: 10px;
    }
    
    .lottery-header h1 {
        font-size: 24px;
    }
    
    .lottery-section {
        padding: 15px;
    }
    
    .admin-container {
        padding: 10px;
    }
    
    .admin-section {
        padding: 15px;
    }
    
    .prize-form-row {
        flex-direction: column;
    }
    
    .admin-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .save-btn, .preview-btn, .back-link {
        text-align: center;
    }
}

/* 竖屏视图样式 */
.lottery-main.vertical-view {
    flex-direction: column;
}

.lottery-main.vertical-view .lottery-left {
    order: 0;
}

.lottery-main.vertical-view .lottery-right {
    order: 1;
}