/* 奖品管理页面样式 */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 20px;
    padding: 20px;
}

.header-section {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.header-section h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 600;
}

.subtitle {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 统计面板样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-icon.total { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.stat-icon.available {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.stat-icon.drawn {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.stat-icon.redeemed {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}
.stat-icon.redeemed { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.stat-icon.value { background: linear-gradient(135deg, #a8edea, #fed6e3); }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

/* 操作面板样式 */
.action-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-section {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 600px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.filter-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section label {
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
}

.filter-section select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #4a5568;
    font-size: 0.9rem;
    min-width: 120px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

/* 按钮样式 */
.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-info:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: #2d3748;
}

.btn-warning:hover {
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.4);
}

/* 奖品列表样式 */
.prizes-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.table-header {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.table-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.25rem;
}

.table-container {
    overflow-x: auto;
}

.prizes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.prizes-table th,
.prizes-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.prizes-table td {
    color: #2d3748;
    font-weight: 500;
}

.prizes-table td strong {
    color: #1a202c;
    font-weight: 600;
}

.prizes-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    position: sticky;
    top: 0;
}

.prizes-table tr:hover {
    background: #f7fafc;
}

/* 奖品图片样式 */
.prize-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.no-image {
    width: 60px;
    height: 60px;
    background: #f7fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
}

/* 状态标签样式 */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    display: inline-block;
}

.status-badge.available {
    background: #e6fffa;
    color: #00695c;
}

.status-badge.low-stock {
    background: #fff3e0;
    color: #ef6c00;
}

.status-badge.out-of-stock {
    background: #ffebee;
    color: #d32f2f;
}

.status-badge.inactive {
    background: #f5f5f5;
    color: #9e9e9e;
}

/* 积分标签样式 */
.points-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 数量标签样式 */
.total-badge {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(17, 153, 142, 0.3);
}

/* 库存为0时的样式，红色底，和非0库存区分 */
.total-badge.zero-stock {
    background: linear-gradient(135deg, #ff6b6b, #ff4d4d);
    box-shadow: 0 2px 4px rgba(255, 77, 77, 0.25);
}

/* 中奖概率标签样式 */
.weight-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* 操作按钮样式 */
.action-btn {
    padding: 0.4rem 0.8rem;
    margin: 0 0.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn.view { background: #e6f3ff; color: #0066cc; }
.action-btn.edit { background: #fff3e0; color: #ef6c00; }
.action-btn.delete { background: #ffebee; color: #d32f2f; }
.action-btn.history { background: #f3e5f5; color: #7b1fa2; }

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    background: #f7fafc;
}

.pagination button.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 8% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-content.large { max-width: 800px; }
.modal-content.small { max-width: 400px; }

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2d3748;
}

.close {
    color: #a0aec0;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* 选择计数样式 */
.selected-count {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    color: #4a5568;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        padding: 0 1rem;
    }
    
    .header-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .header-section h1 {
        font-size: 1.8rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
        text-align: center;
    }
    
    .action-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .search-section {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .search-input {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 16px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    .action-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-left: 0;
    }
    
    .action-buttons .btn {
        flex: 1;
        min-width: 120px;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
        text-align: center;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
    }
    
    .prizes-table {
        min-width: 700px;
        font-size: 0.8rem;
    }
    
    .prizes-table th,
    .prizes-table td {
        padding: 0.6rem 0.4rem;
        white-space: nowrap;
    }
    
    .prize-image {
        width: 40px;
        height: 40px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: center;
    }
    
    .pagination button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 40px;
        min-height: 40px;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer button {
        width: 100%;
        min-height: 44px;
        padding: 0.8rem 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.8rem;
        font-size: 16px;
        min-height: 44px;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 0.5rem;
    }
    
    .header-section {
        padding: 1rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .header-section h1 {
        font-size: 1.5rem;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.8rem;
    }
    
    .action-panel {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .action-buttons .btn {
        min-width: 100px;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .prizes-table {
        min-width: 600px;
        font-size: 0.7rem;
    }
    
    .prizes-table th,
    .prizes-table td {
        padding: 0.4rem 0.3rem;
    }
    
    .prize-image {
        width: 30px;
        height: 30px;
    }
    
    .pagination button {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        min-width: 36px;
        min-height: 36px;
    }
    
    .modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        width: calc(100% - 1rem);
        margin: 0.5rem;
        padding: 0.8rem;
    }
}

/* 加载和空状态样式 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: #718096;
}

.loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #718096;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message-success { background: linear-gradient(135deg, #11998e, #38ef7d); }
.message-error { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.message-warning { background: linear-gradient(135deg, #feca57, #ff9ff3); color: #2d3748; }
.message-info { background: linear-gradient(135deg, #667eea, #764ba2); }

/* 图片上传样式 */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
    overflow: hidden;
    position: relative;
}

.image-preview:hover {
    border-color: #007bff;
}

.image-preview.has-image {
    border-style: solid;
    border-color: #28a745;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.preview-placeholder {
    text-align: center;
    color: #666;
}

.preview-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.upload-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.upload-progress {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    transition: width 0.3s ease;
    width: 0%;
}

/* 谢谢惠顾配置样式 */
.checkbox-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.probability-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.probability-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.probability-info:last-child {
    margin-bottom: 0;
}

.probability-label {
    font-weight: 500;
    color: #495057;
}

.probability-value {
    font-weight: 700;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.probability-warning {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.probability-success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* 激活状态列布局 */
.activation-controls {
    padding: 8px;
}

.activation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.action-buttons {
    display: flex;
    gap: 4px;
}

/* 默认奖品标识 */
.default-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #d63031;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: bold;
}

/* 统计卡片图标颜色 */
.stat-icon.active {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.stat-icon.unredeemed {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* 禁用的按钮 */
.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #ccc;
}

