/* 全局样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif; line-height: 1.6; color: #333; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; } .container { max-width: 1400px; margin: 0 auto; background: white; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); padding: 30px; } /* 头部 */ header { text-align: center; margin-bottom: 40px; padding-bottom: 20px; border-bottom: 2px solid #f0f0f0; } header h1 { color: #667eea; font-size: 2.5em; margin-bottom: 10px; } .subtitle { color: #666; font-size: 1.1em; } /* 表单样式 */ .form-section { background: #f8f9fa; padding: 25px; border-radius: 8px; margin-bottom: 40px; } .form-section h2 { color: #333; margin-bottom: 20px; font-size: 1.5em; } .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #555; } .required { color: #e74c3c; } .form-group input[type="text"], .form-group input[type="url"], .form-group input[type="password"], .form-group textarea { width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 1em; transition: border-color 0.3s; } .form-group input:focus, .form-group textarea:focus { outline: none; border-color: #667eea; } .form-group input[type="file"] { padding: 8px; } .hint { display: block; margin-top: 5px; font-size: 0.9em; color: #888; } .char-count { text-align: right; color: #667eea; } /* 图片预览 */ .image-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; } .preview-item { position: relative; width: 100px; height: 100px; } .preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: 2px solid #ddd; } /* 按钮样式 */ .btn { padding: 12px 24px; border: none; border-radius: 6px; font-size: 1em; cursor: pointer; transition: all 0.3s; font-weight: 600; } .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); } .btn-secondary { background: #6c757d; color: white; } .btn-secondary:hover { background: #5a6268; } .btn-edit { background: #28a745; color: white; padding: 8px 16px; font-size: 0.9em; } .btn-edit:hover { background: #218838; } .btn-delete { background: #dc3545; color: white; padding: 8px 16px; font-size: 0.9em; margin-left: 5px; } .btn-delete:hover { background: #c82333; } /* 数据展示区 */ .data-section { margin-top: 40px; } .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .section-header h2 { color: #333; font-size: 1.5em; } /* 表格样式 */ .table-container { overflow-x: auto; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } table { width: 100%; border-collapse: collapse; background: white; } thead { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } th { padding: 15px 10px; text-align: left; font-weight: 600; white-space: nowrap; } th.sortable { cursor: pointer; user-select: none; transition: background 0.2s; } th.sortable:hover { background: rgba(255, 255, 255, 0.1); } .sort-icon { margin-left: 5px; font-size: 0.9em; color: rgba(255, 255, 255, 0.6); } .sort-icon.sort-asc, .sort-icon.sort-desc { color: #fff; font-weight: bold; } td { padding: 12px 10px; border-bottom: 1px solid #e9ecef; } tbody tr:hover { background: #f8f9fa; } .loading { text-align: center; padding: 40px; color: #999; font-style: italic; } /* 特殊单元格样式 */ .has-naga { color: #28a745; font-weight: 600; } .no-naga { color: #dc3545; font-weight: 600; } .link-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .link-cell a { color: #667eea; text-decoration: none; } .link-cell a:hover { text-decoration: underline; } .note-cell { max-width: 300px; white-space: pre-wrap; word-break: break-word; } /* 图片缩略图 */ .image-thumbs { display: flex; gap: 5px; flex-wrap: wrap; } .thumb-img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid #ddd; transition: transform 0.2s; } .thumb-img:hover { transform: scale(1.1); border-color: #667eea; } /* 模态框 */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.8); } .modal-content { background-color: #fefefe; margin: 5% auto; padding: 30px; border-radius: 12px; width: 90%; max-width: 800px; position: relative; animation: slideDown 0.3s; } @keyframes slideDown { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .close { position: absolute; right: 20px; top: 20px; color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; transition: color 0.3s; } .close:hover { color: #000; } .modal-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin-top: 20px; } .modal-images img { width: 100%; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); } /* 只读信息 */ .readonly-info { background: #f8f9fa; padding: 15px; border-radius: 6px; border-left: 4px solid #667eea; } .readonly-info p { margin: 5px 0; color: #555; } .readonly-info strong { color: #333; } /* 表单操作按钮组 */ .form-actions { display: flex; gap: 10px; margin-top: 20px; } /* 已上传图片展示 */ .existing-images { display: flex; gap: 10px; flex-wrap: wrap; } .existing-image-item { position: relative; width: 100px; height: 100px; } .existing-image-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: 2px solid #ddd; } .btn-remove-image { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #dc3545; color: white; border: 2px solid white; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; transition: background 0.2s; } .btn-remove-image:hover { background: #c82333; } .no-images { color: #999; font-style: italic; padding: 10px; } /* 认证区域 */ .auth-section { max-width: 400px; margin: 50px auto; background: #f8f9fa; padding: 30px; border-radius: 8px; text-align: center; } .auth-section h2 { margin-bottom: 20px; color: #333; } /* 响应式设计 */ @media (max-width: 768px) { .container { padding: 15px; } header h1 { font-size: 1.8em; } th, td { padding: 8px 5px; font-size: 0.9em; } .modal-content { width: 95%; padding: 20px; } .modal-images { grid-template-columns: 1fr; } }