/* =============================================
   简历优化 - resume_optimization.css
   主题色：翡翠绿 #059669 / 青绿 #0d9488
   三栏布局：历史 | 表单 | 结果
   ============================================= */

/* ========== 主容器 ========== */
.ro-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f0fdf4;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.12);
    transition: all 0.3s ease;
}

.ro-container.fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    min-height: unset;
}

/* ========== 顶部工具栏 ========== */
.ro-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    min-height: 40px;
    background: linear-gradient(135deg, #065f46 0%, #059669 50%, #0d9488 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.45);
    flex-shrink: 0;
}

.ro-toolbar .toolbar-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.ro-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.8px;
    margin-right: 4px;
}

.ro-toolbar .toolbar-btn {
    padding: 4px 11px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #065f46;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.5;
}

.ro-toolbar .toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.ro-toolbar .toolbar-btn:active:not(:disabled) { transform: translateY(0); }

.ro-toolbar .toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ro-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255, 255, 255, 0.4);
}

.ro-toolbar .toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #047857;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.6);
}

/* 生成中 shimmer 动画 */
.ro-toolbar .toolbar-btn-primary.ro-btn-loading {
    background: linear-gradient(90deg, #a7f3d0 0%, #d1fae5 35%, #a7f3d0 65%, #6ee7b7 100%);
    background-size: 200% 100%;
    animation: roBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
    color: #065f46;
}

body.dark .ro-toolbar .toolbar-btn-primary.ro-btn-loading {
    background: linear-gradient(90deg, #064e3b 0%, #065f46 35%, #064e3b 65%, #065f46 100%);
    background-size: 200% 100%;
    animation: roBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
    color: #a7f3d0;
}

@keyframes roBtnShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 三栏主内容 ========== */
.ro-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f0fdf4;
}

/* ========== 左栏：历史记录 ========== */
.ro-history-panel {
    width: 185px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #a7f3d0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ro-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #ecfdf5 0%, #f0fdf4 100%);
    border-bottom: 1px solid #a7f3d0;
    flex-shrink: 0;
}

.ro-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #064e3b;
}

.ro-history-count {
    font-size: 11px;
    color: #059669;
    font-weight: 400;
}

.ro-history-clear-btn {
    background: #ecfdf5;
    border: none;
    color: #059669;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}
.ro-history-clear-btn:hover { background: #a7f3d0; }

.ro-history-search {
    padding: 7px;
    border-bottom: 1px solid #a7f3d0;
    flex-shrink: 0;
}

.ro-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #6ee7b7;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #064e3b;
    background: #ecfdf5;
}

.ro-history-search input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.18);
}

