/* ========== 全局 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --accent: #fd79a8;
    --gold: #fdcb6e;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --text-lighter: #b2bec3;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========== 顶部导航 ========== */
header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

header .logo .emoji-icon {
    font-size: 28px;
}

header .logo span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

header nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

header nav a:hover {
    background: var(--bg);
    color: var(--text);
}

header nav a.active {
    color: var(--primary);
    font-weight: 600;
}

.btn-vip-nav {
    background: linear-gradient(135deg, var(--gold), #f9a825) !important;
    color: #333 !important;
    padding: 8px 20px !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

.btn-vip-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 203, 110, 0.4) !important;
}

/* ========== 主容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* ========== 首页标题区 ========== */
.hero-section {
    text-align: center;
    padding: 48px 20px 40px;
    position: relative;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 28px;
}

.hero-section .btn-start {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 36px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.35);
}

.hero-section .btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
}

/* ========== 分类标签 ========== */
.categories-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 4px;
}

.cat-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: var(--card-bg);
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.cat-btn:hover {
    color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.cat-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

/* ========== 模板网格 ========== */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.template-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.template-preview {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.template-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.15));
    pointer-events: none;
}

.template-info {
    padding: 12px 14px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-info h3 {
    font-size: 14px;
    font-weight: 600;
}

.template-info .category-tag {
    font-size: 11px;
    color: var(--text-lighter);
    background: var(--bg);
    padding: 2px 10px;
    border-radius: 10px;
}

/* ========== 编辑器布局 ========== */
.editor-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .editor-wrapper {
        grid-template-columns: 1fr;
    }
}

/* 左侧：模板面板 */
.template-panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.template-panel h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-panel .panel-cats {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.template-panel .panel-cats button {
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fff;
    color: var(--text-light);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.template-panel .panel-cats button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.template-panel .panel-cats button:hover:not(.active) {
    border-color: var(--primary-light);
    color: var(--primary);
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 4px;
}

.panel-grid::-webkit-scrollbar {
    width: 4px;
}

.panel-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.panel-thumb {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    text-align: center;
}

.panel-thumb:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.panel-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.2);
}

.panel-thumb .thumb-box {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    border-radius: 6px;
}

.panel-thumb .thumb-label {
    font-size: 11px;
    color: var(--text-light);
    padding: 4px 0 2px;
}

/* 中间：预览区 */
.preview-panel {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-container {
    width: 100%;
    max-width: 500px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
}

#memeCanvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

.preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid #e0e0e0;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--gold), #f9a825);
    color: #333;
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(253, 203, 110, 0.4);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* 右侧：编辑面板 */
.edit-panel {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.edit-panel h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #edf2f7;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
    background: #f7fafc;
}

.form-group input[type="text"]:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.08);
}

.form-group .char-count {
    text-align: right;
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 4px;
}

.form-group input[type="range"] {
    width: 100%;
    margin-top: 4px;
    accent-color: var(--primary);
    height: 6px;
    border-radius: 3px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-lighter);
}

.font-size-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.font-size-display .value {
    font-weight: 700;
    color: var(--primary);
    font-size: 15px;
}

