/*
925写作工坊style

*/


/*
87写作工坊style 尝试导出

*/

/* 基础样式 */
.hnc-module-card {
    background-color: #ffffff;
    border: 1px solid #e0e6f0;
    border-radius: 12px;
    padding: 1.5em 2em;
    margin-top: 2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hnc-module-card h2 {
    margin-top: 0;
}

/* === 写作工坊标题行 === */
.hnc-writing-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 1em;
}

.hnc-writing-header-row .hnc-module-title {
    margin: 0;
    text-align: left;
}

/* === 复制链接图标按钮 === */
#hnc-cet4-workshop-section #hnc-writing-copy-link-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

#hnc-cet4-workshop-section #hnc-writing-copy-link-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

#hnc-cet4-workshop-section #hnc-writing-copy-link-btn:active {
    background: #f1f5f9;
}

#hnc-cet4-workshop-section #hnc-writing-copy-link-btn.copied {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.hnc-module-card h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.hnc-cet4-controls {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

/* Ensure equal width for children */
.hnc-cet4-controls>* {
    flex: 1 !important;
    width: 0 !important;
    /* Forces equal distribution */
    min-width: 0 !important;
    /* Prevents overflow */
}

.hnc-cet4-controls select {
    flex-grow: 1;
    max-width: 100%;
    box-sizing: border-box;
}

.hnc-cet4-brainstorm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1 fr));
    gap: 1em;
    margin-bottom: 1em;
}

.hnc-cet4-brainstorm-grid textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
    padding: 0.5em;
    font-size: 15px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

#hnc-cet4-workshop-section button {
    font-size: 16px;
    padding: 0.6em 1.2em;
    border-radius: 6px;
    border: 1px solid #3b82f6;
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

#hnc-cet4-workshop-section button:hover {
    background-color: #2563eb;
}

#hnc-cet4-workshop-section button:disabled {
    background-color: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
}

.hnc-cet4-btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.hnc-cet4-btn-secondary:hover {
    background-color: #e2e8f0;
}

#hnc-cet4-result h3 {
    margin-top: 1.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #f0f0f0;
}

.hnc-info-box {
    background: #e3f2fd;
    color: #1565c0;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    margin: 1em 0;
    font-weight: 500;
    line-height: 1.5;
}

/* 移动端友好的模板显示样式 */
.hnc-template-container {
    margin-top: 1.5em;
}

/* 作文部分样式 */
.hnc-essay-section {
    margin-bottom: 2em;
}

.hnc-essay-section h3 {
    color: #1e293b;
    margin-bottom: 1em;
    font-size: 1.2em;
}

.hnc-essay-paragraph {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1em;
    margin-bottom: 1em;
    line-height: 1.6;
}

.hnc-essay-paragraph strong {
    color: #3b82f6;
}

/* 升级清单卡片样式 */
.hnc-upgrade-section {
    margin-bottom: 2em;
}

.hnc-upgrade-section h3 {
    color: #1e293b;
    margin-bottom: 1em;
    font-size: 1.2em;
}

.hnc-upgrade-cards {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.hnc-upgrade-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1em;
    display: flex;
    gap: 1em;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hnc-upgrade-number {
    background-color: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.hnc-upgrade-content {
    flex-grow: 1;
}

.hnc-upgrade-original,
.hnc-upgrade-improved,
.hnc-upgrade-explanation {
    margin-bottom: 0.5em;
    font-size: 14px;
    line-height: 1.5;
}

.hnc-upgrade-original strong {
    color: #64748b;
}

.hnc-upgrade-improved strong {
    color: #059669;
}

.hnc-upgrade-explanation strong {
    color: #7c3aed;
}

/* 导师提示卡片样式 */
.hnc-tips-section {
    margin-bottom: 2em;
}

.hnc-tips-section h3 {
    color: #1e293b;
    margin-bottom: 1em;
    font-size: 1.2em;
}

.hnc-tip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75em;
}

.hnc-tip-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.9em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.4em;
}

.hnc-tip-header {
    display: flex;
    align-items: center;
    gap: 0.4em;
}