.ro-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.ro-history-list::-webkit-scrollbar { width: 4px; }
.ro-history-list::-webkit-scrollbar-track { background: transparent; }
.ro-history-list::-webkit-scrollbar-thumb { background: #6ee7b7; border-radius: 2px; }
.ro-history-list::-webkit-scrollbar-thumb:hover { background: #059669; }

.ro-history-empty {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    padding: 20px 10px;
    line-height: 1.7;
}

.ro-history-item {
    display: flex;
    align-items: flex-start;
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    gap: 6px;
}

.ro-history-item:hover { background: #ecfdf5; }
.ro-history-item.active { background: #d1fae5; box-shadow: inset 3px 0 0 #059669; }

.ro-history-item-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

.ro-history-item-info {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ro-history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ro-history-item-time {
    font-size: 10px;
    color: #9ca3af;
}

.ro-history-item-del {
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 0 2px;
    font-size: 13px;
    flex-shrink: 0;
    transition: color 0.15s;
    line-height: 1;
}
.ro-history-item-del:hover { color: #ef4444; }

/* ========== 中栏：表单 ========== */
.ro-form-panel {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #a7f3d0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ro-panel-header {
    padding: 10px 14px 8px;
    background: linear-gradient(to bottom, #ecfdf5 0%, #fff 100%);
    border-bottom: 1px solid #a7f3d0;
    flex-shrink: 0;
}

.ro-panel-header h3 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #064e3b;
}

.ro-panel-tip {
    font-size: 11px;
    color: #6b7280;
}

.ro-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ro-form-body::-webkit-scrollbar { width: 4px; }
.ro-form-body::-webkit-scrollbar-track { background: transparent; }
.ro-form-body::-webkit-scrollbar-thumb { background: #6ee7b7; border-radius: 2px; }
.ro-form-body::-webkit-scrollbar-thumb:hover { background: #059669; }

.ro-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ro-form-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ro-required { color: #ef4444; font-size: 13px; }
.ro-optional-tag {
    font-weight: 400;
    font-size: 10px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 3px;
}

.ro-shortcut-hint {
    font-weight: 400;
    font-size: 10px;
    color: #9ca3af;
    margin-left: auto;
}

.ro-form-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #1f2937;
    background: #fff;
}

.ro-form-input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.ro-form-textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    color: #1f2937;
    background: #fff;
    font-family: inherit;
    line-height: 1.5;
}

.ro-notes-textarea { min-height: 56px; resize: vertical; }

.ro-form-textarea:focus {
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.ro-char-counter {
    font-size: 10px;
    color: #9ca3af;
    text-align: right;
}
.ro-char-counter.count-warning { color: #eab308; }
.ro-char-counter.count-danger  { color: #ef4444; font-weight: 600; }

/* 行业标签 */
.ro-industry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

.ro-industry-tag {
    padding: 3px 9px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 20px;
    font-size: 11px;
    color: #065f46;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.ro-industry-tag:hover { background: #a7f3d0; }
.ro-industry-tag.active {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

/* 求职阶段选项 */
.ro-stage-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ro-stage-btn {
    padding: 5px 12px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    color: #374151;
}

.ro-stage-btn:hover { border-color: #059669; background: #ecfdf5; color: #065f46; }
.ro-stage-btn.selected {
    background: #059669;
    border-color: #059669;
    color: #fff;
    font-weight: 600;
}

/* 优化重点多选 */
.ro-focus-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ro-focus-btn {
    padding: 5px 10px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    color: #374151;
}

.ro-focus-btn:hover { border-color: #059669; background: #ecfdf5; color: #065f46; }
.ro-focus-btn.selected {
    background: #d1fae5;
    border-color: #059669;
    color: #065f46;
    font-weight: 600;
}

/* 简历风格 */
.ro-style-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ro-style-btn {
    padding: 5px 10px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    color: #374151;
}

.ro-style-btn:hover { border-color: #059669; background: #ecfdf5; color: #065f46; }
.ro-style-btn.selected {
    background: #059669;
    border-color: #059669;
    color: #fff;
    font-weight: 600;
}

/* 输入验证错误态 */
.ro-form-input.ro-input-error,
.ro-form-textarea.ro-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15) !important;
    animation: roShakeInput 0.35s ease-out;
}

@keyframes roShakeInput {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-4px); }
    60%       { transform: translateX(4px); }
    80%       { transform: translateX(-2px); }
}

/* 提交按钮 */
.ro-form-submit-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.ro-form-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #047857 0%, #0f766e 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
}

.ro-form-submit-btn:active:not(:disabled) { transform: translateY(0); }

.ro-form-submit-btn:disabled,
.ro-form-submit-btn.ro-btn-loading {
    background: linear-gradient(90deg, #a7f3d0 0%, #d1fae5 35%, #a7f3d0 65%, #6ee7b7 100%);
    background-size: 200% 100%;
    animation: roBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
    color: #065f46;
}

/* ========== 右栏：结果区 ========== */
.ro-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f0fdf4;
}

.ro-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #ecfdf5 0%, #f0fdf4 100%);
    border-bottom: 1px solid #a7f3d0;
    flex-shrink: 0;
}

.ro-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #064e3b;
}

.ro-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ro-meta-badge {
    padding: 3px 10px;
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ro-refresh-btn {
    padding: 3px 9px;
    background: #ecfdf5;
    border: 1px solid #059669;
    color: #059669;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.ro-refresh-btn:hover { background: #059669; color: #fff; }

.ro-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.ro-result-body::-webkit-scrollbar { width: 5px; }
.ro-result-body::-webkit-scrollbar-track { background: transparent; }
.ro-result-body::-webkit-scrollbar-thumb { background: #6ee7b7; border-radius: 3px; }
.ro-result-body::-webkit-scrollbar-thumb:hover { background: #059669; }

/* 占位区 */
.ro-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    color: #6b7280;
    padding: 20px;
}

.ro-placeholder-icon {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: 0.7;
    animation: roPlaceholderFloat 3s ease-in-out infinite;
}

@keyframes roPlaceholderFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}
.ro-placeholder-title { font-size: 16px; font-weight: 600; color: #374151; margin: 0 0 8px; }
.ro-placeholder-desc { font-size: 13px; color: #6b7280; margin: 3px 0; }

.ro-placeholder-checklist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    text-align: left;
}

.ro-check-item {
    font-size: 12px;
    color: #065f46;
    background: #ecfdf5;
    padding: 6px 12px;
    border-radius: 4px;
    border-left: 3px solid #059669;
}

/* 加载动画 */
.ro-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
}

.ro-loading-icons {
    display: flex;
    gap: 12px;
    font-size: 28px;
}

.ro-loading-icons span {
    animation: roIconFloat 1.6s ease-in-out infinite;
    display: inline-block;
}
.ro-loading-icons span:nth-child(1) { animation-delay: 0s; }
.ro-loading-icons span:nth-child(2) { animation-delay: 0.3s; }
.ro-loading-icons span:nth-child(3) { animation-delay: 0.6s; }

@keyframes roIconFloat {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%       { transform: translateY(-8px); opacity: 1; }
}

.ro-loading-text {
    font-size: 14px;
    color: #059669;
    font-weight: 500;
    margin: 0;
}

/* 结果内容 */
.ro-result-content {
    display: none;
}

.ro-result-enter {
    animation: roResultFadeIn 0.35s ease-out forwards;
}

@keyframes roResultFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== AI 输出结果样式 ========== */
.ro-result-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ro-result-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #d1fae5;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.08);
}

.ro-optimized-section {
    border-color: #059669;
    border-width: 2px;
}

.ro-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(to right, #ecfdf5, #f0fdf4);
    border-bottom: 1px solid #d1fae5;
    font-size: 13px;
    font-weight: 700;
    color: #064e3b;
}

.ro-optimized-section .ro-section-title {
    background: linear-gradient(to right, #d1fae5, #ecfdf5);
    border-bottom-color: #a7f3d0;
}

.ro-section-icon { font-size: 15px; }

/* 优化后简历内容 */
.ro-resume-content {
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.7;
    color: #1f2937;
}

.ro-resume-block { margin-bottom: 14px; }
.ro-resume-block:last-child { margin-bottom: 0; }

.ro-block-title {
    font-size: 13px;
    font-weight: 700;
    color: #059669;
    border-bottom: 1px dashed #a7f3d0;
    padding-bottom: 4px;
    margin-bottom: 6px;
}

.ro-resume-content ul { margin: 4px 0; padding-left: 18px; }
.ro-resume-content li { margin-bottom: 3px; font-size: 12px; color: #374151; }
.ro-resume-content li::marker { color: #059669; }
.ro-resume-content p { margin: 4px 0; font-size: 12px; color: #374151; }

/* Markdown 基础标签样式（规范覆盖） */
.ro-resume-content strong { font-weight: 700; color: #065f46; }
.ro-resume-content em { font-style: italic; color: #374151; }
.ro-resume-content h3 { font-size: 13px; font-weight: 700; color: #059669; margin: 10px 0 5px; }
.ro-resume-content h4 { font-size: 12px; font-weight: 600; color: #065f46; margin: 8px 0 4px; }
.ro-resume-content h5 { font-size: 12px; font-weight: 500; color: #6b7280; margin: 6px 0 3px; }
.ro-resume-content pre {
    background: #f0fdf4;
    border: 1px solid #a7f3d0;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 11px;
    overflow-x: auto;
    margin: 6px 0;
    font-family: 'Courier New', monospace;
}
.ro-resume-content code {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
    color: #065f46;
    font-family: 'Courier New', monospace;
}
.ro-resume-content blockquote {
    border-left: 3px solid #059669;
    margin: 6px 0;
    padding: 4px 10px;
    background: #f0fdf4;
    color: #374151;
    font-style: italic;
    font-size: 12px;
    border-radius: 0 4px 4px 0;
}

/* 改进说明 */
.ro-improve-list {
    list-style: none;
    padding: 10px 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ro-improve-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    line-height: 1.6;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 5px;
    border-left: 3px solid #059669;
}

.ro-improve-label {
    font-weight: 600;
    color: #059669;
    flex-shrink: 0;
    white-space: nowrap;
}

.ro-improve-reason { color: #374151; }

/* 关键词 */
.ro-keyword-wrap {
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ro-keyword-tag {
    padding: 4px 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    border-radius: 20px;
    font-size: 12px;
    color: #065f46;
    font-weight: 500;
    cursor: default;
    transition: all 0.2s;
    user-select: none;
}
.ro-keyword-tag:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

/* 评分 */
.ro-score-section { border-color: #fbbf24; }
.ro-score-section .ro-section-title {
    background: linear-gradient(to right, #fffbeb, #fef3c7);
    border-bottom-color: #fde68a;
    color: #92400e;
}

.ro-score-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 14px 8px;
}

.ro-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ro-score-label { font-size: 11px; color: #6b7280; }
.ro-score-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
}
.ro-score-before { color: #f59e0b; }
.ro-score-after  { color: #059669; }
.ro-score-unit   { font-size: 11px; color: #9ca3af; }
.ro-score-arrow  {
    font-size: 22px;
    color: #d1d5db;
    display: flex;
    align-items: center;
    padding-top: 14px;
}

/* 评分进度条 */
.ro-score-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 14px 12px;
}
.ro-score-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6b7280;
}
.ro-score-bar-label { width: 40px; flex-shrink: 0; text-align: right; }
.ro-score-bar-track {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}
.ro-score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease-out;
    width: 0;
}
.ro-score-bar-fill.bar-before { background: linear-gradient(to right, #fde68a, #f59e0b); }
.ro-score-bar-fill.bar-after  { background: linear-gradient(to right, #6ee7b7, #059669); }

.ro-score-bar-num {
    font-size: 11px;
    font-weight: 600;
    min-width: 24px;
    text-align: right;
}
.ro-score-bar-num.bar-num-before { color: #f59e0b; }
.ro-score-bar-num.bar-num-after  { color: #059669; }

.ro-score-tip {
    margin: 0 14px 12px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    background: #fffbeb;
    padding: 8px 10px;
    border-radius: 4px;
}

/* 错误提示外层容器：与 placeholder/loading 保持高度和居中一致 */
#roResultError {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 20px;
}

/* 错误提示 */
.ro-result-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}
.ro-error-icon { font-size: 22px; flex-shrink: 0; }
.ro-error-body { flex: 1; }
.ro-error-msg { margin: 0 0 4px; font-size: 13px; color: #b91c1c; font-weight: 500; }
.ro-error-tip { margin: 0 0 10px; font-size: 12px; color: #6b7280; }
.ro-retry-btn {
    padding: 6px 16px;
    background: #059669;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.ro-retry-btn:hover { background: #047857; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25); }

/* Toast 提示 */
.ro-tip-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(5, 150, 105, 0.92);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    white-space: nowrap;
}
.ro-tip-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 示例模态框 ========== */
.ro-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
}
.ro-modal-overlay.show { display: block; }

.ro-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, 94vw);
    max-height: 80vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    flex-direction: column;
    overflow: hidden;
}
.ro-modal.show { display: flex; }

.ro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    color: #fff;
    flex-shrink: 0;
}
.ro-modal-header h3 { margin: 0; font-size: 14px; }

.ro-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 26px; height: 26px;
    border-radius: 50%;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.ro-modal-close:hover { background: rgba(255, 255, 255, 0.35); }

.ro-modal-body {
    overflow-y: auto;
    padding: 14px;
    flex: 1;
}

.ro-modal-body::-webkit-scrollbar { width: 5px; }
.ro-modal-body::-webkit-scrollbar-track { background: transparent; }
.ro-modal-body::-webkit-scrollbar-thumb { background: #6ee7b7; border-radius: 3px; }
.ro-modal-body::-webkit-scrollbar-thumb:hover { background: #059669; }

.ro-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.ro-example-card {
    padding: 10px 12px;
    border: 1px solid #d1fae5;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}
.ro-example-card:hover {
    border-color: #059669;
    background: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.ro-example-name {
    font-size: 13px;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 4px;
}

.ro-example-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.5;
}

/* ========== 暗黑模式 ========== */
body.dark .ro-container {
    background: #0d1f17;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .ro-toolbar {
    background: linear-gradient(135deg, #022c22 0%, #064e3b 50%, #0f3d38 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

body.dark .ro-toolbar .toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #a7f3d0;
}
body.dark .ro-toolbar .toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}

body.dark .ro-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: #a7f3d0;
}
body.dark .ro-toolbar .toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    color: #d1fae5;
}

body.dark .ro-main-content { background: #0d1f17; }

body.dark .ro-history-panel {
    background: #1a2e23;
    border-right-color: #1e4d35;
}
body.dark .ro-history-header {
    background: linear-gradient(to bottom, #122b1c, #1a2e23);
    border-bottom-color: #1e4d35;
}
body.dark .ro-history-header h3 { color: #a7f3d0; }
body.dark .ro-history-count { color: #6ee7b7; }
body.dark .ro-history-clear-btn { background: #1e4d35; color: #6ee7b7; }
body.dark .ro-history-clear-btn:hover { background: #065f46; }

body.dark .ro-history-search { border-bottom-color: #1e4d35; }
body.dark .ro-history-search input {
    background: #122b1c;
    border-color: #1e4d35;
    color: #d1fae5;
}
body.dark .ro-history-search input:focus { border-color: #059669; }

body.dark .ro-history-list::-webkit-scrollbar-thumb { background: #1e4d35; }
body.dark .ro-history-list::-webkit-scrollbar-thumb:hover { background: #059669; }

body.dark .ro-history-empty { color: #6b7280; }

body.dark .ro-history-item { border-bottom-color: #1a2e23; }
body.dark .ro-history-item:hover { background: #1e4d35; }
body.dark .ro-history-item.active { background: #065f46; box-shadow: inset 3px 0 0 #34d399; }
body.dark .ro-history-item-title { color: #6ee7b7; }
body.dark .ro-history-item-time { color: #6b7280; }

body.dark .ro-form-panel {
    background: #1a2e23;
    border-right-color: #1e4d35;
}
body.dark .ro-panel-header {
    background: linear-gradient(to bottom, #122b1c, #1a2e23);
    border-bottom-color: #1e4d35;
}
body.dark .ro-panel-header h3 { color: #a7f3d0; }
body.dark .ro-panel-tip { color: #6b7280; }

body.dark .ro-form-body::-webkit-scrollbar-thumb { background: #1e4d35; }
body.dark .ro-form-body::-webkit-scrollbar-thumb:hover { background: #059669; }

body.dark .ro-form-label { color: #d1fae5; }
body.dark .ro-optional-tag { background: #1e4d35; color: #9ca3af; }
body.dark .ro-shortcut-hint { color: #6b7280; }

body.dark .ro-form-input {
    background: #122b1c;
    border-color: #1e4d35;
    color: #d1fae5;
}
body.dark .ro-form-input:focus { border-color: #059669; }

body.dark .ro-form-textarea {
    background: #122b1c;
    border-color: #1e4d35;
    color: #d1fae5;
}
body.dark .ro-form-textarea:focus { border-color: #059669; }
body.dark .ro-char-counter { color: #6b7280; }
body.dark .ro-char-counter.count-warning { color: #eab308; }
body.dark .ro-char-counter.count-danger  { color: #ef4444; font-weight: 600; }

body.dark .ro-industry-tag {
    background: #1e4d35;
    border-color: #065f46;
    color: #a7f3d0;
}
body.dark .ro-industry-tag:hover { background: #065f46; }
body.dark .ro-industry-tag.active { background: #059669; border-color: #059669; color: #fff; }

body.dark .ro-stage-btn, body.dark .ro-focus-btn, body.dark .ro-style-btn {
    background: #122b1c;
    border-color: #1e4d35;
    color: #d1fae5;
}
body.dark .ro-stage-btn:hover, body.dark .ro-focus-btn:hover, body.dark .ro-style-btn:hover {
    border-color: #059669;
    background: #1e4d35;
    color: #a7f3d0;
}
body.dark .ro-stage-btn.selected, body.dark .ro-style-btn.selected {
    background: #059669;
    border-color: #059669;
    color: #fff;
}
body.dark .ro-focus-btn.selected {
    background: #065f46;
    border-color: #34d399;
    color: #a7f3d0;
}

body.dark .ro-form-submit-btn:not(:disabled):not(.ro-btn-loading) {
    background: linear-gradient(135deg, #047857 0%, #0f766e 100%);
}
body.dark .ro-form-submit-btn:hover:not(:disabled):not(.ro-btn-loading) {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}
body.dark .ro-form-submit-btn:disabled,
body.dark .ro-form-submit-btn.ro-btn-loading {
    background: linear-gradient(90deg, #064e3b 0%, #065f46 35%, #064e3b 65%, #065f46 100%);
    background-size: 200% 100%;
    animation: roBtnShimmer 1.4s ease-in-out infinite;
    color: #a7f3d0;
}

body.dark .ro-result-panel { background: #0d1f17; }
body.dark .ro-result-header {
    background: linear-gradient(to bottom, #122b1c, #0d1f17);
    border-bottom-color: #1e4d35;
}
body.dark .ro-result-header h3 { color: #a7f3d0; }

body.dark .ro-result-body::-webkit-scrollbar-thumb { background: #1e4d35; }
body.dark .ro-result-body::-webkit-scrollbar-thumb:hover { background: #059669; }

body.dark .ro-placeholder-title { color: #d1fae5; }
body.dark .ro-placeholder-desc { color: #6b7280; }
body.dark .ro-check-item {
    background: #1e4d35;
    color: #a7f3d0;
    border-left-color: #34d399;
}

body.dark .ro-loading-text { color: #34d399; }

body.dark .ro-result-section {
    background: #1a2e23;
    border-color: #1e4d35;
}
body.dark .ro-optimized-section { border-color: #065f46; }
body.dark .ro-section-title {
    background: linear-gradient(to right, #122b1c, #1a2e23);
    border-bottom-color: #1e4d35;
    color: #a7f3d0;
}
body.dark .ro-optimized-section .ro-section-title {
    background: linear-gradient(to right, #1e4d35, #122b1c);
    border-bottom-color: #065f46;
}

body.dark .ro-resume-content { color: #d1fae5; }
body.dark .ro-block-title { color: #34d399; border-bottom-color: #1e4d35; }
body.dark .ro-resume-content li::marker { color: #34d399; }
body.dark .ro-resume-content li,
body.dark .ro-resume-content p { color: #9ca3af; }

/* Markdown 标签暗黑模式 */
body.dark .ro-resume-content strong { color: #34d399; }
body.dark .ro-resume-content em { color: #a7f3d0; }
body.dark .ro-resume-content h3 { color: #34d399; }
body.dark .ro-resume-content h4 { color: #6ee7b7; }
body.dark .ro-resume-content h5 { color: #9ca3af; }
body.dark .ro-resume-content pre {
    background: #0d1f17;
    border-color: #1e4d35;
    color: #a7f3d0;
}
body.dark .ro-resume-content code {
    background: #1e4d35;
    border-color: #065f46;
    color: #a7f3d0;
}
body.dark .ro-resume-content blockquote {
    border-left-color: #34d399;
    background: #122b1c;
    color: #9ca3af;
}

body.dark .ro-improve-item { background: #122b1c; border-left-color: #34d399; }
body.dark .ro-improve-label { color: #34d399; }
body.dark .ro-improve-reason { color: #9ca3af; }

body.dark .ro-keyword-tag {
    background: linear-gradient(135deg, #1e4d35 0%, #122b1c 100%);
    border-color: #065f46;
    color: #a7f3d0;
}
body.dark .ro-keyword-tag:hover {
    background: linear-gradient(135deg, #065f46 0%, #1e4d35 100%);
    border-color: #34d399;
    box-shadow: 0 2px 6px rgba(52, 211, 153, 0.15);
}

body.dark .ro-score-section { border-color: #92400e; }
body.dark .ro-score-section .ro-section-title {
    background: linear-gradient(to right, #1c1207, #1f1508);
    border-bottom-color: #92400e;
    color: #fde68a;
}
body.dark .ro-score-tip { background: #1c1207; color: #9ca3af; }
body.dark .ro-score-bar-track { background: #1a2e23; }
body.dark .ro-score-label { color: #9ca3af; }
body.dark .ro-score-bar-label { color: #9ca3af; }
body.dark .ro-score-bar-num.bar-num-before { color: #fbbf24; }
body.dark .ro-score-bar-num.bar-num-after  { color: #34d399; }

body.dark .ro-refresh-btn {
    background: #122b1c;
    border-color: #059669;
    color: #6ee7b7;
}
body.dark .ro-refresh-btn:hover { background: #059669; color: #fff; }

body.dark .ro-modal {
    background: #1a2e23;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
body.dark .ro-modal-header {
    background: linear-gradient(135deg, #022c22 0%, #064e3b 100%);
}
body.dark .ro-modal-body::-webkit-scrollbar-thumb { background: #1e4d35; }
body.dark .ro-modal-body::-webkit-scrollbar-thumb:hover { background: #059669; }

body.dark .ro-example-card {
    background: #122b1c;
    border-color: #1e4d35;
}
body.dark .ro-example-card:hover {
    border-color: #059669;
    background: #1e4d35;
}
body.dark .ro-example-name { color: #a7f3d0; }
body.dark .ro-example-desc { color: #6b7280; }

body.dark .ro-tip-toast { background: rgba(6, 78, 59, 0.95); }

body.dark .ro-result-error { background: #2a1515; border-color: #7f1d1d; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12); }
body.dark .ro-error-msg { color: #fca5a5; }
body.dark .ro-error-tip { color: #9ca3af; }
body.dark .ro-retry-btn { background: #065f46; color: #a7f3d0; }
body.dark .ro-retry-btn:hover { background: #059669; color: #fff; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .ro-history-panel { display: none; }
    .ro-form-panel { width: 300px; }
}

@media (max-width: 640px) {
    .ro-main-content { flex-direction: column; }
    .ro-form-panel { width: 100%; border-right: none; border-bottom: 1px solid #a7f3d0; height: 45vh; }
    .ro-result-panel { height: 55vh; }
    .ro-toolbar .toolbar-title { display: none; }
}