/* ========== 使用量提示 ========== */
.usage-bar {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.usage-bar .usage-text {
    color: var(--text-light);
}

.usage-bar .usage-text strong {
    color: var(--text);
}

.usage-bar .usage-count {
    color: var(--primary);
    font-weight: 700;
}

.usage-bar.free {
    border-left: 4px solid var(--gold);
}

.usage-bar.vip {
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, #f0efff, #fff);
}

/* ========== 会员页面 ========== */
.pricing-page {
    text-align: center;
    padding: 20px 0;
}

.pricing-page h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.pricing-page .subtitle {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.pricing-page .subtitle a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.comparison-table {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 24px auto;
    max-width: 700px;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 14px 20px;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--text-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.comparison-table .check {
    color: #2ecc71;
    font-size: 18px;
}

.comparison-table .cross {
    color: #e74c3c;
    font-size: 18px;
}

.comparison-table .featured-col {
    background: rgba(108, 92, 231, 0.03);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 32px auto 0;
}

.pricing-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: all 0.25s;
    position: relative;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8f7ff, #fff);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 4px 18px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pricing-card .price {
    font-size: 40px;
    font-weight: 800;
    color: var(--primary);
    margin: 16px 0;
}

.pricing-card .price .period {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-lighter);
}

.pricing-card .original-price {
    font-size: 14px;
    color: var(--text-lighter);
    text-decoration: line-through;
    margin-bottom: 8px;
}

.pricing-card ul {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.pricing-card ul li {
    padding: 6px 0;
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card ul li::before {
    content: '✓';
    color: #2ecc71;
    font-weight: 700;
}

.pricing-card .btn-buy {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.pricing-card .btn-buy.primary {
    background: var(--primary);
    color: #fff;
}

.pricing-card .btn-buy.primary:hover {
    background: var(--primary-dark);
}

.pricing-card .btn-buy.outline {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: var(--text);
}

.pricing-card .btn-buy.outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========== 支付方式 ========== */
.payment-methods {
    margin-top: 32px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.payment-methods h4 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    font-weight: 600;
}

.payment-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.payment-icons .pay-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.payment-icons .pay-item .icon {
    font-size: 32px;
}

/* ========== 常见问题 ========== */
.faq-section {
    margin-top: 40px;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.faq-section h3 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
}

.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.faq-item h4 {
    font-size: 15px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-item p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

/* ========== 特点展示区 ========== */
.features-section {
    margin-top: 56px;
}

.features-section h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
}

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

.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-card .icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

/* ========== 广告位 ========== */
.ad-placeholder {
    background: var(--card-bg);
    border: 1px dashed #ddd;
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    color: var(--text-lighter);
    font-size: 13px;
    margin: 32px 0;
}

/* ========== 页脚 ========== */
footer {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-lighter);
    font-size: 13px;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
}

footer a:hover {
    color: var(--primary);
}

/* ========== Toast 消息 ========== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 工具提示 ========== */
.tip-box {
    background: #f0efff;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 20px;
}

.tip-box h4 {
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 6px;
}

.tip-box ul {
    list-style: none;
    padding: 0;
}

.tip-box ul li {
    font-size: 13px;
    color: var(--text-light);
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.tip-box ul li::before {
    content: '💡';
    position: absolute;
    left: 0;
    font-size: 11px;
}

/* ========== 历史记录 ========== */
.history-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
    aspect-ratio: 1;
}
.history-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* ========== 页面加载进度条 ========== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    animation: loaderAnim 1.2s ease-in-out infinite;
    transform-origin: left;
}
@keyframes loaderAnim {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(0.6); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

/* ========== 返回顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(108,92,231,0.3);
    z-index: 999;
    transition: all 0.3s;
}
.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}

/* ========== 淡入动效 ========== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible,
.fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 模板搜索 ========== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 6px;
}
.badge-count {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
}
.panel-search {
    margin-bottom: 10px;
}
.panel-search input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: var(--card-bg);
}
.panel-search input:focus {
    border-color: var(--primary-light);
}
.watermark-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
}

/* ========== 会员英雄区 ========== */
.pricing-hero {
    position: relative;
    text-align: center;
    padding: 80px 20px 60px;
    overflow: hidden;
}
.pricing-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    opacity: 0.9;
}
.pricing-hero-content {
    position: relative;
    color: #fff;
    max-width: 600px;
    margin: 0 auto;
}
.pricing-hero-content h1 {
    font-size: 36px;
    margin-bottom: 12px;
}
.pricing-hero-content p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 30px;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
}
.hero-stat {
    text-align: center;
}
.hero-stat-num {
    font-size: 28px;
    font-weight: 800;
    display: block;
}
.hero-stat-label {
    font-size: 13px;
    opacity: 0.8;
}

/* ========== 对比表 ========== */
.comparison-table-section {
    margin: 40px 0;
}
.comparison-table {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}
.comparison-table th,
.comparison-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.comparison-table th {
    background: #f8f4ff;
    font-weight: 700;
    color: var(--text);
}
.comparison-table th:first-child {
    border-radius: var(--radius-lg) 0 0 0;
}
.comparison-table th:last-child {
    border-radius: 0 var(--radius-lg) 0 0;
}
.featured-col {
    background: linear-gradient(135deg, rgba(108,92,231,0.06), rgba(253,121,168,0.06));
    font-weight: 600;
    color: var(--primary-dark);
}
.free-col {
    color: var(--text-light);
}
.badge-check {
    color: #27ae60;
    font-weight: bold;
}
.badge-cross {
    color: #e74c3c;
}

/* ========== 套餐卡片 ========== */
.pricing-cards-section {
    margin: 40px 0;
}
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.pricing-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
    animation: cardFadeIn 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}