.hnc-tip-type {
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
}

.hnc-tip-content {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

/* 生词解释样式 */
.hnc-vocabulary-info {
    margin-bottom: 2em;
}

.hnc-vocab-word {
    font-size: 16px;
    font-weight: bold;
    color: #0f766e;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #0f766e;
    text-decoration-thickness: 2px;
}

.hnc-vocab-word:hover {
    background-color: #ecfeff;
    border-radius: 4px;
    padding: 2px 4px;
}

/* 文章中生词的样式 */
.hnc-vocab-word-inline {
    color: #0f766e;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: #0f766e;
    text-decoration-thickness: 2px;
    text-decoration-style: dotted;
    font-weight: 500;
    transition: all 0.2s ease;
}

.hnc-vocab-word-inline:hover {
    background-color: #ecfeff;
    border-radius: 4px;
    padding: 2px 4px;
    text-decoration-thickness: 3px;
}

.hnc-scorecard {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1em;
    margin-bottom: 1.2em;
}

.hnc-score-overall {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75em;
    display: flex;
    align-items: center;
    gap: 0.9em;
}

.hnc-score-number {
    font-size: 32px;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1;
    min-width: 52px;
    text-align: center;
}

.hnc-score-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hnc-score-band {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.hnc-score-reason {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.hnc-subscore-grid {
    display: none;
}

.hnc-score-priority {
    margin-top: 0.5em;
}

.hnc-priority-title {
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.5em;
}

.hnc-priority-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75em;
}

.hnc-priority-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75em;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0.6em;
    align-items: start;
}

.hnc-priority-index {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.hnc-priority-body {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.hnc-priority-issue {
    font-weight: 700;
    color: #0f172a;
}

.hnc-priority-fix {
    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

.hnc-priority-example {
    color: #475569;
    font-size: 13px;
    font-style: italic;
}

.hnc-score-checklist {
    display: none;
}

.hnc-radar-wrapper {
    margin: 0.75em 0;
    display: flex;
    justify-content: center;
}

.hnc-radar {
    width: 100%;
    max-width: 320px;
    height: auto;
    display: block;
    overflow: visible;
}

.hnc-radar-ring {
    fill: #f8fafc;
    stroke: #e2e8f0;
    stroke-width: 1;
}

.hnc-radar-axis {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.hnc-radar-shape {
    fill: rgba(37, 99, 235, 0.16);
    stroke: #2563eb;
    stroke-width: 2;
}

.hnc-radar-label {
    font-size: 12px;
    text-anchor: middle;
    fill: #475569;
    dominant-baseline: middle;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .hnc-module-card {
        padding: 1em;
    }

    .hnc-cet4-brainstorm-grid {
        grid-template-columns: 1 fr;
    }

    .hnc-upgrade-card {
        flex-direction: column;
        gap: 0.5em;
    }

    .hnc-upgrade-number {
        align-self: flex-start;
    }

    .hnc-essay-paragraph {
        padding: 0.8em;
        font-size: 14px;
    }

    .hnc-upgrade-original,
    .hnc-upgrade-improved,
    .hnc-upgrade-explanation {
        font-size: 13px;
    }

    .hnc-tip-content {
        font-size: 13px;
    }

    .hnc-vocab-word,
    .hnc-vocab-word-inline {
        font-size: 15px;
    }

    .hnc-score-overall {
        flex-direction: column;
        align-items: flex-start;
    }

    .hnc-score-number {
        font-size: 28px;
    }

    .hnc-subscore-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    #hnc-cet4-workshop-section button:hover {
        background-color: #3b82f6;
    }

    .hnc-cet4-btn-secondary:hover {
        background-color: #f1f5f9;
    }
}

/* 范文标签页样式 */
.hnc-sample-tabs {
    margin-top: 1em;
}

.hnc-sample-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5em;
    gap: 0.5em;
    overflow-x: auto;
    padding-bottom: 0.5em;
}

.hnc-sample-tab {
    padding: 0.75em 1.5em;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    font-size: 14px;
    font-weight: 500;
}

.hnc-sample-tab:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.hnc-sample-tab.active {
    background: white;
    border-color: #3b82f6;
    color: #3b82f6;
    border-bottom: 2px solid white;
    margin-bottom: -2px;
    font-weight: 600;
}

.hnc-sample-tab .hnc-difficulty-badge {
    display: inline-block;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 0.5em;
}

.hnc-sample-tab .hnc-difficulty-badge.easy {
    background: #dcfce7;
    color: #166534;
}

.hnc-sample-tab .hnc-difficulty-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.hnc-sample-tab .hnc-difficulty-badge.hard {
    background: #fee2e2;
    color: #991b1b;
}

.hnc-sample-content-area {
    min-height: 300px;
}

.hnc-sample-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5em;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 1em;
    text-align: justify;
    /* 添加两端对齐 */
    text-justify: inter-word;
    /* 优化英文单词间距分配 */
}

.hnc-sample-content h6 {
    color: #1e293b;
    margin-bottom: 1em;
    font-size: 1.1em;
    font-weight: 600;
}

/* 范文选择卡片样式 */
.hnc-sample-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1 fr));
    gap: 1em;
    margin-top: 1em;
}

