/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Apple风格：极简、留白、质感 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    padding: 0;
    color: #1d1d1f;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
}

.container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 60px 80px;
}

/* 头部样式 - 品牌设计 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 50px 6px 50px;
    text-align: center;
    margin: -60px -80px 60px -80px;
    border-radius: 20px 20px 0 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1px;
}

.brand-icon {
    font-size: 48px;
}

.brand-name {
    font-size: 56px;
    font-weight: 900;
    color: white;
    letter-spacing: 2px;
}

.brand-slogan {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    margin-bottom: 4px;
}

/* 分割线 */
.divider {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 auto 3px auto;
}

/* 引流区 */
.personal-info {
    background: linear-gradient(135deg, #ffeef8 0%, #fff5f0 100%);
    padding: 5px 24px;
    border-radius: 12px;
    border: 2px solid transparent;
    border-image: linear-gradient(to right, #ff6b9d, #ffc75f, #70c1b3) 1;
    box-shadow: 0 4px 14px rgba(255, 107, 157, 0.12);
    display: inline-block;
    max-width: 500px;
}

.personal-text {
    font-size: 15px;
    color: #666;
    text-align: center;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.personal-highlight {
    color: #ff6b9d;
    font-weight: 700;
}

.footer-link {
    font-size: 15px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-link-text {
    color: #ff6b9d;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #ff6b9d;
    padding-bottom: 2px;
    transition: all 0.3s;
}

.footer-link-text:hover {
    opacity: 0.8;
}

/* 主内容区域 - 三栏布局 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr 180px;
    gap: 24px;
}

.input-section,
.preview-section,
.style-selector {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.input-section:hover,
.preview-section:hover,
.style-selector:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 样式选择器 - 窄且竖版 */
.style-selector {
    padding: 24px 20px;
}

.style-selector .section-header {
    margin-bottom: 20px;
}

.style-selector .section-header h2 {
    font-size: 21px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 28px;
    line-height: 1.14286;
    font-weight: 600;
    letter-spacing: 0.007em;
    background: linear-gradient(135deg, #0071e3 0%, #00a8e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(0, 113, 227, 0.15);
    filter: drop-shadow(0 2px 4px rgba(0, 113, 227, 0.1));
}

/* 按钮样式 - 苹果蓝 */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.6, 1);
    letter-spacing: -0.016em;
}

.btn-clear {
    background: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.btn-clear:hover {
    background: #e8e8ed;
    border-color: #b8b8bd;
}

.btn-clear:active {
    transform: scale(0.96);
}

.btn-copy {
    background: #0071e3;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
}

.btn-copy:hover {
    background: #0077ed;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
}

.btn-copy:active {
    transform: scale(0.96);
}

/* 输入区域 - 极简边框 */
.input-area {
    width: 100%;
    flex: 1;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fbfbfd;
    color: #1d1d1f;
    min-height: 600px;
}

.input-area:focus {
    outline: none;
    border-color: #0071e3;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.08);
}

.input-area::placeholder {
    color: #86868b;
}

/* 样式分类Tab - 折叠菜单 */
.style-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 380px);
}

/* 样式更新提示 */
.style-update-notice {
    margin-top: 16px;
    padding: 16px 12px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.05) 0%, rgba(255, 107, 53, 0.05) 100%);
    border-radius: 12px;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.style-update-notice::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #0071e3 0%, #00a8e3 50%, #ff6b35 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.style-update-notice p {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #0071e3 0%, #00a8e3 50%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 好评引导提示框 */
.review-incentive-box {
    margin-top: 20px;
    padding: 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #fecaca 100%);
    border-radius: 14px;
    border: 3px solid #fbbf24;
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: visible;
    animation: glow 2s ease-in-out infinite;
}

.review-incentive-box::before {
    content: '⭐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 80px;
    opacity: 0.15;
    animation: rotate 20s linear infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.1);
    }
    50% {
        box-shadow: 0 8px 32px rgba(251, 191, 36, 0.5), 0 0 0 2px rgba(251, 191, 36, 0.3);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.review-icon {
    font-size: 42px;
    flex-shrink: 0;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.review-content {
    flex: 1;
    text-align: center;
}

.review-title {
    font-size: 16px;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.review-reward {
    font-size: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    line-height: 1.2;
}

.review-how {
    font-size: 13px;
    color: #92400e;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.review-action {
    font-size: 13px;
    color: #78350f;
    font-weight: 600;
    line-height: 1.4;
}

.review-highlight {
    color: #dc2626;
    font-weight: 800;
    background: rgba(220, 38, 38, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.category-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-tab {
    padding: 12px 16px;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s ease;
    color: #1d1d1f;
    font-weight: 600;
    letter-spacing: -0.016em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-align: left;
    width: 100%;
    position: relative;
}

.category-tab::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transition: transform 0.2s ease;
    font-size: 10px;
}

.category-tab.active::after {
    transform: translateY(-50%) rotate(0deg);
}

.category-tab:hover {
    background: #e8e8ed;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
    background: linear-gradient(135deg, #1d1d1f 0%, #2d2d2f 100%);
    color: #f5f5f7;
    border-color: #1d1d1f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.templates-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    padding-left: 12px;
}

.templates-container.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 4px;
}

.tab {
    padding: 12px 16px;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    color: #1d1d1f;
    font-weight: 500;
    letter-spacing: -0.016em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-align: center;
    width: 100%;
}

.tab:hover {
    background: #e8e8ed;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.secondary-tab {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 400;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    background: #fbfbfd;
}

.secondary-tab:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background: #f5f5f7;
}

.secondary-tab.active {
    background: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
    color: #ffffff;
    border-color: #0071e3;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

/* 预览区域 - 纯净背景 */
.preview-area {
    flex: 1;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 32px;
    background: #ffffff;
    overflow-y: auto;
    min-height: 600px;
    transition: all 0.2s ease;
}

.preview-area:hover {
    border-color: #b8b8bd;
}

.preview-area .placeholder {
    color: #86868b;
    text-align: center;
    padding: 60px 20px;
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

/* 页脚 - 极简 */
footer {
    background: transparent;
    padding: 40px 20px 20px;
    text-align: center;
    color: #86868b;
    font-size: 12px;
    line-height: 1.33337;
    letter-spacing: -0.01em;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 1fr 1fr 150px;
        gap: 20px;
    }

    .style-selector {
        padding: 20px 16px;
    }
}

@media (max-width: 1068px) {
    .container {
        padding: 40px 40px;
    }

    header {
        margin: -40px -40px 40px -40px;
        padding: 40px 30px 30px 30px;
    }

    .brand-name {
        font-size: 40px;
    }

    .brand-slogan {
        font-size: 19px;
    }

    .personal-info {
        max-width: 100%;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .style-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }

    .primary-tabs,
    .secondary-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tab {
        width: auto;
    }
}

@media (max-width: 734px) {
    .container {
        padding: 24px 20px;
    }

    header {
        margin: -24px -20px 32px -20px;
        padding: 30px 20px 25px 20px;
        border-radius: 0;
    }

    .brand-icon {
        font-size: 36px;
    }

    .brand-name {
        font-size: 32px;
    }

    .brand-slogan {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .divider {
        width: 150px;
        margin-bottom: 15px;
    }

    .personal-info {
        padding: 12px 20px;
        max-width: 100%;
    }

    .personal-text,
    .footer-link {
        font-size: 14px;
        flex-wrap: wrap;
    }

    .input-section,
    .preview-section {
        padding: 20px;
    }

    .section-header h2 {
        font-size: 21px;
    }

    .input-area,
    .preview-area {
        min-height: 400px;
    }
}

/* 滚动条样式 - 极简 */
.preview-area::-webkit-scrollbar {
    width: 8px;
}

.preview-area::-webkit-scrollbar-track {
    background: transparent;
}

.preview-area::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 4px;
}

.preview-area::-webkit-scrollbar-thumb:hover {
    background: #b8b8bd;
}

/* AI格式化助手样式 */
.ai-helper-title {
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ai-helper-box {
    background: linear-gradient(135deg, #fef9f5 0%, #fff7ed 100%);
    border: 2px solid #fde68a;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.ai-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ai-step-number {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.ai-step-text {
    font-size: 13px;
    color: #1d1d1f;
    font-weight: 500;
    line-height: 1.4;
}

.ai-prompt-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.ai-prompt-content {
    flex: 1;
    background: #fbfbfd;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    max-height: 75px;
    overflow-y: auto;
    font-family: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ai-prompt-content::-webkit-scrollbar {
    width: 4px;
}

.ai-prompt-content::-webkit-scrollbar-track {
    background: transparent;
}

.ai-prompt-content::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 2px;
}

.btn-copy-prompt {
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
    flex-shrink: 0;
}

.btn-copy-prompt:hover {
    background: #0077ed;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
}

.btn-copy-prompt:active {
    transform: scale(0.96);
}

.btn-copy-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.prompt-hint {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
    text-align: center;
    font-weight: 500;
}

/* 视觉引导箭头 */
.visual-guide-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0;
}

.arrow-line {
    width: 2px;
    height: 20px;
    background: repeating-linear-gradient(
        to bottom,
        #fbbf24 0,
        #fbbf24 4px,
        transparent 4px,
        transparent 8px
    );
}

.arrow-tip {
    font-size: 16px;
    color: #fbbf24;
    line-height: 1;
    margin-top: -3px;
}

/* Toast 提示框样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    padding: 28px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-width: 460px;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.toast-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.toast-title {
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 12px;
}

.toast-message {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    font-weight: 500;
}

/* Toast 遮罩层 */
.toast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* 公众号样式预览基础样式 */
.wechat-content {
    background: white;
    padding: 20px;
    line-height: 1.8;
    color: #333;
}
