/* ========== 景点推荐工具 - 主容器 ========== */
.ssr-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 50%, #fce4ec 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

/* 全屏模式 */
.ssr-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.ssr-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, #2e7d32 0%, #1565c0 60%, #ad1457 100%);
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== 按钮样式 ========== */
.ssr-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ssr-btn-ghost {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.ssr-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.ssr-btn-primary {
    background: #fff;
    color: #2e7d32;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ssr-btn-primary:hover:not(:disabled) {
    background: #f1f8e9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ssr-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ssr-btn-fullscreen {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.ssr-btn-fullscreen:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========== 主内容区 ========== */
.ssr-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

/* ========== 历史记录独立栏 ========== */
.ssr-history-col {
    width: 200px;
    min-width: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
}

/* ========== 左侧输入面板栏 ========== */
.ssr-left {
    display: flex;
    flex-direction: column;
    width: 290px;
    min-width: 260px;
    flex-shrink: 0;
    overflow: hidden;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
}

/* ========== 历史记录面板 ========== */
.ssr-history-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.history-title {
    font-size: 12px;
    font-weight: 600;
    color: #546e7a;
}

.history-clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #90a4ae;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.history-clear-btn:hover {
    background: #fde8e8;
    color: #ef4444;
}

.history-search-wrap {
    padding: 6px 10px;
}

.history-search-input {
    width: 100%;
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s;
}

.history-search-input:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 2px rgba(67, 160, 71, 0.1);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 6px;
}

.history-empty {
    text-align: center;
    color: #b0bec5;
    font-size: 12px;
    padding: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: white;
    border: 1px solid #e8ecf0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    gap: 8px;
}

.history-item:hover {
    background: #f1f8e9;
    border-color: #a5d6a7;
    transform: translateX(2px);
}

.history-item.active {
    background: #e8f5e9;
    border-color: #43a047;
}

.history-item-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.history-item-body {
    flex: 1;
    min-width: 0;
}

.history-item-dest {
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-meta {
    font-size: 11px;
    color: #78909c;
    margin-top: 2px;
}

.history-item-del {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #b0bec5;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: all 0.2s;
}

.history-item:hover .history-item-del {
    opacity: 1;
}

.history-item-del:hover {
    background: #fde8e8;
    color: #ef4444;
}

/* ========== 输入面板 ========== */
.ssr-input-panel {
    flex: 1;
    overflow-y: auto;
    background: transparent;
}

.input-section {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group.half {
    flex: 1;
    min-width: 0;
}

.input-row {
    display: flex;
    gap: 10px;
}

.input-label {
    font-size: 12px;
    font-weight: 600;
    color: #37474f;
    display: flex;
    align-items: center;
    gap: 4px;
}

.label-icon {
    font-size: 14px;
}

.required {
    color: #e53935;
    font-size: 13px;
}

.ssr-input,
.ssr-select,
.ssr-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s;
    box-sizing: border-box;
    color: #37474f;
    font-family: inherit;
}

.ssr-input:focus,
.ssr-select:focus,
.ssr-textarea:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 2px rgba(67, 160, 71, 0.15);
    background: #fff;
}

.ssr-input::placeholder,
.ssr-textarea::placeholder {
    color: #b0bec5;
}

.ssr-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2390a4ae' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.ssr-textarea {
    resize: vertical;
    min-height: 72px;
}

/* 快速目的地 */
.quick-destinations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.quick-label {
    font-size: 11px;
    color: #90a4ae;
}

.quick-tag {
    padding: 3px 10px;
    background: rgba(67, 160, 71, 0.1);
    border: 1px solid rgba(67, 160, 71, 0.3);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #2e7d32;
    transition: all 0.2s;
}

.quick-tag:hover {
    background: rgba(67, 160, 71, 0.2);
    border-color: #43a047;
    transform: translateY(-1px);
}

/* 偏好标签 */
.preference-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pref-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #dce1e7;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #546e7a;
    transition: all 0.2s;
    user-select: none;
}

.pref-tag input[type="checkbox"] {
    display: none;
}

.pref-tag:hover {
    border-color: #43a047;
    background: rgba(67, 160, 71, 0.08);
}

.pref-tag.checked,
.pref-tag:has(input:checked) {
    background: rgba(67, 160, 71, 0.15);
    border-color: #43a047;
    color: #2e7d32;
    font-weight: 500;
}