.hnc-sample-card {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.hnc-sample-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.hnc-sample-card.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.hnc-sample-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5em;
}

.hnc-sample-card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.hnc-sample-card-difficulty {
    padding: 0.25em 0.5em;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.hnc-sample-card-difficulty.easy {
    background-color: #dcfce7;
    color: #166534;
}

.hnc-sample-card-difficulty.medium {
    background-color: #fef3c7;
    color: #92400e;
}

.hnc-sample-card-difficulty.hard {
    background-color: #fee2e2;
    color: #991b1b;
}

.hnc-sample-card-preview {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
    max-height: 120px;
    overflow-y: auto;
    /* 允许滚动 */
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    /* 显示6行 */
    -webkit-box-orient: vertical;
    padding: 8px 0;
}

/* 模态框样式 */
.hnc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.hnc-modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5em;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hnc-modal-content h4 {
    margin-top: 0;
    margin-bottom: 1em;
    color: #1e293b;
}

.hnc-modal-body label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #374151;
}

.hnc-modal-body input {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 1em;
    box-sizing: border-box;
}

.hnc-modal-actions {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
}

/* === 新增：增强UI样式 === */

/* 加载状态样式 */
.hnc-loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    padding: 2em;
    color: #64748b;
}

.hnc-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: hnc-spin 1s linear infinite;
}

@keyframes hnc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 增强的下拉选择样式 */
.hnc-select-wrapper {
    position: relative;
    flex: 1;
    max-width: 100%;
}

.hnc-enhanced-select {
    width: 100%;
    padding: 0.75em 2.5em 0.75em 1em;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    background: white;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.hnc-enhanced-select:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.hnc-enhanced-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hnc-select-arrow {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
    transition: transform 0.2s;
}

.hnc-enhanced-select:focus+.hnc-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* 题目预览样式 */
.hnc-topic-preview {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfccb 100%);
    border: 1px solid #22c55e;
    border-radius: 12px;
    padding: 0.75em;
    /* 从1.5em减小到1em */
    margin-top: 0.5em;
    /* 从1em减小到0.75em */
    animation: hnc-slideInDown 0.4s ease-out;
    max-width: 100%;
    /* 限制最大宽度 */
}

@keyframes hnc-slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hnc-preview-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.75em;
    /* 从1em减小到0.75em */
    font-size: 14px;
    /* 设置标题字体大小 */
}

.hnc-preview-category {
    display: inline-block;
    background: #22c55e;
    color: white;
    padding: 0.25em 0.75em;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 1em;
}

.hnc-preview-content {
    color: #15803d;
    line-height: 1.7;
    /* 从1.6增加到1.7 */
    font-size: 18px;
    /* 从14px增大到15px - 放大题目要求文字 */
    font-weight: 500;
    /* 添加字重 */
}

/* 按钮动效 */
.hnc-btn-pulse {
    position: relative;
    overflow: hidden;
}

.hnc-btn-pulse:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.hnc-btn-pulse:not(:disabled):active {
    transform: translateY(0);
}