@keyframes cardFadeIn {
    to { opacity: 1; transform: translateY(0); }
}
.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(108,92,231,0.15);
}
.badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.plan-name {
    font-size: 20px;
    margin-bottom: 16px;
    text-align: center;
}
.price-block {
    text-align: center;
    margin-bottom: 20px;
}
.price-amount {
    font-size: 40px;
    font-weight: 800;
    color: var(--primary);
}
.price-period {
    font-size: 16px;
    color: var(--text-light);
}
.original-price {
    display: block;
    font-size: 14px;
    color: var(--text-lighter);
    text-decoration: line-through;
    margin-top: 4px;
}
.plan-features {
    list-style: none;
    margin-bottom: 20px;
}
.plan-features li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text);
}
.pay-method-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}
.pay-method-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-light);
}
.pay-method-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== 支付方式 ========== */
.payment-methods {
    text-align: center;
    padding: 30px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin: 40px 0;
}
.payment-methods h4 {
    margin-bottom: 16px;
    font-size: 15px;
}
.payment-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.pay-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* ========== 用户评价 ========== */
.testimonials-section {
    margin: 40px 0;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.testimonial-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.testimonial-stars {
    margin-bottom: 10px;
    font-size: 16px;
}
.testimonial-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 12px;
    font-style: italic;
}

/* ========== 保障横幅 ========== */
.guarantee-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin: 30px 0;
    font-size: 14px;
}
.guarantee-banner strong {
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

/* ========== FAQ ========== */
.faq-section {
    margin: 40px 0;
}
.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}
.faq-item h4 {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
}
.faq-item p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========== 三步教程 ========== */
.steps-section {
    margin: 50px 0;
}
.steps-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}
.step-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    position: relative;
}
.step-card:hover {
    transform: translateY(-4px);
}
.step-number {
    position: absolute;
    top: -12px;
    left: 20px;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.step-icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.step-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}
.step-card p {
    font-size: 13px;
    color: var(--text-light);
}
.step-demo {
    margin-top: 10px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}
.step-arrow {
    color: var(--primary-light);
    display: flex;
    align-items: center;
}

/* ========== 热门展示 ========== */
.hot-gallery {
    margin: 40px 0;
}
.hot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.hot-item {
    cursor: pointer;
    transition: all 0.3s;
}
.hot-item:hover {
    transform: translateY(-4px);
}
.hot-preview {
    aspect-ratio: 1;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: var(--shadow);
    margin-bottom: 8px;
}
.hot-label {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
}

/* ========== 分类按钮 ========== */
.cat-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: 2px solid #eee;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-light);
}
.cat-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.cat-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ========== Toast ========== */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s;
    pointer-events: none;
    white-space: pre-line;
    text-align: center;
    max-width: 90vw;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .container {
        padding: 16px 12px;
    }
    
    .hero-section h1 {
        font-size: 28px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .editor-wrapper {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hot-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }
    .step-arrow {
        display: none;
    }

    .payment-icons {
        flex-direction: column;
        align-items: center;
    }
    
    header {
        padding: 0 12px;
    }
    
    header nav a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .pricing-hero-content h1 {
        font-size: 26px;
    }
    .hero-stat-num {
        font-size: 22px;
    }
}

/* ========== 文字项列表样式 ========== */
.text-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.text-items-header span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}
.text-item-count {
    font-weight: 400;
    color: var(--text-lighter);
    font-size: 12px;
}

.text-items-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.text-items-list::-webkit-scrollbar {
    width: 4px;
}
.text-items-list::-webkit-scrollbar-thumb {
    background: var(--text-lighter);
    border-radius: 4px;
}

.text-item-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.02);
    border: 1.5px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.text-item-row:hover {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.06);
}
.text-item-row.active {
    background: rgba(108,92,231,0.08);
    border-color: var(--primary);
}

.text-item-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 4px 6px;
    outline: none;
    font-family: inherit;
    color: var(--text);
    min-width: 0;
}
.text-item-input:focus {
    background: rgba(255,255,255,0.5);
    border-radius: 4px;
}

