/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #ff9a56 0%, #ffad77 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #e67e22;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 600;
}

.header p {
    color: #666;
    font-size: 1.1em;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* 编辑区域 */
.editor-section, .preview-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.editor-section h2, .preview-section h2 {
    color: #e67e22;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #ff9a56;
    padding-bottom: 10px;
}

/* 样式选择器 */
.style-selector {
    margin-bottom: 20px;
}

.style-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.style-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ff9a56;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #333;
    cursor: pointer;
}

.style-selector select:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(255, 154, 86, 0.2);
}

/* 文本输入框 */
#textInput {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid #ff9a56;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

#textInput:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(255, 154, 86, 0.2);
}

/* 按钮组 */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 1200px) {
    .button-group {
        gap: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 95px;
    }
}

@media (max-width: 900px) {
    .button-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .btn {
        padding: 12px 8px;
        font-size: 13px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .button-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        min-width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 110px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9a56, #e67e22);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-special {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

/* 预览区域 */
.preview-container {
    border: 2px solid #ff9a56;
    border-radius: 8px;
    background: white;
    max-height: 400px;
    overflow-y: auto;
}

.preview-content {
    padding: 20px;
    min-height: 200px;
}

.placeholder {
    color: #999;
    text-align: center;
    font-style: italic;
    padding: 50px 20px;
}

/* 复制提示 */
.copy-notice {
    background: #2ecc71;
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.copy-notice.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 底部样式 */
.footer {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.footer p {
    color: #666;
    font-size: 14px;
}

/* 微信公众号样式预设 */

/* h1居中包装器 */
.style1 .h1-wrapper,
.style2 .h1-wrapper,
.style3 .h1-wrapper,
.style4 .h1-wrapper {
    text-align: center;
    margin: 0;
}

/* 样式1: 橙色经典 */
.style1 h1 {
    background: linear-gradient(135deg, #ff7043, #ff9800);
    color: white;
    padding: 16px 24px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    margin: 20px auto 16px auto;
    box-shadow: 0 3px 8px rgba(255, 112, 67, 0.25);
    position: relative;
    display: block;
    width: fit-content;
    max-width: 90%;
}

.style1 h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 12px 0;
    padding: 8px 0 8px 40px;
    position: relative;
    background: transparent;
    border: none;
    text-align: left;
}

.style1 h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff7043, #ff9800);
    border-radius: 4px;
}

.style1 h2::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #ff7043;
}

.style1 p {
    line-height: 1.8;
    color: #333;
    margin: 12px 0;
    text-indent: 2em;
    font-size: 15px;
    text-align: left;
}

/* 样式2: 橙色渐变 */
.style2 h1 {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ff9a56);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: white;
    padding: 16px 24px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    margin: 20px auto 16px auto;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.25);
    display: block;
    width: fit-content;
    max-width: 90%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.style2 h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 12px 0;
    padding: 8px 0 8px 40px;
    position: relative;
    background: transparent;
    border: none;
    text-align: left;
}

.style2 h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border-radius: 6px;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

.style2 h2::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #ff6b35;
}

.style2 p {
    line-height: 1.8;
    color: #444;
    margin: 12px 0;
    padding: 0;
    background: transparent;
    border: none;
    font-size: 15px;
    text-align: left;
}

/* 样式3: 橙色简约 */
.style3 h1 {
    background: linear-gradient(135deg, #ffb74d, #ff9800);
    color: white;
    padding: 16px 24px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    margin: 20px auto 16px auto;
    box-shadow: 0 3px 8px rgba(255, 183, 77, 0.25);
    position: relative;
    display: block;
    width: fit-content;
    max-width: 90%;
}

.style3 h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 12px 0;
    padding: 8px 0 8px 40px;
    position: relative;
    background: transparent;
    border: none;
    text-align: left;
}

.style3 h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ffb74d, #ff9800);
    border-radius: 50%;
}

.style3 h2::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #ffb74d;
}

.style3 p {
    line-height: 1.8;
    color: #333;
    margin: 12px 0;
    text-align: left;
    font-size: 15px;
}

/* 样式4: 橙色商务 */
.style4 h1 {
    background: linear-gradient(135deg, #d84315, #ff5722);
    color: white;
    padding: 16px 24px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    margin: 20px auto 16px auto;
    box-shadow: 0 3px 8px rgba(216, 67, 21, 0.25);
    position: relative;
    display: block;
    width: fit-content;
    max-width: 90%;
}

.style4 h2 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 16px 0 12px 0;
    padding: 8px 0 8px 40px;
    position: relative;
    background: transparent;
    border: none;
    text-align: left;
}

.style4 h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #d84315, #ff5722);
    border-radius: 2px;
}

.style4 h2::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #d84315;
}

.style4 p {
    line-height: 1.8;
    color: #333;
    margin: 12px 0;
    padding: 0;
    text-align: left;
    font-size: 15px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ff9a56;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

/* 图片样式转换器模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #ff9a56, #e67e22);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
}

/* 上传区域 */
.upload-area {
    border: 3px dashed #ff9a56;
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 154, 86, 0.05), rgba(255, 171, 104, 0.05));
    margin-bottom: 30px;
}

.upload-area:hover {
    border-color: #e67e22;
    background: linear-gradient(135deg, rgba(255, 154, 86, 0.1), rgba(255, 171, 104, 0.1));
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #e67e22;
    background: linear-gradient(135deg, rgba(255, 154, 86, 0.15), rgba(255, 171, 104, 0.15));
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-area p {
    margin: 10px 0;
    font-size: 16px;
    color: #333;
}

.upload-hint {
    font-size: 14px !important;
    color: #666 !important;
}

/* 样式选择网格 */
.style-options {
    margin: 30px 0;
}

.style-options h3 {
    color: #e67e22;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.style-option {
    text-align: center;
    cursor: pointer;
    padding: 20px;
    border: 2px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.style-option:hover {
    border-color: #ff9a56;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 154, 86, 0.2);
}

.style-option.selected {
    border-color: #e67e22;
    background: linear-gradient(135deg, rgba(255, 154, 86, 0.1), rgba(255, 171, 104, 0.1));
}

.style-preview {
    width: 80px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 8px;
    border: 3px solid;
}

.style1-preview {
    background: linear-gradient(135deg, #ff7043, #ff9800);
    border-color: #ff7043;
}

.style2-preview {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ff9a56);
    border-color: #ff6b35;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

.style3-preview {
    background: linear-gradient(135deg, #ffb74d, #ff9800);
    border-color: #ffb74d;
}

.style4-preview {
    background: linear-gradient(135deg, #d84315, #ff5722);
    border-color: #d84315;
}

.style-option span {
    font-weight: 500;
    color: #333;
}

/* 图片预览区域 */
.preview-section-modal {
    margin-top: 30px;
}

.preview-section-modal h3 {
    color: #e67e22;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.image-preview-container {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

#previewCanvas {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.download-section {
    text-align: center;
}

.download-options {
    margin-top: 15px;
}

.download-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.download-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upload-area {
        padding: 30px 15px;
    }
} 