/* 字数统计 */
.char-count {
    text-align: right;
    font-size: 11px;
    color: #b0bec5;
    margin-top: -2px;
}

/* ========== 右侧结果面板 ========== */
.ssr-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    position: relative;
}

/* 结果头部 */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(to right, #e8f5e9, #e3f2fd);
    flex-shrink: 0;
    gap: 10px;
}

.result-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.result-destination {
    font-size: 15px;
    font-weight: 700;
    color: #1b5e20;
}

.result-info {
    font-size: 12px;
    color: #546e7a;
    background: rgba(255, 255, 255, 0.7);
    padding: 3px 10px;
    border-radius: 20px;
}

.result-regen-btn {
    padding: 6px 14px;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.result-regen-btn:hover {
    background: #bbdefb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.2);
}

.result-copy-btn {
    padding: 6px 14px;
    background: #43a047;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.result-copy-btn:hover {
    background: #2e7d32;
    transform: translateY(-1px);
}

/* ========== 占位提示 ========== */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px 30px;
    text-align: center;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: floatMap 3s ease-in-out infinite;
}

@keyframes floatMap {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.placeholder-title {
    font-size: 20px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 8px;
}

.placeholder-desc {
    font-size: 14px;
    color: #78909c;
    max-width: 320px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.placeholder-features {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(67, 160, 71, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: #546e7a;
    min-width: 90px;
    transition: all 0.2s;
}

.feature-item:hover {
    background: rgba(67, 160, 71, 0.08);
    border-color: #43a047;
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 24px;
}

/* ========== 加载状态 ========== */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px;
    text-align: center;
}

.loading-animation {
    position: relative;
    margin-bottom: 20px;
}

.loading-plane {
    font-size: 40px;
    animation: flyPlane 2s linear infinite;
    display: block;
    margin-bottom: 10px;
}

@keyframes flyPlane {
    0%   { transform: translateX(-30px) rotate(-5deg); }
    50%  { transform: translateX(30px) rotate(5deg); }
    100% { transform: translateX(-30px) rotate(-5deg); }
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #43a047;
    border-radius: 50%;
    display: inline-block;
    animation: dotBounce 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.loading-text {
    font-size: 15px;
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 8px;
}

.loading-tips {
    font-size: 13px;
    color: #78909c;
    max-width: 300px;
    line-height: 1.6;
}

/* ========== 结果内容 ========== */
.result-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* Markdown 渲染样式 */
.result-markdown {
    line-height: 1.8;
    color: #37474f;
    font-size: 14px;
    word-break: break-word;
}

.result-markdown h1 {
    font-size: 20px;
    color: #1b5e20;
    border-bottom: 2px solid #a5d6a7;
    padding-bottom: 8px;
    margin: 0 0 16px;
}

.result-markdown h2 {
    font-size: 17px;
    color: #2e7d32;
    margin: 20px 0 10px;
    padding: 8px 12px;
    background: linear-gradient(to right, rgba(67, 160, 71, 0.1), transparent);
    border-left: 4px solid #43a047;
    border-radius: 0 6px 6px 0;
}

.result-markdown h3 {
    font-size: 15px;
    color: #1565c0;
    margin: 14px 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-markdown h4 {
    font-size: 14px;
    color: #37474f;
    font-weight: 700;
    margin: 10px 0 6px;
}

.result-markdown a {
    color: #1565c0;
    text-decoration: none;
    border-bottom: 1px solid rgba(21, 101, 192, 0.3);
    transition: all 0.2s;
}

.result-markdown a:hover {
    color: #0d47a1;
    border-bottom-color: #0d47a1;
}

.result-markdown p {
    margin: 8px 0;
    color: #455a64;
}

.result-markdown ul, .result-markdown ol {
    margin: 8px 0;
    padding-left: 20px;
}

.result-markdown li {
    margin: 6px 0;
    color: #455a64;
}

.result-markdown strong {
    color: #2e7d32;
    font-weight: 700;
}

.result-markdown em {
    color: #5D3A2A;
    font-style: italic;
}

.result-markdown ul li::marker {
    color: #ff9800;
}

.result-markdown ol li::marker {
    color: #ff9800;
}

.result-markdown blockquote {
    border-left: 3px solid #43a047;
    padding: 8px 16px;
    margin: 12px 0;
    background: rgba(67, 160, 71, 0.05);
    border-radius: 0 8px 8px 0;
    color: #546e7a;
    font-style: italic;
}

.result-markdown hr {
    border: none;
    border-top: 1px dashed #b0bec5;
    margin: 16px 0;
}

.result-markdown code {
    background: rgba(67, 160, 71, 0.1);
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'Consolas', monospace;
}

/* ========== 错误状态 ========== */
.result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 300px;
    padding: 40px;
    text-align: center;
    gap: 14px;
}

.error-icon {
    font-size: 48px;
}

.error-text {
    font-size: 14px;
    color: #ef5350;
    max-width: 300px;
    line-height: 1.6;
}

/* ========== 示例模态框 ========== */
.ssr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.ssr-modal.show {
    display: flex;
}

.ssr-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ssr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #2e7d32, #1565c0);
    color: white;
    flex-shrink: 0;
}

.ssr-modal-header h3 {
    margin: 0;
    font-size: 15px;
}

.ssr-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssr-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.ssr-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 示例卡片 */
.example-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #fafafa;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card:hover {
    background: #f1f8e9;
    border-color: #a5d6a7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.12);
}

.example-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.example-card-body {
    flex: 1;
    min-width: 0;
}

.example-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 4px;
}