/* 范文轮播样式 */
.hnc-sample-selector-wrapper {
    margin-top: 2em;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5em;
    border: 1px solid #e2e8f0;
}

.hnc-section-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
    color: #1e293b;
    font-weight: 600;
}

.hnc-step-icon {
    font-size: 1.2em;
}

.hnc-sample-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    margin: 1em 0;
}

.hnc-sample-carousel {
    flex: 1;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.hnc-sample-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hnc-carousel-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    margin: 0 0.5em;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.hnc-carousel-btn:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.hnc-carousel-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.hnc-sample-card-carousel {
    min-width: 100%;
    background: white;
    border-radius: 8px;
    padding: 1.5em;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.hnc-sample-card-carousel.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.hnc-sample-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin: 1em 0;
}

.hnc-sample-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.hnc-sample-indicator.active {
    background: #3b82f6;
    transform: scale(1.3);
}

.hnc-sample-actions {
    text-align: center;
    margin-top: 1em;
}

.hnc-btn-glow {
    position: relative;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.hnc-btn-glow:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    transform: translateY(-1px);
}

.hnc-btn-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.hnc-btn-glow:hover .hnc-btn-arrow {
    transform: translateX(3px);
}

/* 加载点动画 */
.hnc-loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.hnc-loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    animation: hnc-dot-pulse 1.4s infinite ease-in-out;
}

.hnc-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.hnc-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes hnc-dot-pulse {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.hnc-loading-samples {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
    padding: 2em;
    color: #64748b;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .hnc-sample-cards {
        grid-template-columns: 1 fr;
    }

    .hnc-modal-content {
        width: 95%;
        padding: 1em;
    }

    .hnc-modal-actions {
        flex-direction: column;
    }

    .hnc-topic-cards-container {
        grid-template-columns: 1fr;
    }

    .hnc-carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .hnc-sample-selector-wrapper {
        padding: 1em;
    }
}

/* 渐进式表单样式 */
.hnc-step-container {
    animation: hnc-fadeInUp 0.5s ease-out;
}

@keyframes hnc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hnc-prompt-display-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0284c7;
    border-left: 4px solid #0284c7;
    border-radius: 12px;
    padding: 1.5em;
    margin-bottom: 2em;
    animation: hnc-slideInLeft 0.6s ease-out;
}

@keyframes hnc-slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hnc-prompt-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 0.75em;
    font-size: 1.1em;
}

.hnc-prompt-content {
    color: #164e63;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.hnc-form-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1.5em;
    color: #1e293b;
}

