/* =============================================
   穿搭助手 - outfit_assistant.css
   时尚玫瑰渐变主题，三栏布局
   ============================================= */

/* ========== 主容器 ========== */
.oa-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fdf4f8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(244, 63, 94, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #fce7f3;
}

/* 全屏模式 */
.oa-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;
    border: none;
}

/* ========== 顶部工具栏 ========== */
.oa-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 7px 12px;
    background: linear-gradient(135deg, #f43f5e 0%, #be185d 60%, #9d174d 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(244, 63, 94, 0.35);
    flex-shrink: 0;
    min-height: 36px;
}

/* 工具栏标题 */
.oa-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
    margin-right: 8px;
}

/* 工具栏按钮组 */
.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* 全屏按钮右对齐 */
.toolbar-group--right {
    margin-left: auto;
}

.toolbar-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #be185d;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 主操作按钮（生成搭配）*/
.toolbar-btn-primary {
    background: linear-gradient(135deg, #fff7ed 0%, #ffe4e6 100%);
    color: #be185d;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: #fff;
    color: #9d174d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== Shake 抖动动画 ========== */
@keyframes oaShake {
    0%, 100% { transform: translateX(0); }
    15%, 55%, 85% { transform: translateX(-5px); }
    35%, 70% { transform: translateX(5px); }
}

.oa-input.shake,
.oa-select.shake,
.oa-textarea.shake {
    animation: oaShake 0.5s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

/* ========== 主内容区：三栏 ========== */
.oa-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fdf4f8;
}

/* ========== 左栏：历史记录 ========== */
.oa-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fce7f3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fff9fb 0%, #fdf2f8 100%);
    border-bottom: 1px solid #fce7f3;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #9d174d;
}

.history-count {
    font-size: 11px;
    color: #fda4af;
    font-weight: 400;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

.history-clear-btn:hover {
    background: #fde8e8;
}

.history-search {
    padding: 8px;
    border-bottom: 1px solid #fce7f3;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #fce7f3;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #374151;
    background: #fdf9fb;
}

.history-search input:focus {
    border-color: #f43f5e;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.1);
    background: #fff;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

/* 滚动条美化 */
.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: transparent; }
.history-list:hover::-webkit-scrollbar-track { background: #fff0f5; }
.history-list::-webkit-scrollbar-thumb { background: #fca5a5; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #f43f5e; }

.history-empty {
    text-align: center;
    color: #fda4af;
    font-size: 12px;
    padding: 28px 8px;
    user-select: none;
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 9px 11px;
    margin: 3px 0;
    background: #fff9fb;
    border: 1px solid #fce7f3;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: oaHiFadeIn 0.2s ease;
}

@keyframes oaHiFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to   { opacity: 1; transform: translateX(0); }
}

.history-item:hover {
    background: #fff0f5;
    border-color: #fecdd3;
    transform: translateX(2px);
}

.history-item.active {
    background: #ffe4e6;
    border-color: #fda4af;
    box-shadow: 0 1px 3px rgba(244, 63, 94, 0.18);
}

.history-item-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-del { opacity: 1; }

.history-item-del:hover {
    background: #ef4444;
    color: #fff;
}

.history-item-title {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 20px;
    margin-bottom: 2px;
}

.history-item-sub {
    font-size: 11px;
    color: #f43f5e;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 10px;
    color: #94a3b8;
}

/* ========== 中栏：表单输入 ========== */
.oa-input-panel {
    width: 360px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #fce7f3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== 右栏：结果展示 ========== */
.oa-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 300px;
}

/* ========== 通用面板头部 ========== */
.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: linear-gradient(to bottom, #fff9fb 0%, #fdf4f8 100%);
    border-bottom: 1px solid #fce7f3;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #9d174d;
    white-space: nowrap;
}

.panel-tip {
    font-size: 11px;
    color: #fda4af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.result-meta-subject {
    font-size: 11px;
    color: #be185d;
    background: #ffe4e6;
    padding: 2px 10px;
    border-radius: 10px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

.result-time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ========== 表单区域 ========== */
.oa-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.oa-input-body::-webkit-scrollbar { width: 4px; }
.oa-input-body::-webkit-scrollbar-track { background: transparent; }
.oa-input-body:hover::-webkit-scrollbar-track { background: #fff0f5; }
.oa-input-body::-webkit-scrollbar-thumb { background: #fca5a5; border-radius: 2px; }
.oa-input-body::-webkit-scrollbar-thumb:hover { background: #f43f5e; }

.form-group {
    margin-bottom: 13px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.required-mark { color: #f43f5e; margin-left: 2px; }

.label-tip {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
}

.oa-input,
.oa-select,
.oa-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #fce7f3;
    border-radius: 5px;
    font-size: 13px;
    color: #374151;
    background: #fff9fb;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.oa-input:focus,
.oa-select:focus,
.oa-textarea:focus {
    border-color: #f43f5e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.08);
}

.oa-input:hover:not(:focus),
.oa-select:hover:not(:focus),
.oa-textarea:hover:not(:focus) {
    border-color: #fecdd3;
    background: #fff;
}

.oa-input::placeholder,
.oa-textarea::placeholder {
    color: #c4b5c0;
}

.oa-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.6;
}

/* 性别选择组 */
.gender-group {
    display: flex;
    gap: 8px;
}

.gender-option {
    flex: 1;
    cursor: pointer;
    display: block;
}

.gender-option input[type="radio"] {
    display: none;
}

.gender-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 0;
    border: 1.5px solid #fce7f3;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #9d174d;
    background: #fff9fb;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
    width: 100%;
}

.gender-option input[type="radio"]:checked + .gender-btn {
    background: linear-gradient(135deg, #f43f5e, #be185d);
    color: #fff;
    border-color: #f43f5e;
    box-shadow: 0 2px 6px rgba(244, 63, 94, 0.3);
}

.gender-btn:hover {
    border-color: #fda4af;
    background: #fff0f5;
}

/* 颜色快捷标签 */
.color-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.color-tag {
    padding: 3px 9px;
    background: #fff0f5;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    font-size: 11px;
    color: #be185d;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.color-tag:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    transform: translateY(-1px);
}

.color-tag.selected {
    background: linear-gradient(135deg, #f43f5e, #be185d);
    color: #fff;
    border-color: transparent;
}

/* 表单两栏 */
.form-row {
    display: flex;
    gap: 10px;
}

.form-group-half {
    flex: 1;
    min-width: 0;
}

/* ========== 结果展示区 ========== */
.oa-result-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.oa-result-body::-webkit-scrollbar { width: 5px; }
.oa-result-body::-webkit-scrollbar-track { background: transparent; }
.oa-result-body:hover::-webkit-scrollbar-track { background: #fff0f5; }
.oa-result-body::-webkit-scrollbar-thumb { background: #fca5a5; border-radius: 3px; }
.oa-result-body::-webkit-scrollbar-thumb:hover { background: #f43f5e; }

/* 占位区 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px 24px;
    text-align: center;
    color: #fda4af;
}

.placeholder-icon {
    font-size: 52px;
    margin-bottom: 16px;
    opacity: 0.6;
    animation: oaFloat 3s ease-in-out infinite;
}

@keyframes oaFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.placeholder-title {
    font-size: 15px;
    font-weight: 600;
    color: #9d174d;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 12px;
    color: #fda4af;
    margin: 3px 0;
    line-height: 1.6;
}

/* 加载动画 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px 24px;
}

.loading-fashion {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.fashion-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f43f5e, #be185d);
    animation: oaBounce 1.2s ease-in-out infinite;
}

.fashion-dot:nth-child(1) { animation-delay: 0s; }
.fashion-dot:nth-child(2) { animation-delay: 0.2s; }
.fashion-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes oaBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40%            { transform: scale(1.2); opacity: 1; }
}

.loading-text {
    font-size: 13px;
    color: #be185d;
    margin: 0;
    font-weight: 500;
}

/* 错误状态区域（与 placeholder/loading 保持一致：flex居中、垂直居中） */
.oa-result-content--error {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 24px;
    text-align: center;
    background: transparent;
    animation: none;
}

.error-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-icon {
    font-size: 40px;
    margin-bottom: 14px;
    opacity: 0.85;
}

.error-msg {
    font-size: 14px;
    color: #ef4444;
    margin: 0 0 6px;
    font-weight: 600;
    line-height: 1.5;
}

.error-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 16px;
}

.error-retry-btn {
    padding: 8px 22px;
    background: linear-gradient(135deg, #f43f5e, #be185d);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.3);
}

.error-retry-btn:hover {
    background: linear-gradient(135deg, #fb5271, #c81f67);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
}

/* 结果内容区 Markdown 渲染 */
.oa-result-content {
    padding: 20px 24px;
    line-height: 1.8;
    font-size: 14px;
    color: #1e293b;
    animation: oaResultFadeIn 0.35s ease-out forwards;
}

@keyframes oaResultFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.oa-result-content h2 {
    font-size: 15px;
    font-weight: 700;
    color: #9d174d;
    margin: 20px 0 10px;
    padding: 7px 12px;
    border-left: 4px solid #f43f5e;
    background: linear-gradient(to right, rgba(244, 63, 94, 0.07), transparent);
    border-radius: 0 4px 4px 0;
}

.oa-result-content h2:first-child {
    margin-top: 0;
}

.oa-result-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: #be185d;
    margin: 14px 0 6px;
}

.oa-result-content ul {
    margin: 6px 0;
    padding-left: 0;
    list-style: none;
}

.oa-result-content li {
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
    color: #374151;
    line-height: 1.7;
}

.oa-result-content li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f43f5e, #be185d);
}

.oa-result-content strong {
    color: #be185d;
    font-weight: 600;
}

.oa-result-content p {
    margin: 8px 0;
    color: #374151;
}

.oa-result-content hr {
    border: none;
    border-top: 1px dashed #fce7f3;
    margin: 14px 0;
}

/* ========== 模态框 ========== */
.oa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.oa-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: min(680px, 92vw);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.oa-modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(244, 63, 94, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.oa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f43f5e, #be185d);
    color: #fff;
    flex-shrink: 0;
}

.oa-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.oa-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.oa-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.oa-modal-body {
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* 示例卡片 */
.example-card {
    padding: 14px 16px;
    border: 1.5px solid #fce7f3;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff9fb;
}

.example-card:hover {
    border-color: #fda4af;
    background: #fff0f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.12);
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.example-card-icon { font-size: 20px; }

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.example-card-badge {
    font-size: 11px;
    background: #ffe4e6;
    color: #be185d;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.example-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
}

/* ========== 暗黑模式 ========== */
body.dark .oa-container {
    background: #1a0e1c;
    border-color: #3b1f38;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark .oa-toolbar {
    background: linear-gradient(135deg, #9f1239 0%, #7f1d47 60%, #6b1540 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.dark .oa-main-content {
    background: #1a0e1c;
}

body.dark .oa-history-panel {
    background: #1e1124;
    border-right-color: #3b1f38;
}

body.dark .history-panel-header {
    background: linear-gradient(to bottom, #251628, #1e1124);
    border-bottom-color: #3b1f38;
}

body.dark .history-panel-header h3 { color: #fda4af; }

body.dark .history-search input {
    background: #251628;
    border-color: #3b1f38;
    color: #e2d8e8;
}

body.dark .history-search input:focus {
    border-color: #f43f5e;
    background: #2d1930;
}

body.dark .history-search input::placeholder { color: #6b4a65; }

body.dark .history-list:hover::-webkit-scrollbar-track { background: #2d1930; }

body.dark .history-empty { color: #6b4a65; }

body.dark .history-item {
    background: #251628;
    border-color: #3b1f38;
}

body.dark .history-item:hover {
    background: #2d1930;
    border-color: #7f1d47;
}

body.dark .history-item.active {
    background: #3b1f38;
    border-color: #be185d;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

body.dark .history-item-title { color: #e2d8e8; }

body.dark .history-item-sub { color: #fda4af; }

body.dark .history-item-time { color: #6b4a65; }

body.dark .oa-input-panel,
body.dark .oa-result-panel {
    background: #1e1124;
    border-color: #3b1f38;
}

body.dark .panel-header {
    background: linear-gradient(to bottom, #251628, #1e1124);
    border-bottom-color: #3b1f38;
}

body.dark .panel-header h3 { color: #fda4af; }

body.dark .panel-tip { color: #6b4a65; }

body.dark .oa-input-body:hover::-webkit-scrollbar-track { background: #2d1930; }

body.dark .form-group label { color: #d1b8cc; }

body.dark .label-tip { color: #6b4a65; }

body.dark .oa-input,
body.dark .oa-select,
body.dark .oa-textarea {
    background: #251628;
    border-color: #3b1f38;
    color: #e2d8e8;
}

body.dark .oa-input:focus,
body.dark .oa-select:focus,
body.dark .oa-textarea:focus {
    border-color: #f43f5e;
    background: #2d1930;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

body.dark .oa-input:hover:not(:focus),
body.dark .oa-select:hover:not(:focus),
body.dark .oa-textarea:hover:not(:focus) {
    border-color: #7f1d47;
    background: #2d1930;
}

body.dark .oa-input::placeholder,
body.dark .oa-textarea::placeholder { color: #5c3a57; }

body.dark .oa-select {
    color-scheme: dark;
}

body.dark .oa-select option {
    background: #1e1124;
    color: #e2d8e8;
}

body.dark .gender-btn {
    background: #251628;
    border-color: #3b1f38;
    color: #fda4af;
}

body.dark .gender-btn:hover {
    border-color: #7f1d47;
    background: #2d1930;
}

body.dark .gender-option input[type="radio"]:checked + .gender-btn {
    background: linear-gradient(135deg, #9f1239, #7f1d47);
    color: #fff;
    border-color: #9f1239;
}

body.dark .color-tag {
    background: #251628;
    border-color: #3b1f38;
    color: #fda4af;
}

body.dark .color-tag:hover {
    background: #2d1930;
    border-color: #7f1d47;
}

body.dark .color-tag.selected {
    background: linear-gradient(135deg, #9f1239, #7f1d47);
    color: #fff;
}

body.dark .result-placeholder {
    color: #6b4a65;
}

body.dark .placeholder-title { color: #fda4af; }

body.dark .placeholder-desc { color: #6b4a65; }

body.dark .oa-result-body:hover::-webkit-scrollbar-track { background: #2d1930; }
body.dark .oa-result-body::-webkit-scrollbar-track { background: #1e1124; }

body.dark .loading-text { color: #fda4af; }

body.dark .oa-result-content--error .error-msg {
    color: #fca5a5;
}

body.dark .oa-result-content--error .error-hint {
    color: #6b4a65;
}

body.dark .error-retry-btn {
    background: linear-gradient(135deg, #9f1239, #7f1d47);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark .error-retry-btn:hover {
    background: linear-gradient(135deg, #be185d, #9f1239);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.dark .oa-result-content { color: #e2d8e8; }

body.dark .oa-result-content h2 {
    color: #fda4af;
    border-left-color: #be185d;
    background: linear-gradient(to right, rgba(190, 24, 93, 0.15), transparent);
}

body.dark .oa-result-content h3 { color: #f9a8d4; }

body.dark .oa-result-content li,
body.dark .oa-result-content p { color: #d1b8cc; }

body.dark .oa-result-content li::before {
    background: linear-gradient(135deg, #fda4af, #f43f5e);
}

body.dark .oa-result-content strong { color: #fda4af; }

body.dark .oa-result-content hr { border-top-color: #3b1f38; }

body.dark .result-meta-subject {
    background: #3b1f38;
    color: #fda4af;
}

body.dark .result-time { color: #8b7088; }

body.dark .oa-modal-overlay { background: rgba(0, 0, 0, 0.65); }

body.dark .oa-modal-content {
    background: #1e1124;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark .oa-modal-header {
    background: linear-gradient(135deg, #9f1239, #7f1d47);
}

body.dark .example-card {
    background: #251628;
    border-color: #3b1f38;
}

body.dark .example-card:hover {
    background: #2d1930;
    border-color: #7f1d47;
}

body.dark .example-card-title { color: #e2d8e8; }

body.dark .example-card-badge {
    background: #3b1f38;
    color: #fda4af;
}

body.dark .example-card-desc { color: #8b7088; }

/* ========== 响应式：中等屏幕 ========== */
@media (max-width: 960px) {
    .oa-history-panel {
        display: none;
    }

    .oa-input-panel {
        width: 320px;
    }
}

/* ========== 响应式：小屏幕 ========== */
@media (max-width: 640px) {
    .oa-container {
        height: calc(100vh - 120px);
        min-height: unset;
        border-radius: 0;
    }

    .oa-input-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #fce7f3;
    }

    .oa-main-content {
        flex-direction: column;
    }

    .oa-result-panel {
        min-width: unset;
        flex: none;
        height: 50vh;
    }

    .oa-toolbar .toolbar-title {
        display: none;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .oa-modal-body {
        grid-template-columns: 1fr;
    }
}
