@import url("all.min.css"); /* 全局样式 */ :root { --primary-color: #4a6bff; --secondary-color: #6c757d; --background-color: #f8f9fa; --card-bg: #ffffff; --text-color: #333333; --border-color: #e0e0e0; --success-color: #28a745; --danger-color: #dc3545; --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); --radius: 8px; --transition: all 0.3s ease; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--background-color); color: var(--text-color); line-height: 1.6; } .app-container { max-width: 1200px; margin: 0 auto; padding: 0 20px 0px; } /* 头部样式 */ .app-header { text-align: center; margin-bottom: 20px; padding: 15px 0; border-bottom: 1px solid var(--border-color); } .app-header h1 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 5px; } .app-description { font-size: 1rem; color: var(--secondary-color); } /* 主内容区域 */ .app-main { display: flex; gap: 20px; max-height: calc(100vh - 80px); height: calc(100vh - 80px); /* 添加固定高度 */ } .tool-panel { flex: 1; display: flex; flex-direction: column; background-color: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-height: 0; /* 确保 flex 子元素可以正确滚动 */ } .preview-panel { flex: 1; background-color: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; } /* 面板选项卡 */ .panel-tabs { display: flex; border-bottom: 1px solid var(--border-color); height: 46px; /* 统一高度 */ flex-shrink: 0; /* 防止压缩 */ } .panel-tab { flex: 1; padding: 12px 15px; background: none; border: none; font-size: 0.95rem; font-weight: 500; color: var(--secondary-color); cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; } .panel-tab i { font-size: 1rem; } .panel-tab span { margin-top: 1px; } .panel-tab:hover { background-color: rgba(0, 0, 0, 0.03); } .panel-tab.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); } .panel-tab.active i { color: var(--primary-color); } .panel-content { flex: 1; display: flex; flex-direction: column; min-height: 0; /* 确保内容可以滚动 */ height: 100%; } .tab-content { display: none; width: 100%; height: 100%; padding: 15px; overflow-y: auto; } .tab-content.active { display: block; } /* 模板选择区域 */ .template-selection { height: 100%; display: flex; flex-direction: column; } .template-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; flex-shrink: 0; /* 防止压缩 */ } .category-btn { padding: 5px 10px; border-radius: 16px; border: 1px solid var(--border-color); background-color: white; font-size: 0.85rem; cursor: pointer; transition: var(--transition); } .category-btn:hover { background-color: var(--background-color); } .category-btn.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); } .templates-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; flex: 1; overflow-y: auto; padding: 5px; align-items: start; min-height: 0; /* 确保可以滚动 */ } .template-item { border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: var(--transition); position: relative; display: flex; flex-direction: column; height: 130px; /* 固定高度 */ } .template-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); } .template-item.selected { border-color: var(--primary-color); } .template-thumbnail { width: 100%; height: 100%; object-fit: cover; flex: 1; } .template-name { font-size: 0.8rem; text-align: center; padding: 4px; background-color: rgba(0, 0, 0, 0.7); color: white; position: absolute; bottom: 0; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 编辑区域 */ .editor-panel { height: 100%; overflow-y: auto; } .edit-form { display: flex; flex-direction: column; gap: 12px; padding-right: 5px; } .form-group { display: flex; flex-direction: column; } .form-group label { margin-bottom: 4px; font-weight: 500; font-size: 0.9rem; } .form-control { padding: 8px 10px; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 0.95rem; transition: var(--transition); } .form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(74, 107, 255, 0.2); } .color-picker { height: 36px; padding: 4px; border: 1px solid var(--border-color); border-radius: var(--radius); } /* 高级选项区域 */ .advanced-options { height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; padding-right: 5px; } .option-group { background-color: #f8f9fa; border-radius: var(--radius); padding: 15px; } .option-group h3 { font-size: 1rem; margin-bottom: 12px; color: var(--primary-color); font-weight: 600; } .range-slider-container { display: flex; align-items: center; gap: 10px; } .range-slider { flex: 1; -webkit-appearance: none; height: 6px; border-radius: 3px; background: #ddd; outline: none; } .range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary-color); cursor: pointer; } .range-value { width: 40px; font-size: 0.85rem; text-align: right; } .watermark-options { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-color); } /* 预览区域标题栏 */ .preview-header { display: flex; justify-content: space-between; align-items: center; height: 46px; /* 统一高度 */ border-bottom: 1px solid var(--border-color); padding: 0 15px; } .preview-header h2 { margin: 0; color: var(--primary-color); font-size: 0.95rem; /* 统一字体大小 */ font-weight: 500; /* 统一字重 */ } .zoom-controls { display: flex; gap: 8px; } .zoom-btn { padding: 4px 12px; border: 1px solid var(--border-color); border-radius: 4px; background-color: white; color: var(--text-color); font-size: 13px; cursor: pointer; transition: var(--transition); height: 28px; /* 固定按钮高度 */ line-height: 20px; /* 文字垂直居中 */ } .zoom-btn:hover { background-color: var(--background-color); border-color: var(--primary-color); color: var(--primary-color); } /* 预览区域 */ .preview-container { display: flex; justify-content: center; align-items: center; flex: 1; margin-bottom: 15px; background-color: #f0f2f5; padding: 15px; overflow: hidden; position: relative; } .poster-preview { width: 375px; min-height: 667px; background-color: white; box-shadow: var(--shadow); border-radius: var(--radius); position: relative; transform-origin: center; transition: transform 0.3s ease; } .poster-preview > div { min-height: 667px; display: flex; flex-direction: column; } .poster-preview img { max-width: 100%; height: auto; object-fit: contain; } .poster-preview.with-filter { filter: brightness(var(--brightness, 100%)) contrast(var(--contrast, 100%)) saturate(var(--saturation, 100%)); } .poster-preview-container { position: relative; } .poster-watermark { position: absolute; color: white; font-size: 16px; padding: 5px 10px; font-weight: 500; text-shadow: 0 1px 2px rgba(0,0,0,0.5); pointer-events: none; } /* 图片上传 */ .image-upload { display: flex; flex-direction: column; gap: 10px; } .upload-preview { max-width: 100%; height: 120px; border: 1px dashed var(--border-color); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; } .upload-preview img { max-width: 100%; max-height: 100%; object-fit: contain; } .upload-btn { display: inline-block; padding: 6px 12px; background-color: var(--secondary-color); color: white; border: none; border-radius: var(--radius); cursor: pointer; transition: var(--transition); font-size: 0.9rem; } .upload-btn:hover { background-color: #5a6268; } .placeholder-message { text-align: center; color: var(--secondary-color); padding: 20px; } .detection-notice { margin-bottom: 15px; } .info-message { padding: 10px; background-color: rgba(74, 107, 255, 0.1); border-radius: var(--radius); display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--primary-color); } .info-message i { font-size: 1rem; } /* 按钮样式 */ .action-buttons { display: flex; justify-content: center; gap: 15px; margin-bottom: 10px; } .btn { padding: 10px 20px; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 500; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 8px; } .btn i { font-size: 1.1rem; } .primary-btn { background-color: var(--primary-color); color: white; } .primary-btn:hover { background-color: #3a5bd9; } .secondary-btn { background-color: var(--secondary-color); color: white; } .secondary-btn:hover { background-color: #5a6268; } .btn:disabled { background-color: #cccccc; cursor: not-allowed; } /* 模态框样式 */ .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999; display: none; } .modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: white; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1000; width: 80%; max-width: 500px; display: none; } .close-modal { position: absolute; right: 20px; top: 15px; font-size: 1.5rem; cursor: pointer; color: var(--secondary-color); } .close-modal:hover { color: var(--danger-color); } .modal h2 { margin-bottom: 20px; color: var(--primary-color); } .share-options { display: flex; justify-content: space-around; margin-bottom: 30px; } .share-option { display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; transition: var(--transition); } .share-option i { font-size: 2rem; color: var(--primary-color); } .share-option:hover { transform: translateY(-5px); } .share-instructions { background-color: var(--background-color); padding: 15px; border-radius: var(--radius); } .share-instructions p { margin-bottom: 8px; } /* 响应式设计 */ @media (max-width: 992px) { .app-main { flex-direction: column; } .preview-panel { margin-top: 20px; } } @media (max-width: 576px) { .app-header h1 { font-size: 2rem; } .templates-container { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); } .action-buttons { flex-direction: column; } .btn { width: 100%; justify-content: center; } } /* 动画效果 */ @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .fade-in { animation: fadeIn 0.5s ease forwards; } /* 导航栏样式 */ .main-navbar { background-color: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); padding: 10px 20px; margin-bottom: 20px; } .navbar-brand { display: flex; align-items: center; position: relative; } .mod-head-actions{ position: absolute; right: 0; } .mod-head-actions a:hover{ color: #f00; } .brand-link { display: flex; align-items: center; text-decoration: none; color: var(--text-color); } .brand-link img { width: 24px; height: 24px; margin-right: 8px; } .brand-text { margin-right: 8px; } .brand-subtitle { font-size: 14px; color: var(--secondary-color); padding-left: 8px; border-left: 1px solid var(--border-color); } /* 移除旧的预览面板标题样式 */ .preview-panel h2 { margin-bottom: 0; padding-bottom: 0; border-bottom: none; } /* 特殊布局样式 */ .special-layout { background-color: var(--background-color); padding: 15px; border-radius: var(--radius); position: relative; } .special-layout .image-upload { height: 100%; } .special-layout .upload-preview { height: 150px; } .special-layout .color-picker { width: 100%; height: 40px; } .special-layout label { margin-bottom: 8px; color: var(--text-color); font-weight: 500; } .special-layout .left-column{ flex: 1; width: 240px; } .special-layout .right-column{ flex: 1; width: 120px; position: absolute; top: 15px; right: 20px; } .special-layout .upload-btn{ position: absolute; bottom: 0; background: #0009; color: #fff; width: 240px; text-align: center; } /* 加载提示 */ .loading-tip { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.8); color: white; padding: 15px 30px; border-radius: 25px; font-size: 14px; display: flex; align-items: center; gap: 10px; z-index: 9999; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } .loading-tip i { font-size: 16px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loading-tip .fa-spin { animation: spin 1s linear infinite; } /* 工具市场按钮样式(保持不变) */ .panel-title>a.x-other-tools { margin: 1px 0 0; font-size: 13px; cursor: pointer; text-decoration: none; -webkit-user-select: none; user-select: none; color: #333; float: right; background-color: #f5f8ff; padding: 5px 10px; border-radius: 15px; border: 1px solid #d0d9ff; transition: all 0.3s ease; display: flex; align-items: center; position: relative; top: 0px; } .panel-title>a.x-other-tools .icon-plus-circle { display: inline-block; width: 16px; height: 16px; background: url(../../static/img/plus-circle.svg) no-repeat center center; background-size: contain; margin-right: 5px; } .panel-title>a.x-other-tools .tool-market-badge { display: inline-block; background-color: #4d89fe; color: white; padding: 2px 6px; border-radius: 10px; margin-left: 5px; font-size: 12px; font-weight: bold; } .panel-title>a.x-other-tools:hover { color: #333; background-color: #e6edff; box-shadow: 0 2px 5px rgba(0,0,0,0.15); transform: translateY(-1px); } /* 保持原有的顶部导航样式 */ .x-donate-link { float: right; line-height: 18px; color: #2563eb; cursor: pointer; text-decoration: none; border: none; white-space: nowrap; margin-right: auto; border-radius: 20px; background-color: #eff6ff; transition: all 0.2s ease; position: relative; display: inline-flex; align-items: center; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1); position: absolute; right: 230px; top: 4px; padding: 4px 12px; font-size: 12px; font-weight: normal; } .x-donate-link:hover { background-color: #dbeafe; color: #1d4ed8; text-decoration: none; box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15); transform: translateY(-1px); } .x-donate-link>a { font-size: 12px; color: blue; cursor: pointer; text-decoration: underline; } .x-donate-link>a:hover { text-decoration: underline; color: #f00; }