/* ========== 基础样式 ========== */ .book-form-container { padding: 30px; max-width: 1400px; margin: 0 auto; background-color: #f8f9fa; border-radius: 10px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); } /* ========== 页头样式 ========== */ .page-header-wrapper { margin-bottom: 30px; background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 100%); border-radius: 8px; padding: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); } .page-header { display: flex; justify-content: space-between; align-items: center; } .header-title-section { display: flex; flex-direction: column; } .page-title { font-size: 28px; font-weight: 700; color: #2c3e50; margin: 0; display: flex; align-items: center; } .page-title i { margin-right: 12px; color: #3498db; font-size: 24px; } .subtitle { margin: 5px 0 0 0; color: #7f8c8d; font-size: 16px; } .header-actions { display: flex; align-items: center; gap: 20px; } .btn-icon-text { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 6px; font-weight: 500; transition: all 0.3s ease; } .btn-icon-text i { font-size: 14px; } /* 进度条样式 */ .form-progress { min-width: 180px; } .progress { height: 8px; border-radius: 4px; background-color: #e9ecef; margin-bottom: 5px; overflow: hidden; } .progress-bar { background: linear-gradient(45deg, #3498db, #2ecc71); transition: width 0.5s ease; } .progress-text { font-size: 12px; color: #6c757d; text-align: right; display: block; } /* ========== 表单卡片样式 ========== */ .form-card { margin-bottom: 25px; border: none; border-radius: 10px; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05); background-color: #ffffff; transition: all 0.3s ease; overflow: hidden; } .form-card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); transform: translateY(-2px); } .card-header { padding: 16px 20px; background: linear-gradient(90deg, rgba(248,249,250,1) 0%, rgba(255,255,255,1) 100%); border-bottom: 1px solid #edf2f7; display: flex; align-items: center; } .card-header-icon { width: 32px; height: 32px; border-radius: 8px; background-color: rgba(52, 152, 219, 0.1); display: flex; align-items: center; justify-content: center; margin-right: 12px; } .card-header-icon i { color: #3498db; font-size: 16px; } .card-header-title { font-weight: 600; color: #2c3e50; font-size: 16px; } .card-body { padding: 25px; } .form-section { padding: 0; } /* ========== 表单元素样式 ========== */ .form-label { font-weight: 500; color: #34495e; margin-bottom: 8px; display: flex; align-items: center; } .label-icon { color: #3498db; margin-right: 8px; font-size: 14px; } .form-group { margin-bottom: 20px; position: relative; } .custom-input, .custom-select, .custom-textarea { height: calc(2.8rem + 2px); padding: 0.75rem 1rem; border: 1px solid #e0e6ed; border-radius: 8px; font-size: 15px; transition: all 0.3s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.02); } .custom-input:focus, .custom-select:focus, .custom-textarea:focus { border-color: #3498db; box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25); outline: none; } .custom-textarea { height: auto; min-height: 200px; resize: vertical; line-height: 1.6; } .input-group-text { background-color: #f8f9fa; border: 1px solid #e0e6ed; border-radius: 8px; color: #6c757d; } .form-text { margin-top: 6px; font-size: 13px; color: #6c757d; } /* 浮动标签效果 */ .form-group.focused .floating-label { transform: translateY(-22px) scale(0.85); color: #3498db; opacity: 1; } .floating-label { position: absolute; pointer-events: none; left: 1rem; top: 0.75rem; transition: 0.2s ease all; color: #95a5a6; opacity: 0.8; } .floating-input:focus + .floating-label, .floating-input:not(:placeholder-shown) + .floating-label { transform: translateY(-22px) scale(0.85); color: #3498db; opacity: 1; } .floating-input { padding-top: 1.1rem; padding-bottom: 0.4rem; } /* 数字输入组 */ .input-number-group { display: flex; width: 100%; } .input-number-group input { text-align: center; border-radius: 0; border-left: none; border-right: none; } .input-number-group button { border-radius: 8px 0 0 8px; } .input-number-group button:last-child { border-radius: 0 8px 8px 0; } /* 价格滑块 */ .custom-range { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: #e0e6ed; outline: none; margin: 10px 0; } .custom-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #3498db; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: background 0.3s ease; } .custom-range::-webkit-slider-thumb:hover { background: #2980b9; } /* 标签输入 */ .tag-input-container { display: flex; gap: 10px; } .tag-input { flex-grow: 1; } .add-tag-btn { padding: 0.5rem 0.75rem; border-radius: 8px; } .tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .tag-item { display: inline-flex; align-items: center; background-color: rgba(52, 152, 219, 0.1); color: #3498db; padding: 6px 12px; border-radius: 20px; font-size: 14px; transition: all 0.3s ease; } .tag-item:hover { background-color: rgba(52, 152, 219, 0.2); } .tag-item .remove-tag { margin-left: 8px; cursor: pointer; font-size: 12px; color: #3498db; } .tag-item .remove-tag:hover { color: #e74c3c; } /* 文本计数 */ .text-count { font-size: 12px; color: #7f8c8d; } .text-count.text-danger { color: #e74c3c; } /* ========== 封面上传区域 ========== */ .cover-preview-container { display: flex; flex-direction: column; align-items: center; gap: 20px; } .cover-preview { width: 100%; height: 320px; border: 2px dashed #e0e6ed; border-radius: 10px; overflow: hidden; background-color: #f8f9fa; margin-bottom: 10px; transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; cursor: pointer; } .cover-preview.dragover { border-color: #3498db; background-color: rgba(52, 152, 219, 0.05); } .cover-image { width: 100%; height: 100%; object-fit: contain; } .no-cover-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #95a5a6; padding: 20px; text-align: center; } .no-cover-placeholder i { font-size: 64px; margin-bottom: 20px; color: #d0d0d0; } .placeholder-tip { font-size: 13px; margin-top: 10px; color: #7f8c8d; } .upload-options { width: 100%; padding: 0 20px; } .upload-btn-group { display: flex; gap: 10px; } .custom-upload-btn { flex-grow: 1; padding: 10px 20px; border-radius: 8px; font-weight: 500; transition: all 0.3s ease; background-color: #3498db; border-color: #3498db; color: white; } .custom-upload-btn:hover { background-color: #2980b9; border-color: #2980b9; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3); } .btn-icon { width: 42px; padding: 0; display: flex; align-items: center; justify-content: center; } /* ========== 表单提交区域 ========== */ .form-submit-container { margin-top: 30px; } .action-buttons { display: flex; flex-direction: column; gap: 15px; } .secondary-buttons { display: flex; gap: 10px; } .submit-btn { padding: 15px; border-radius: 8px; font-weight: 600; background: linear-gradient(45deg, #3498db, #2980b9); border: none; transition: all 0.3s ease; position: relative; overflow: hidden; } .submit-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4); } .submit-btn:active { transform: translateY(-1px); } .reset-btn { padding: 12px; border-radius: 8px; font-weight: 500; } .form-tip { margin-top: 15px; font-size: 13px; color: #7f8c8d; text-align: center; } .form-tip i { color: #3498db; margin-right: 5px; } /* 必填项标记 */ .required { color: #e74c3c; margin-left: 4px; font-weight: bold; } /* 无效输入状态 */ .is-invalid { border-color: #e74c3c !important; } .invalid-feedback { display: block; color: #e74c3c; font-size: 13px; margin-top: 5px; } /* ========== 模态框样式 ========== */ .modal-content { border: none; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); overflow: hidden; } .modal-header { background-color: #f8f9fa; border-bottom: 1px solid #edf2f7; padding: 15px 20px; } .modal-title { font-weight: 600; color: #2c3e50; } .modal-body { padding: 25px; } .modal-footer { border-top: 1px solid #edf2f7; padding: 15px 20px; justify-content: space-between; } /* 裁剪模态框 */ .img-container { max-height: 500px; overflow: hidden; } #cropperImage { display: block; max-width: 100%; } .cropper-controls { display: flex; gap: 10px; } /* 图书预览模态框 */ .book-preview-container { padding: 10px; } .book-preview-cover { width: 100%; height: 300px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); background-color: #f8f9fa; margin-bottom: 20px; } .book-preview-cover img { width: 100%; height: 100%; object-fit: cover; } .book-preview-details { padding: 10px 0; } .book-preview-details h3 { margin: 0 0 5px 0; font-weight: 600; color: #2c3e50; } .book-author { color: #7f8c8d; font-size: 16px; margin-bottom: 20px; } .book-info-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; } .book-info-item { display: flex; flex-direction: column; } .info-label { font-size: 13px; color: #7f8c8d; margin-bottom: 3px; } .info-value { font-weight: 500; color: #34495e; } .book-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; } .preview-tag { display: inline-block; background-color: rgba(52, 152, 219, 0.1); color: #3498db; padding: 5px 10px; border-radius: 20px; font-size: 13px; } .book-description { background-color: #f8f9fa; border-radius: 8px; padding: 20px; margin-top: 20px; } .book-description h4 { margin-top: 0; font-weight: 600; color: #2c3e50; margin-bottom: 15px; } .book-description p { color: #34495e; line-height: 1.6; margin: 0; } /* ========== 自定义通知样式 ========== */ .notification-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; max-width: 350px; } .custom-notification { background: white; border-radius: 10px; padding: 15px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); display: flex; align-items: center; animation-duration: 0.5s; border-left: 4px solid #3498db; } .notification-success { border-color: #2ecc71; } .notification-error { border-color: #e74c3c; } .notification-warning { border-color: #f39c12; } .notification-info { border-color: #3498db; } .notification-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 15px; } .notification-success .notification-icon i { color: #2ecc71; } .notification-error .notification-icon i { color: #e74c3c; } .notification-warning .notification-icon i { color: #f39c12; } .notification-info .notification-icon i { color: #3498db; } .notification-content { flex-grow: 1; } .notification-content p { margin: 0; font-size: 14px; color: #2c3e50; } .notification-close { background: none; border: none; color: #bdc3c7; cursor: pointer; padding: 5px; transition: color 0.3s ease; } .notification-close:hover { color: #7f8c8d; } /* ========== 动画效果 ========== */ @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); } } .pulse { animation: pulse 2s infinite; } .pulse-icon { animation: pulse 2s infinite; } /* ========== 响应式样式 ========== */ @media (max-width: 1200px) { .book-form-container { padding: 20px; } .cover-preview { height: 280px; } } @media (max-width: 992px) { .page-header { flex-direction: column; align-items: flex-start; gap: 15px; } .header-actions { width: 100%; justify-content: space-between; } .book-info-section { grid-template-columns: 1fr; } } @media (max-width: 768px) { .book-form-container { padding: 15px 10px; } .page-title { font-size: 24px; } .subtitle { font-size: 14px; } .card-body { padding: 20px 15px; } .cover-preview { height: 240px; } .secondary-buttons { flex-direction: column; } .form-row { margin-right: -5px; margin-left: -5px; } .form-group { padding-right: 5px; padding-left: 5px; } }