| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702 |
- @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 20px;
- }
- /* 头部样式 */
- .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 - 150px);
- height: calc(100vh - 150px); /* 添加固定高度 */
- }
- .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;
- height: 667px;
- background-color: white;
- box-shadow: var(--shadow);
- border-radius: var(--radius);
- overflow: hidden;
- position: relative;
- transform-origin: center;
- transition: transform 0.3s ease;
- }
- .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;
- }
- .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 {
- font-size: 18px;
- font-weight: 600;
- 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;
- }
|