.hnc-progressive-form {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.hnc-form-field {
    opacity: 0.4;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5em;
}

.hnc-form-field.hnc-field-active {
    opacity: 1;
    transform: translateY(0);
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.hnc-form-field.hnc-field-completed {
    opacity: 1;
    transform: translateY(0);
    background: #f0fdf4;
    border-color: #22c55e;
}

.hnc-field-label {
    display: flex;
    align-items: center;
    gap: 0.75em;
    margin-bottom: 0.75em;
    font-weight: 600;
    color: #374151;
}

.hnc-field-number {
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.hnc-form-field.hnc-field-completed .hnc-field-number {
    background: #22c55e;
}

.hnc-field-tip {
    font-size: 1.2em;
}

.hnc-form-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75em;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
    box-sizing: border-box;
}

.hnc-form-field.hnc-field-active textarea {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.hnc-form-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hnc-field-progress {
    height: 2px;
    background: #e2e8f0;
    border-radius: 1px;
    margin-top: 0.75em;
    overflow: hidden;
}

.hnc-field-progress::after {
    content: '';
    display: block;
    height: 100%;
    background: #3b82f6;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.hnc-form-field.hnc-field-active .hnc-field-progress::after,
.hnc-form-field.hnc-field-completed .hnc-field-progress::after {
    transform: translateX(0);
}

.hnc-form-field.hnc-field-completed .hnc-field-progress::after {
    background: #22c55e;
}

.hnc-step-actions {
    display: flex;
    gap: 1em;
    align-items: center;
    margin-top: 2em;
    flex-wrap: wrap;
}

.hnc-btn-magic {
    position: relative;
    background: linear-gradient(45deg, #8b5cf6, #3b82f6);
    padding: 0.8em 2em;
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
}

.hnc-btn-magic:not(:disabled):hover {
    background: linear-gradient(45deg, #7c3aed, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.hnc-btn-magic .hnc-btn-icon {
    margin-right: 0.5em;
    font-size: 1.2em;
}

.hnc-btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.hnc-btn-magic.loading .hnc-btn-loading {
    opacity: 1;
}

.hnc-btn-magic.loading>*:not(.hnc-btn-loading) {
    opacity: 0;
}

.hnc-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: hnc-spin 1s linear infinite;
}

/* AI 加载器样式 */
.hnc-result-container {
    animation: hnc-fadeInUp 0.5s ease-out;
}

.hnc-result-header {
    margin-bottom: 2em;
}

.hnc-result-title {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 1em;
    color: #1e293b;
}

.hnc-result-progress {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 1em;
    display: none;
}

.hnc-progress-bar {
    background: #e2e8f0;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5em;
}

.hnc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.hnc-progress-text {
    color: #64748b;
    font-size: 14px;
}

.hnc-ai-loader {
    text-align: center;
    padding: 3em 1em;
    background: linear-gradient(135deg, #fefbff 0%, #f0f9ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    margin: 2em 0;
}

.hnc-loader-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1em;
}

.hnc-ai-avatar {
    font-size: 2em;
    animation: hnc-bounce 2s infinite;
}

@keyframes hnc-bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: translateY(0);
    }

    40%,
    43% {
        transform: translateY(-10px);
    }

    70% {
        transform: translateY(-5px);
    }

    90% {
        transform: translateY(-2px);
    }
}

.hnc-loader-text {
    color: #4338ca;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1.5em;
}

.hnc-loader-steps {
    display: flex;
    justify-content: center;
    gap: 1em;
    flex-wrap: wrap;
}

.hnc-loader-step {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.5em 1em;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.hnc-loader-step.hnc-step-active {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

/* 错误消息样式 */
.hnc-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 1.5em;
    margin: 2em 0;
    display: flex;
    align-items: center;
    gap: 1em;
}

.hnc-error-icon {
    font-size: 1.5em;
    flex-shrink: 0;
}

.hnc-error-content {
    flex: 1;
    color: #dc2626;
    font-weight: 500;
}

.hnc-retry-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.hnc-retry-btn:hover {
    background: #b91c1c;
}

/* 结果展示样式 */
.hnc-result-sections {
    margin: 2em 0;
}

.hnc-result-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1em;
    overflow: hidden;
    animation: hnc-expandIn 0.5s ease-out;
}

@keyframes hnc-expandIn {
    from {
        opacity: 0;
        transform: scaleY(0.8);
    }

    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

.hnc-section-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1em 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.hnc-section-header:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.hnc-section-header-title {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-weight: 600;
    color: #374151;
}

.hnc-section-toggle {
    font-size: 1.2em;
    color: #64748b;
    transition: transform 0.3s;
}

.hnc-result-section.expanded .hnc-section-toggle {
    transform: rotate(180deg);
}

.hnc-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hnc-result-section.expanded .hnc-section-content {
    max-height: 1000px;
}

.hnc-section-body {
    padding: 1.5em;
}

/* 操作按钮样式 */
.hnc-result-actions {
    margin-top: 2em;
    padding: 1.5em;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

.hnc-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75em;
    width: 100%;
}

#hnc-cet4-workshop-section button.hnc-btn-action,
#hnc-cet4-workshop-section #hnc-cet4-copy-btn,
#hnc-cet4-workshop-section #hnc-cet4-save-btn,
#hnc-cet4-workshop-section #hnc-cet4-reset-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5em !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    min-width: 128px !important;
    height: 44px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    overflow: hidden !important;
}

#hnc-cet4-workshop-section button.hnc-btn-copy,
#hnc-cet4-workshop-section #hnc-cet4-copy-btn {
    background: #3b82f6 !important;
    color: white !important;
}

#hnc-cet4-workshop-section button.hnc-btn-copy:hover,
#hnc-cet4-workshop-section #hnc-cet4-copy-btn:hover {
    background: #2563eb !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

#hnc-cet4-workshop-section button.hnc-btn-save,
#hnc-cet4-workshop-section #hnc-cet4-save-btn {
    background: #059669 !important;
    color: white !important;
}

#hnc-cet4-workshop-section button.hnc-btn-save:hover,
#hnc-cet4-workshop-section #hnc-cet4-save-btn:hover {
    background: #047857 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3) !important;
}

