* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif; background: #f5f7fa; min-height: 100vh; }

/* 侧边栏 */
.sidebar { position: fixed; left: 0; top: 0; width: 220px; height: 100vh; background: #1a1a2e; color: #fff; z-index: 100; }
.logo { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo h2 { font-size: 18px; color: #10b981; display: flex; align-items: center; gap: 10px; }
.menu { padding: 20px 0; }
.menu-item { display: flex; align-items: center; padding: 15px 25px; color: #a0a0a0; cursor: pointer; transition: all 0.3s; border-left: 3px solid transparent; }
.menu-item:hover, .menu-item.active { background: rgba(16, 185, 129, 0.1); color: #10b981; border-left-color: #10b981; }
.menu-item i { font-size: 20px; margin-right: 12px; width: 24px; text-align: center; }

/* 主内容 */
.main-content { margin-left: 220px; min-height: 100vh; }
.header { background: #fff; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.header-title { font-size: 20px; font-weight: 500; color: #333; }
.header-right { display: flex; align-items: center; gap: 20px; }
.admin-info { display: flex; align-items: center; gap: 10px; color: #666; font-size: 14px; }
.admin-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #10b981 0%, #059669 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }
.logout-btn { color: #666; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.logout-btn:hover { color: #ef4444; }

.content { padding: 25px 30px 60px; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.stat-value { font-size: 32px; font-weight: 600; color: #10b981; margin-bottom: 8px; }
.stat-label { font-size: 14px; color: #888; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); margin-bottom: 20px; }
.card-header { padding: 20px 25px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.card-title { font-size: 16px; font-weight: 500; color: #333; }

/* 按钮 */
.btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: all 0.3s; }
.btn-primary { background: #10b981; color: white; }
.btn-primary:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* 搜索栏 */
.search-bar { display: flex; gap: 15px; padding: 20px 25px; border-bottom: 1px solid #f0f0f0; }
.search-input { flex: 1; padding: 10px 15px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; }
.search-input:focus { outline: none; border-color: #10b981; }
.select-filter { padding: 10px 15px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; min-width: 120px; }
.date-input { padding: 10px 15px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; min-width: 150px; }

/* 表格 */
.table-container { padding: 0 25px 25px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px 12px; font-size: 13px; font-weight: 500; color: #666; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
td { padding: 16px 12px; font-size: 14px; color: #333; border-bottom: 1px solid #f8f8f8; }
tr:hover td { background: #fafafa; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.status-active { background: #d1fae5; color: #059669; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-ended { background: #f3f4f6; color: #6b7280; }

/* 详情展示 */
.registration-detail .detail-section { margin-bottom: 20px; }
.registration-detail .detail-section h4 { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.registration-detail .detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.registration-detail .detail-item { font-size: 14px; color: #555; }
.registration-detail .detail-item .label { color: #888; }
.registration-detail .detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.registration-detail .detail-table th, .registration-detail .detail-table td { padding: 10px; text-align: left; border-bottom: 1px solid #eee; }
.registration-detail .detail-table th { background: #f9f9f9; color: #666; font-weight: 500; }
.action-btns { display: flex; gap: 8px; }
.btn-edit { padding: 6px 14px; border: 1px solid #e5e7eb; background: #fff; color: #374151; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-edit:hover { border-color: #10b981; color: #10b981; }
.btn-delete { padding: 6px 14px; border: 1px solid #ef4444; background: #ef4444; color: white; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-toggle { padding: 6px 14px; border: 1px solid #3b82f6; background: #3b82f6; color: white; border-radius: 6px; cursor: pointer; font-size: 13px; }
.btn-toggle:hover { border-color: #2563eb; background: #2563eb; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 20px; }
.page-btn { padding: 8px 16px; border: 1px solid #e5e7eb; background: #fff; border-radius: 6px; cursor: pointer; font-size: 14px; }
.page-btn:hover { border-color: #10b981; color: #10b981; }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-info { font-size: 14px; color: #666; }

/* 页面切换 */
.page-section { display: none; }
.page-section.active { display: block; }

/* 加载和空状态 */
.loading { display: flex; justify-content: center; align-items: center; padding: 50px; color: #999; }
.loading i { animation: spin 1s linear infinite; font-size: 24px; margin-right: 10px; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 60px; color: #999; }
.empty-state i { font-size: 48px; margin-bottom: 15px; color: #ddd; }

/* 模态框 */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 12px; width: 90%; max-width: 800px; max-height: 90vh; display: flex; flex-direction: column; }
.modal-header { padding: 20px 25px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.modal-title { font-size: 18px; font-weight: 500; }
.modal-close { font-size: 24px; color: #999; cursor: pointer; }
.modal-body { padding: 25px; overflow-y: auto; max-height: calc(90vh - 70px); }
.modal-footer { padding: 20px 25px; border-top: 1px solid #f0f0f0; flex-shrink: 0; }
.form-group { margin-bottom: 20px; }

/* 自定义弹窗样式 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-overlay.show { display: flex; animation: fadeIn 0.3s ease-out; }
.modal-container { background: #fff; border-radius: 16px; width: 90%; max-width: 450px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); overflow: hidden; animation: slideIn 0.3s ease-out; }
.modal-header { padding: 24px 24px 16px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.modal-header h3 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 28px; color: white; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background-color 0.2s; }
.modal-close:hover { background: rgba(255, 255, 255, 0.2); }
.modal-body { padding: 24px; }
.modal-body p { margin: 0 0 20px 0; font-size: 16px; line-height: 1.6; color: #333; }
.modal-footer { padding: 16px 24px 24px; display: flex; gap: 12px; justify-content: flex-end; }
.btn { padding: 12px 24px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; min-width: 80px; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }
.btn-secondary { background: #f5f5f5; color: #666; }
.btn-secondary:hover { background: #e0e0e0; transform: translateY(-1px); }

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

/* 状态图标 */
.status-icon { font-size: 48px; margin-bottom: 16px; text-align: center; }
.status-icon.up { color: #4CAF50; }
.status-icon.down { color: #f44336; }
.form-label { display: block; font-size: 14px; color: #666; margin-bottom: 8px; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 12px 15px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: #10b981; }
.form-textarea { min-height: 100px; resize: vertical; }

/* 图片上传样式 */
.image-upload-container { width: 100%; }
.upload-area { border: 2px dashed #d1d5db; border-radius: 8px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.3s ease; background-color: #f9fafb; }
.upload-area:hover { border-color: #10b981; background-color: #f0fdf4; }
.upload-area.dragover { border-color: #10b981; background-color: #dcfce7; }
.upload-content { color: #6b7280; }
.upload-icon { font-size: 48px; margin-bottom: 15px; color: #9ca3af; }
.upload-hint { font-size: 12px; color: #9ca3af; margin-top: 5px; }
.upload-info { font-size: 12px; color: #10b981; margin-top: 10px; font-weight: 500; }
.image-preview-container { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 15px; }
.image-preview { position: relative; width: 120px; height: 120px; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview .remove-btn { position: absolute; top: 5px; right: 5px; background: rgba(239, 68, 68, 0.8); color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.image-list-container { margin-top: 20px; }
.image-item { display: flex; align-items: center; padding: 10px; background: #f9fafb; border-radius: 6px; margin-bottom: 10px; }
.image-item img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; margin-right: 15px; }
.image-item-info { flex: 1; }
.image-item-name { font-size: 14px; font-weight: 500; color: #374151; }
.image-item-size { font-size: 12px; color: #6b7280; }
.image-item-actions { display: flex; gap: 10px; }
.image-item-actions button { padding: 6px 12px; border-radius: 4px; border: none; cursor: pointer; font-size: 12px; }
.btn-set-cover { background: #10b981; color: white; }
.btn-remove-image { background: #ef4444; color: white; }
.cover-badge { background: #10b981; color: white; padding: 2px 8px; border-radius: 12px; font-size: 12px; margin-left: 10px; }
.form-static { padding: 12px 15px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; display: inline-block; background: #f9fafb; }
.modal-footer { padding: 20px 25px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 10px; }
.btn-secondary { background: #f3f4f6; color: #666; }

/* 子项管理 */
.sub-items { margin-top: 10px; border: 1px solid #e5e7eb; border-radius: 8px; padding: 15px; background: #fafafa; }
.sub-item { display: flex; gap: 10px; margin-bottom: 10px; align-items: flex-start; }
.sub-item .form-input { flex: 1; margin-bottom: 0; }
.btn-icon { padding: 10px; border: none; background: #ef4444; color: white; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-icon:hover { background: #dc2626; }
.btn-add { background: #10b981; margin-top: 10px; }
.btn-add:hover { background: #059669; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* 非阻塞提示框样式 */
.toast { position: fixed; top: 20px; right: 20px; background: #4CAF50; color: white; padding: 16px 24px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 10000; opacity: 0; transform: translateX(100%); transition: all 0.3s ease-in-out; font-size: 14px; font-weight: 500; max-width: 300px; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.error { background: #f44336; }
.toast.warning { background: #ff9800; }
.toast.info { background: #2196F3; }

/* 难度星级评分 */
.star-rating { display: flex; align-items: center; gap: 4px; height: 38px; }
.star-rating .star { font-size: 24px; color: #ddd; cursor: pointer; transition: color 0.15s, transform 0.1s; line-height: 1; user-select: none; }
.star-rating .star.active { color: #f59e0b; }
.star-rating .star:hover { transform: scale(1.15); }