.example-card-desc {
    font-size: 12px;
    color: #78909c;
    line-height: 1.5;
}

.example-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.example-tag {
    padding: 2px 8px;
    background: rgba(67, 160, 71, 0.1);
    border-radius: 10px;
    font-size: 11px;
    color: #2e7d32;
}

/* ========== Toast 通知 ========== */
.ssr-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    z-index: 999999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ssr-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.ssr-toast.success { background: #43a047; }
.ssr-toast.error   { background: #e53935; }
.ssr-toast.info    { background: #1e88e5; }

/* ========== 滚动条美化 ========== */
.ssr-input-panel::-webkit-scrollbar,
.result-content::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
.ssr-modal-body::-webkit-scrollbar {
    width: 4px;
}

.ssr-input-panel::-webkit-scrollbar-track,
.result-content::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track,
.ssr-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.ssr-input-panel::-webkit-scrollbar-thumb,
.result-content::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.ssr-modal-body::-webkit-scrollbar-thumb {
    background: #b0bec5;
    border-radius: 10px;
}

.ssr-input-panel::-webkit-scrollbar-thumb:hover,
.result-content::-webkit-scrollbar-thumb:hover,
.history-list::-webkit-scrollbar-thumb:hover,
.ssr-modal-body::-webkit-scrollbar-thumb:hover {
    background: #ff9800;
}

/* ========== 响应式布局 ========== */
@media (max-width: 768px) {
    .ssr-main {
        flex-direction: column;
    }

    .ssr-history-col {
        width: 100%;
        min-width: unset;
        max-height: 150px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .ssr-left {
        width: 100%;
        max-height: 50%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .toolbar-title {
        display: none;
    }
}

/* ========== 打印样式 ========== */
@media print {
    .ssr-toolbar,
    .ssr-history-col,
    .ssr-left,
    #resultPlaceholder,
    #resultLoading {
        display: none !important;
    }

    .ssr-container {
        height: auto;
        box-shadow: none;
    }

    .ssr-right {
        width: 100%;
    }

    .result-content {
        overflow: visible;
    }
}

/* ========== 暗黑模式 ========== */
body.dark .ssr-container {
    background: linear-gradient(135deg, #1a2b1a 0%, #0d1b2a 50%, #2b0d1a 100%);
}

body.dark .ssr-history-col {
    background: rgba(15, 25, 15, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .ssr-left {
    background: rgba(20, 30, 20, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .ssr-history-panel {
    background: transparent;
}

body.dark .history-header {
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark .history-title {
    color: #a5d6a7;
}

body.dark .history-search-input {
    background: rgba(30, 50, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

body.dark .history-search-input::placeholder {
    color: #546e7a;
}

body.dark .history-item {
    background: rgba(25, 40, 25, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .history-item:hover {
    background: rgba(67, 160, 71, 0.15);
    border-color: #43a047;
}

body.dark .history-item-dest {
    color: #a5d6a7;
}

body.dark .history-item-meta {
    color: #546e7a;
}

body.dark .ssr-input-panel {
    background: transparent;
}

body.dark .input-label {
    color: #cfd8dc;
}

body.dark .ssr-input,
body.dark .ssr-select,
body.dark .ssr-textarea {
    background: rgba(30, 45, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e0e0e0;
}

body.dark .ssr-input:focus,
body.dark .ssr-select:focus,
body.dark .ssr-textarea:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 2px rgba(67, 160, 71, 0.2);
    background: rgba(30, 50, 30, 0.9);
}

body.dark .ssr-input::placeholder,
body.dark .ssr-textarea::placeholder {
    color: #546e7a;
}

body.dark .quick-tag {
    background: rgba(67, 160, 71, 0.15);
    border-color: rgba(67, 160, 71, 0.4);
    color: #a5d6a7;
}

body.dark .quick-tag:hover {
    background: rgba(67, 160, 71, 0.25);
}

body.dark .pref-tag {
    background: rgba(30, 45, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
    color: #b0bec5;
}

body.dark .pref-tag:hover {
    border-color: #43a047;
    background: rgba(67, 160, 71, 0.15);
}

body.dark .pref-tag.checked,
body.dark .pref-tag:has(input:checked) {
    background: rgba(67, 160, 71, 0.2);
    border-color: #43a047;
    color: #a5d6a7;
}

body.dark .result-panel {
    background: rgba(12, 25, 12, 0.8);
}

body.dark .result-header {
    background: linear-gradient(to right, rgba(27, 94, 32, 0.5), rgba(13, 71, 161, 0.3));
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .result-destination {
    color: #a5d6a7;
}

body.dark .result-info {
    background: rgba(255, 255, 255, 0.1);
    color: #90a4ae;
}

body.dark .placeholder-title {
    color: #a5d6a7;
}

body.dark .placeholder-desc {
    color: #546e7a;
}

body.dark .feature-item {
    background: rgba(20, 35, 20, 0.8);
    border-color: rgba(67, 160, 71, 0.2);
    color: #78909c;
}

body.dark .feature-item:hover {
    background: rgba(67, 160, 71, 0.15);
    border-color: #43a047;
}

body.dark .loading-text {
    color: #a5d6a7;
}

body.dark .loading-tips {
    color: #546e7a;
}

body.dark .result-markdown {
    color: #cfd8dc;
}

body.dark .result-markdown h1 {
    color: #a5d6a7;
    border-bottom-color: rgba(67, 160, 71, 0.4);
}

body.dark .result-markdown h2 {
    color: #81c784;
    background: linear-gradient(to right, rgba(67, 160, 71, 0.15), transparent);
    border-left-color: #43a047;
}

body.dark .result-markdown h3 {
    color: #64b5f6;
}

body.dark .result-markdown h4 {
    color: #90a4ae;
}

body.dark .result-markdown a {
    color: #64b5f6;
    border-bottom-color: rgba(100, 181, 246, 0.3);
}

body.dark .result-markdown a:hover {
    color: #90caf9;
}

body.dark .result-markdown p,
body.dark .result-markdown li {
    color: #b0bec5;
}

body.dark .result-markdown strong {
    color: #81c784;
}

body.dark .result-markdown em {
    color: #A1887F;
}

body.dark .result-regen-btn {
    background: rgba(21, 101, 192, 0.15);
    border-color: rgba(100, 181, 246, 0.3);
    color: #64b5f6;
}

body.dark .result-regen-btn:hover {
    background: rgba(21, 101, 192, 0.25);
}

body.dark .result-markdown blockquote {
    border-left-color: #43a047;
    background: rgba(67, 160, 71, 0.08);
    color: #78909c;
}

body.dark .result-markdown code {
    background: rgba(67, 160, 71, 0.15);
    color: #81c784;
}

body.dark .ssr-modal-content {
    background: #1a2b1a;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

body.dark .ssr-modal-body {
    background: #1a2b1a;
}

body.dark .example-card {
    background: rgba(20, 35, 20, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .example-card:hover {
    background: rgba(67, 160, 71, 0.12);
    border-color: #43a047;
}

body.dark .example-card-title {
    color: #a5d6a7;
}

body.dark .example-card-desc {
    color: #546e7a;
}

body.dark .example-tag {
    background: rgba(67, 160, 71, 0.15);
    color: #81c784;
}
