/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: #f0f4f3;
    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, #0d9488 0%, #0e7490 60%, #155e75 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 6px auto;
}

/* 三栏布局 */
.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, #0d9488 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 按钮 */
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: #f0f4f3;
    color: #1d1d1f;
    border: 1px solid #c6d4d0;
}

.btn-clear:hover {
    background: #dfe8e5;
    border-color: #a8bab5;
}

.btn-clear:active {
    transform: scale(0.96);
}

.btn-copy {
    background: #0d9488;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.btn-copy:hover {
    background: #0f766e;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.btn-copy:active {
    transform: scale(0.96);
}

/* 输入区域 */
.input-area {
    width: 100%;
    flex: 1;
    border: 1px solid #c6d4d0;
    border-radius: 12px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.6;
    resize: none;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fafcfb;
    color: #1d1d1f;
    min-height: 600px;
}

.input-area:focus {
    outline: none;
    border-color: #0d9488;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 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(13, 148, 136, 0.05) 0%, rgba(245, 158, 11, 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, #0d9488 0%, #0891b2 50%, #f59e0b 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, #0d9488 0%, #0891b2 50%, #f59e0b 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: reviewGlow 2s ease-in-out infinite;
}

.review-incentive-box::before {
    content: '\2B50';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 80px;
    opacity: 0.15;
    animation: reviewRotate 20s linear infinite;
}

@keyframes reviewGlow {
    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 reviewRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.review-icon {
    font-size: 42px;
    flex-shrink: 0;
    animation: reviewBounce 2s ease-in-out infinite;
}

@keyframes reviewBounce {
    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: #f0f4f3;
    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: '\25BC';
    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: #dfe8e5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
    background: linear-gradient(135deg, #134e4a 0%, #164e63 100%);
    color: #f0fdfa;
    border-color: #134e4a;
    box-shadow: 0 4px 12px rgba(19, 78, 74, 0.25);
}

.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: #f0f4f3;
    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: #dfe8e5;
    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: #fafcfb;
}

.secondary-tab:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background: #f0f4f3;
}

.secondary-tab.active {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    color: #ffffff;
    border-color: #0d9488;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* 预览区域 */
.preview-area {
    flex: 1;
    border: 1px solid #c6d4d0;
    border-radius: 12px;
    padding: 32px;
    background: #ffffff;
    overflow-y: auto;
    min-height: 600px;
    transition: all 0.2s ease;
}

.preview-area:hover {
    border-color: #a8bab5;
}

.preview-area .placeholder {
    color: #86868b;
    text-align: center;
    padding: 60px 20px;
    font-size: 17px;
    line-height: 1.47059;
}

/* 页脚 */
footer {
    background: transparent;
    padding: 40px 20px 20px;
    text-align: center;
    color: #86868b;
    font-size: 12px;
}

/* AI格式化助手 */
.ai-helper-title {
    font-size: 16px;
    font-weight: 700;
    color: #115e59;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ai-helper-box {
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
    border: 2px solid #99f6e4;
    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: #fafcfb;
    border: 1px solid #d1e0dc;
    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: #c6d4d0;
    border-radius: 2px;
}

.btn-copy-prompt {
    background: #0d9488;
    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(13, 148, 136, 0.25);
    flex-shrink: 0;
}

.btn-copy-prompt:hover {
    background: #0f766e;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 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,
        #14b8a6 0, #14b8a6 4px,
        transparent 4px, transparent 8px
    );
}

.arrow-tip {
    font-size: 16px;
    color: #14b8a6;
    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: #0d9488;
    margin-bottom: 12px;
}

.toast-message {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    font-weight: 500;
}

.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;
}

/* 滚动条 */
.preview-area::-webkit-scrollbar {
    width: 8px;
}

.preview-area::-webkit-scrollbar-track {
    background: transparent;
}

.preview-area::-webkit-scrollbar-thumb {
    background: #c6d4d0;
    border-radius: 4px;
}

.preview-area::-webkit-scrollbar-thumb:hover {
    background: #a8bab5;
}

/* 响应式 */
@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;
    }
    .main-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .style-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }
    .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;
    }
    .input-section,
    .preview-section {
        padding: 20px;
    }
    .section-header h2 {
        font-size: 21px;
    }
    .input-area,
    .preview-area {
        min-height: 400px;
    }
}

/* ========== 激活码弹窗样式 ========== */
#wetypo-activation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.activation-dialog {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: activationSlideIn 0.3s ease;
}

@keyframes activationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.activation-header {
    text-align: center;
    margin-bottom: 24px;
}

.activation-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.activation-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
}

.activation-body {
    margin-bottom: 24px;
}

.activation-tip {
    color: #86868b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}

#activation-code-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 18px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    letter-spacing: 2px;
    text-align: center;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

#activation-code-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

#activation-code-input::placeholder {
    color: #c7c7cc;
    letter-spacing: 0;
    font-size: 14px;
}

.activation-error {
    color: #ff3b30;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
    min-height: 18px;
}

.activation-footer {
    display: flex;
    gap: 12px;
}

.activation-btn-primary,
.activation-btn-secondary {
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.activation-btn-primary {
    background: linear-gradient(135deg, #0d9488 0%, #0e7490 100%);
    color: white;
}

.activation-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
}

.activation-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.activation-btn-secondary {
    background: #f5f5f7;
    color: #1d1d1f;
}

.activation-btn-secondary:hover {
    background: #e8e8ed;
}

.activation-hint {
    text-align: center;
    font-size: 13px;
    color: #86868b;
    margin-top: 20px;
}

.activation-hint a {
    color: #0d9488;
    text-decoration: none;
}

.activation-hint a:hover {
    text-decoration: underline;
}

/* 免费版标记 */
.free-version-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.free-version-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

/* 免费版水印 */
.free-watermark {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    color: rgba(0, 0, 0, 0.15);
    pointer-events: none;
    user-select: none;
}

/* 模板锁定样式 */
.template-locked {
    position: relative;
    opacity: 0.6;
}

.template-locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
}