.text-drag-handle {
    cursor: grab;
    color: var(--text-lighter);
    font-size: 14px;
    user-select: none;
    padding: 2px 4px;
}
.text-drag-handle:active {
    cursor: grabbing;
}

.text-delete-btn {
    border: none;
    background: none;
    color: var(--text-lighter);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
}
.text-delete-btn:hover {
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
}

/* ========== 对齐按钮 ========== */
.align-btns {
    display: flex;
    gap: 4px;
}
.align-btn {
    flex: 1;
    border: 1.5px solid rgba(0,0,0,0.1);
    background: transparent;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.15s;
}
.align-btn:hover {
    background: rgba(0,0,0,0.04);
}
.align-btn.active {
    border-color: var(--primary);
    background: rgba(108,92,231,0.08);
    color: var(--primary);
}

/* ========== 自定义模板上传 ========== */
.custom-template-uploader {
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 8px;
}
.custom-template-uploader:hover {
    border-color: var(--primary);
    background: rgba(108,92,231,0.04);
}
.custom-template-uploader .upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 6px;
}
.custom-template-uploader .upload-label {
    font-size: 13px;
    color: var(--text-light);
}

.editor-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    font-size: 14px;
    margin: 10px 0;
}

.editor-placeholder {
    color: var(--text-lighter);
    font-size: 13px;
    padding: 8px 0;
}

/* ========== 预设文案（热门文案） ========== */
.preset-texts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}
.preset-text-chip {
    display: inline-block;
    padding: 4px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.preset-text-chip:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.text-items-empty {
    color: var(--text-lighter);
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

/* ========== 背景控制 ========== */
.bg-preset-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 6px;
}
.bg-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}
.bg-color-swatch:hover { transform: scale(1.1); }
.bg-color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }

.bg-controls {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 10px 0;
}
.bg-controls-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.style-value {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 400;
}

/* 阴影控制 */
.shadow-controls {
    margin-top: 8px;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.style-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* ========== 打赏赞助 ========== */
.donate-box {
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: 12px;
    border: 1px solid #ffcc80;
    text-align: center;
}
.donate-header {
    font-size: 13px;
    color: #e65100;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}
.donate-qr-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.donate-qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}
.donate-qr-item:hover {
    transform: scale(1.05);
}
.donate-qr-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    object-fit: cover;
}
.donate-label {
    font-size: 12px;
    color: #bf360c;
    font-weight: 500;
}

/* ========== 赞助入口（浮动图标 + 弹窗） ========== */
.donate-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255,152,0,0.4);
    z-index: 9999;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    font-size: 22px;
    line-height: 1;
}
.donate-float:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 24px rgba(255,152,0,0.55);
}
.donate-float:active {
    transform: scale(0.95);
}

/* 遮罩层 */
.donate-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.donate-overlay.active {
    display: flex;
}

/* 弹窗 */
.donate-modal {
    background: #fff;
    border-radius: 16px;
    padding: 24px 28px 20px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
    animation: donatePop 0.25s ease-out;
}
@keyframes donatePop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.donate-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}
.donate-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.donate-close:hover { color: #333; }

.donate-modal-body {
    display: flex;
    gap: 20px;
    justify-content: center;
}
.donate-pay-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.donate-pay-img {
    width: 130px;
    height: 130px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    object-fit: cover;
}
.donate-pay-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.donate-modal-footer {
    text-align: center;
    margin-top: 14px;
}
.donate-hint {
    font-size: 12px;
    color: #aaa;
}

/* ========== 水印 & VIP ========== */
.download-area {
    margin-top: 12px;
}
.watermark-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #999;
    text-align: center;
}
.watermark-hint a:hover {
    text-decoration: underline !important;
}
.vip-status {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
    color: #27ae60;
    font-weight: 500;
}
#vipCodeInput:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(108,92,231,0.15);
}

/* ========== 用户系统 ========== */
.user-area {
    margin-top: 12px;
    padding: 0 2px;
}
.user-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}
.user-phone {
    color: var(--text-light);
    font-weight: 500;
    font-size: 13px;
}
.user-vip-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0,0,0,0.08);
}
.user-vip-badge.vip {
    background: rgba(39,174,96,0.12);
    color: #27ae60;
}
#loginPhone:focus, #loginPassword:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(108,92,231,0.15);
}