#hnc-cet4-workshop-section button.hnc-btn-reset,
#hnc-cet4-workshop-section #hnc-cet4-reset-btn {
    background: #6b7280 !important;
    color: white !important;
}

#hnc-cet4-workshop-section button.hnc-btn-reset:hover,
#hnc-cet4-workshop-section #hnc-cet4-reset-btn:hover {
    background: #4b5563 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
}

.hnc-actions-feedback {
    margin-top: 1em;
    padding: 0.5em;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.hnc-actions-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* 额外动画和工具类 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* 轮播样式补充 */
.hnc-sample-carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hnc-sample-card-carousel {
    min-width: 100%;
    flex-shrink: 0;
}

/* 结果展示初始状态 */
.hnc-result-section {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 移动端触摸响应优化 */
@media (max-width: 768px) {
    .hnc-enhanced-select {
        font-size: 14px;
        padding: 0.6em 2em 0.6em 0.75em;
    }

    .hnc-topic-preview {
        padding: 1em;
        font-size: 13px;
    }

    .hnc-sample-tabs-nav {
        gap: 0.25em;
        padding-bottom: 0.25em;
    }

    .hnc-sample-tab {
        padding: 0.5em 1em;
        font-size: 13px;
    }

    .hnc-sample-content {
        padding: 1em;
        max-height: 300px;
        font-size: 14px;
    }

    .hnc-progressive-form {
        gap: 1em;
    }

    .hnc-form-field {
        padding: 1em;
    }

    .hnc-field-label {
        font-size: 14px;
    }

    .hnc-ai-loader {
        padding: 2em 1em;
    }

    .hnc-loader-steps {
        gap: 0.5em;
    }

    .hnc-loader-step {
        padding: 0.4em 0.8em;
        font-size: 12px;
    }

    .hnc-result-actions {
        padding: 1em;
    }

    /* 移动端保持写作工坊按钮的水平布局 */
    #hnc-cet4-workshop-section #hnc-cet4-result-actions .hnc-actions-grid {
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 0.75em !important;
    }

    #hnc-cet4-workshop-section button.hnc-btn-action,
    #hnc-cet4-workshop-section #hnc-cet4-copy-btn,
    #hnc-cet4-workshop-section #hnc-cet4-save-btn,
    #hnc-cet4-workshop-section #hnc-cet4-reset-btn {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
        font-size: 13px !important;
        padding: 6px 8px !important;
        flex-shrink: 0 !important;
    }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    .hnc-topic-card:hover {
        transform: none;
    }

    .hnc-carousel-btn:hover {
        transform: none;
    }

    .hnc-btn-magic:hover {
        transform: none;
    }

    .hnc-section-header:hover {
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    }
}

/* 保存成功/失败反馈消息样式 */
.hnc-success-message,
.hnc-error-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hnc-success-icon,
.hnc-error-icon {
    font-size: 18px;
    margin-top: 2px;
}

.hnc-success-text,
.hnc-error-text {
    flex: 1;
    line-height: 1.5;
}

.hnc-success-text strong,
.hnc-error-text strong {
    font-size: 16px;
    font-weight: 600;
}

.hnc-actions-feedback {
    margin-top: 1em;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

@media (max-width: 768px) {

    .hnc-success-message,
    .hnc-error-message {
        flex-direction: row;
        gap: 8px;
    }

    .hnc-success-text,
    .hnc-error-text {
        font-size: 13px;
    }

    .hnc-actions-feedback {
        padding: 12px !important;
        font-size: 13px;
    }
}

/* === 新增：Stepper 进度条样式 === */
.hnc-stepper-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2em;
    padding: 0 1em;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hnc-stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    gap: 8px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.hnc-stepper-item.active {
    opacity: 1;
}

.hnc-step-circle {
    width: 32px;
    height: 32px;
    background-color: #f1f5f9;
    border: 2px solid #cbd5e1;
    color: #64748b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hnc-stepper-item.active .hnc-step-circle {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    transform: scale(1.1);
}

.hnc-stepper-item.completed .hnc-step-circle {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

.hnc-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.hnc-stepper-item.active .hnc-step-label {
    color: #3b82f6;
}

.hnc-stepper-line {
    flex-grow: 1;
    height: 2px;
    background-color: #e2e8f0;
    margin: 0 10px;
    position: relative;
    top: -14px;
    /* Adjust based on label height */
    z-index: 1;
}

/* === 新增：现代化 Info Card 样式 === */
.hnc-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 1em 1.25em;
    display: flex;
    align-items: flex-start;
    /* Align top for better multiline support */
    gap: 1em;
    margin: 1.5em 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.hnc-info-icon-wrapper {
    background-color: #eff6ff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hnc-info-icon {
    font-size: 18px;
}

.hnc-info-content {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    flex-grow: 1;
}

.hnc-info-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
    vertical-align: middle;
}

/* === 优化：Topic Preview (White Card Style) === */
.hnc-topic-preview {
    background: #ffffff !important;
    /* Override gradient */
    border: 1px solid #e2e8f0 !important;
    border-top: 3px solid #22c55e !important;
    border-radius: 8px !important;
    padding: 1.5em !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    margin-top: 1.5em !important;
}

.hnc-preview-content {
    color: #334155 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    /* Lighter weight for better reading */
    line-height: 1.7 !important;
}

.hnc-preview-category {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0;
}

/* === 优化：Sample Tabs (Pill Style) === */
.hnc-sample-tabs-nav {
    border-bottom: none !important;
    /* Remove line */
    background: #f8fafc;
    padding: 0.5em;
    border-radius: 8px;
    gap: 0 !important;
}

.hnc-sample-tab {
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    margin: 0 !important;
    color: #64748b !important;
    font-weight: 500 !important;
    padding: 0.6em 1.25em !important;
}

.hnc-sample-tab:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    color: #334155 !important;
}

.hnc-sample-tab.active {
    background: #ffffff !important;
    color: #3b82f6 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 600 !important;
}

.hnc-sample-content {
    border: none !important;
    /* Remove border from content box */
    background: transparent !important;
    padding: 1em 0.5em !important;
    /* Reduce padding since container is transparent */
    box-shadow: none !important;
}

/* === 优化：Typography & Buttons === */
#hnc-cet4-workshop-section h4 {
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* === Button Styles from Daily News === */
.hnc-btn-primary,
#hnc-cet4-next-btn-1,
#hnc-sample-continue,
#hnc-cet4-generate-btn {
    background: #3b82f6;
    color: #ffffff;
    border: 1px solid #3b82f6;
    padding: 10px 18px;
    /* Slightly wider padding */
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.18);
    font-size: 15px;
    /* Ensure specific font size */
}

.hnc-btn-primary:hover,
#hnc-cet4-next-btn-1:hover,
#hnc-sample-continue:hover,
#hnc-cet4-generate-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.hnc-btn-primary:disabled,
#hnc-cet4-next-btn-1:disabled,
#hnc-sample-continue:disabled,
#hnc-cet4-generate-btn:disabled {
    background: #94a3b8;
    border-color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Force remove any pseudo-element content for icons if present */
.hnc-info-icon::before,
.hnc-info-icon::after,
.hnc-btn-icon::before,
.hnc-btn-icon::after,
.hnc-step-icon::before,
.hnc-step-icon::after,
.hnc-preview-icon::before,
.hnc-preview-icon::after {
    content: none !important;
}

.hnc-enhanced-select {
    padding: 0.8em 2.5em 0.8em 1em !important;
    /* More padding */
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #334155;
}

