/* ========== 笑话大全容器 ========== */
.jc-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #fffbf5;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.jc-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.jc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffcd3c 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.35);
    flex-shrink: 0;
}

.toolbar-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    margin-right: 4px;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 10px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #e05d1a;
    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.5;
    cursor: not-allowed;
}

.toolbar-btn-primary {
    background: rgba(255,255,255,0.95);
    color: #e05d1a;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ========== 主内容区 ========== */
.jc-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========== 左侧历史面板 ========== */
.jc-history-panel {
    width: 190px;
    background: #fff;
    border-right: 1px solid #ffe0c2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fff8f3, #fff3e8);
    border-bottom: 1px solid #ffe0c2;
    flex-shrink: 0;
}

.history-panel-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #e05d1a;
}

.history-count {
    font-size: 11px;
    color: #ff8c42;
    font-weight: 400;
}

.history-clear-btn {
    background: #fff0e8;
    border: none;
    color: #e05d1a;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.history-clear-btn:hover {
    background: #ffd4b5;
}

.history-search {
    padding: 8px;
    border-bottom: 1px solid #ffe0c2;
    flex-shrink: 0;
}

.history-search input {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #ffd4b5;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffaf7;
}

.history-search input:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 2px rgba(255,140,66,0.12);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px;
}

.history-empty {
    text-align: center;
    color: #ccc;
    font-size: 12px;
    padding: 20px 10px;
}

.history-item {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    margin: 3px 0;
    background: #fffaf7;
    border: 1px solid #ffe0c2;
    border-left: 3px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #fff0e5;
    border-color: #ffb380;
    transform: translateX(2px);
}

.history-item.active {
    background: #fff0e5;
    border-left-color: #ff8c42;
    box-shadow: 0 1px 3px rgba(255,140,66,0.2);
}

.history-item-category {
    font-weight: 600;
    font-size: 12px;
    color: #e05d1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.history-item-style {
    font-size: 11px;
    color: #a0522d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item-time {
    font-size: 10px;
    color: #ccc;
    margin-top: 2px;
}

.history-item-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.history-item:hover .history-item-del {
    opacity: 1;
}

.history-item-del:hover {
    background: #ef4444;
    color: white;
}

/* ========== 中间设置面板 ========== */
.jc-input-panel {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #ffe0c2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: 12px 16px 10px;
    background: linear-gradient(to bottom, #fff8f3, #fff3e8);
    border-bottom: 1px solid #ffe0c2;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #e05d1a;
}

.panel-tip {
    font-size: 11px;
    color: #aaa;
}

.jc-input-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.label-tip {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
}

.jc-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ffd4b5;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffaf7;
    color: #444;
}

.jc-input:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 2px rgba(255,140,66,0.12);
    background: #fff;
}

.jc-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ffd4b5;
    border-radius: 5px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #fffaf7;
    color: #444;
    cursor: pointer;
}

.jc-select:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 2px rgba(255,140,66,0.12);
    background: #fff;
}

/* 类型标签 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-tag {
    padding: 5px 10px;
    border: 1px solid #ffd4b5;
    border-radius: 20px;
    background: #fffaf7;
    color: #a05000;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-tag:hover {
    border-color: #ff8c42;
    background: #fff0e5;
}

.category-tag.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-color: #ff6b35;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255,107,53,0.3);
}

/* 数量选择 */
.count-selector {
    display: flex;
    gap: 6px;
}

.count-btn {
    padding: 6px 14px;
    border: 1px solid #ffd4b5;
    border-radius: 5px;
    background: #fffaf7;
    color: #a05000;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.count-btn:hover {
    border-color: #ff8c42;
    background: #fff0e5;
}

.count-btn.active {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-color: #ff6b35;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(255,107,53,0.3);
}

/* 快捷生成 */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-btn {
    padding: 7px 12px;
    border: 1px solid #ffd4b5;
    border-radius: 6px;
    background: #fffaf7;
    color: #a05000;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.quick-btn:hover {
    background: #fff0e5;
    border-color: #ff8c42;
    transform: translateX(2px);
}

/* 主生成按钮 */
.generate-main-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffcd3c 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(255,107,53,0.35);
    letter-spacing: 0.5px;
}

.generate-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255,107,53,0.4);
}

.generate-main-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255,107,53,0.3);
}

.generate-hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: #bbb;
    text-align: center;
}

/* ========== 右侧笑话展示面板 ========== */
.jc-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fffbf5;
    overflow: hidden;
    min-width: 300px;
}

.jc-result-panel .panel-header {
    border-bottom: 1px solid #ffe0c2;
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.result-meta-category {
    font-size: 11px;
    background: #fff0e5;
    color: #e05d1a;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.result-joke-count {
    font-size: 11px;
    color: #aaa;
}

.result-time {
    font-size: 11px;
    color: #ccc;
}

.jc-result-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    position: relative;
}

/* 占位符 */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
}

.placeholder-emoji {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.placeholder-title {
    font-size: 18px;
    font-weight: 700;
    color: #e05d1a;
    margin: 0 0 8px;
}

.placeholder-desc {
    font-size: 13px;
    color: #aaa;
    margin: 2px 0;
}

.placeholder-tags {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.joke-tag {
    padding: 4px 12px;
    background: #fff0e5;
    color: #e05d1a;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* 加载中 */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 0;
}

.loading-emoji-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.bounce-emoji {
    font-size: 32px;
    display: inline-block;
    animation: bounce 0.8s ease-in-out infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to   { transform: translateY(-16px); }
}

.loading-text {
    font-size: 13px;
    color: #aaa;
}

/* 笑话卡片 */
.joke-cards-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.joke-card {
    background: #fff;
    border: 1px solid #ffe0c2;
    border-radius: 10px;
    padding: 16px 18px;
    position: relative;
    transition: all 0.2s;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.joke-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #ff6b35, #ffcd3c);
    border-radius: 10px 0 0 10px;
}

.joke-card:hover {
    border-color: #ffb380;
    box-shadow: 0 3px 12px rgba(255,107,53,0.1);
    transform: translateY(-1px);
}

.joke-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.joke-card-number {
    font-size: 12px;
    font-weight: 700;
    color: #ff8c42;
    background: #fff0e5;
    padding: 3px 8px;
    border-radius: 10px;
}

.joke-card-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.joke-card:hover .joke-card-actions {
    opacity: 1;
}

.joke-action-btn {
    padding: 3px 8px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    color: #777;
    cursor: pointer;
    transition: all 0.2s;
}

.joke-action-btn:hover {
    background: #ffe0c2;
    color: #e05d1a;
}

.joke-card-text {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    white-space: pre-wrap;
}

.joke-card-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.joke-like-btn {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid #ffd4b5;
    border-radius: 14px;
    font-size: 12px;
    color: #e05d1a;
    cursor: pointer;
    transition: all 0.2s;
}

.joke-like-btn:hover,
.joke-like-btn.liked {
    background: #fff0e5;
    border-color: #ff8c42;
}

/* ========== 模态框 ========== */
.jc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 100001;
    backdrop-filter: blur(2px);
}

.jc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100002;
    width: 600px;
    max-width: calc(100vw - 40px);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translate(-50%, -54%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

.jc-modal-content {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.jc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    flex-shrink: 0;
}

.jc-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.jc-modal-close {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jc-modal-close:hover {
    background: rgba(255,255,255,0.35);
}

.jc-modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 示例卡片 */
.example-card {
    padding: 12px 14px;
    border: 1px solid #ffe0c2;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fffaf7;
}

.example-card:hover {
    background: #fff0e5;
    border-color: #ff8c42;
    box-shadow: 0 2px 8px rgba(255,107,53,0.1);
}

.example-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.example-card-title span:first-child {
    font-size: 13px;
    font-weight: 700;
    color: #e05d1a;
}

.example-card-badge {
    font-size: 11px;
    background: #fff0e5;
    color: #ff8c42;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.example-card-desc {
    font-size: 12px;
    color: #888;
    margin: 0 0 8px;
}

.example-card-import {
    padding: 5px 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card-import:hover {
    box-shadow: 0 2px 6px rgba(255,107,53,0.35);
    transform: translateY(-1px);
}

/* 错误展示块 */
.joke-error-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px 40px;
    text-align: center;
    gap: 8px;
    min-height: 260px;
}

.joke-error-icon {
    font-size: 52px;
    margin-bottom: 6px;
    animation: float 3s ease-in-out infinite;
}

.joke-error-msg {
    font-size: 14px;
    font-weight: 600;
    color: #e05d1a;
    margin: 0;
    max-width: 320px;
    word-break: break-word;
}

.joke-error-hint {
    font-size: 12px;
    color: #aaa;
    margin: 0;
}

.joke-error-retry {
    margin-top: 10px;
    padding: 8px 22px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}

.joke-error-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(255,107,53,0.4);
}

.joke-error-retry:active {
    transform: translateY(0);
}

/* 标签点击压感动效 */
.category-tag-pressing {
    transform: scale(0.93) !important;
    filter: brightness(0.88) !important;
    transition: transform 0.05s ease, filter 0.05s ease !important;
}

.count-btn-pressing {
    transform: scale(0.93) !important;
    filter: brightness(0.88) !important;
    transition: transform 0.05s ease, filter 0.05s ease !important;
}

.quick-btn-pressing {
    transform: translateX(2px) scale(0.97) !important;
    filter: brightness(0.88) !important;
    transition: transform 0.05s ease, filter 0.05s ease !important;
}

/* 主生成按钮禁用态 */
.generate-main-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(255,107,53,0.15) !important;
}

/* ========== shake动画 ========== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(1px); }
}

.shake {
    animation: shake 0.5s ease !important;
}

/* ========== 暗黑模式 ========== */
body.dark .history-item-time {
    color: #443322;
}

body.dark .history-empty {
    color: #443322;
}

body.dark .history-clear-btn {
    background: rgba(255,107,53,0.12);
    color: #ff8c42;
    border: 1px solid rgba(255,107,53,0.2);
}

body.dark .history-clear-btn:hover {
    background: rgba(255,107,53,0.25);
}

body.dark .panel-tip {
    color: #664433;
}

body.dark .label-tip {
    color: #664433;
}

body.dark .joke-error-msg {
    color: #ff8c42;
}

body.dark .joke-error-hint {
    color: #664433;
}

body.dark .joke-error-retry {
    background: linear-gradient(135deg, #c04020 0%, #a06010 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark .joke-error-retry:hover {
    background: linear-gradient(135deg, #d45025 0%, #b07015 100%);
    box-shadow: 0 5px 14px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}

body.dark .jc-container {
    background: #1a1a2e;
}

body.dark .jc-toolbar {
    background: linear-gradient(135deg, #c0471a 0%, #a06010 50%, #a08010 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

body.dark .jc-history-panel {
    background: #0f0f1a;
    border-color: rgba(255,140,66,0.2);
}

body.dark .history-panel-header {
    background: #1a1a2e;
    border-bottom-color: rgba(255,140,66,0.2);
}

body.dark .history-panel-header h3 {
    color: #ff8c42;
}

body.dark .history-search input {
    background: #0f0f1a;
    border-color: rgba(255,140,66,0.25);
    color: #e2d4c0;
}

body.dark .history-search input::placeholder {
    color: #664433;
}

body.dark .history-item {
    background: #1a1a2e;
    border-color: rgba(255,140,66,0.2);
}

body.dark .history-item:hover {
    background: rgba(255,140,66,0.1);
    border-color: rgba(255,140,66,0.4);
}

body.dark .history-item.active {
    background: rgba(255,107,53,0.15);
    border-left-color: #ff8c42;
}

body.dark .history-item-category {
    color: #ff8c42;
}

body.dark .history-item-style {
    color: #cc8855;
}

body.dark .jc-input-panel {
    background: #0f0f1a;
    border-color: rgba(255,140,66,0.2);
}

body.dark .panel-header {
    background: #1a1a2e;
    border-bottom-color: rgba(255,140,66,0.2);
}

body.dark .panel-header h3 {
    color: #ff8c42;
}

body.dark .jc-input-body {
    color: #e2d4c0;
}

body.dark .form-group label {
    color: #cc9966;
}

body.dark .jc-input,
body.dark .jc-select {
    background: #0f0f1a;
    border-color: rgba(255,140,66,0.25);
    color: #e2d4c0;
}

body.dark .jc-input:focus,
body.dark .jc-select:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 2px rgba(255,140,66,0.12);
}

body.dark .category-tag {
    background: #1a1a2e;
    border-color: rgba(255,140,66,0.25);
    color: #cc8855;
}

body.dark .category-tag:hover {
    background: rgba(255,140,66,0.1);
    border-color: #ff8c42;
}

body.dark .category-tag.active {
    background: linear-gradient(135deg, #c04020 0%, #a06010 100%);
    border-color: #c04020;
    color: #fff;
}

body.dark .count-btn {
    background: #1a1a2e;
    border-color: rgba(255,140,66,0.25);
    color: #cc8855;
}

body.dark .count-btn:hover {
    background: rgba(255,140,66,0.1);
    border-color: #ff8c42;
}

body.dark .count-btn.active {
    background: linear-gradient(135deg, #c04020 0%, #a06010 100%);
    border-color: #c04020;
    color: #fff;
}

body.dark .quick-btn {
    background: #1a1a2e;
    border-color: rgba(255,140,66,0.25);
    color: #cc8855;
}

body.dark .quick-btn:hover {
    background: rgba(255,140,66,0.1);
    border-color: #ff8c42;
}

body.dark .jc-result-panel {
    background: #1a1a2e;
}

body.dark .jc-result-panel .panel-header {
    background: #1a1a2e;
    border-bottom-color: rgba(255,140,66,0.2);
}

body.dark .jc-result-panel .panel-header h3 {
    color: #ff8c42;
}

body.dark .result-meta-category {
    background: rgba(255,107,53,0.15);
    color: #ff8c42;
}

body.dark .placeholder-title {
    color: #ff8c42;
}

body.dark .placeholder-desc {
    color: #886655;
}

body.dark .loading-text {
    color: #886655;
}

body.dark .result-joke-count {
    color: #886655;
}

body.dark .result-time {
    color: #664433;
}

body.dark .generate-hint {
    color: #664433;
}

body.dark .generate-main-btn {
    background: linear-gradient(135deg, #c04020 0%, #a06010 50%, #806010 100%);
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

body.dark .jc-result-body {
    background: #1a1a2e;
}

body.dark .joke-tag {
    background: rgba(255,107,53,0.15);
    color: #ff8c42;
}

body.dark .joke-card {
    background: #0f0f1a;
    border-color: rgba(255,140,66,0.2);
}

body.dark .joke-card:hover {
    border-color: rgba(255,140,66,0.4);
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}

body.dark .joke-card-number {
    background: rgba(255,107,53,0.15);
    color: #ff8c42;
}

body.dark .joke-action-btn {
    background: #1a1a2e;
    color: #cc8855;
}

body.dark .joke-action-btn:hover {
    background: rgba(255,140,66,0.15);
    color: #ff8c42;
}

body.dark .joke-card-text {
    color: #e2d4c0;
}

body.dark .joke-like-btn {
    border-color: rgba(255,140,66,0.25);
    color: #ff8c42;
}

body.dark .joke-like-btn:hover,
body.dark .joke-like-btn.liked {
    background: rgba(255,107,53,0.15);
    border-color: #ff8c42;
}

body.dark .jc-modal-content {
    background: #1a1a2e;
}

body.dark .jc-modal-header {
    background: linear-gradient(135deg, #c04020 0%, #a06010 100%);
}

body.dark .jc-modal-body {
    background: #1a1a2e;
}

body.dark .example-card {
    background: #0f0f1a;
    border-color: rgba(255,140,66,0.2);
}

body.dark .example-card:hover {
    background: rgba(255,140,66,0.08);
    border-color: rgba(255,140,66,0.4);
}

body.dark .example-card-title span:first-child {
    color: #ff8c42;
}

body.dark .example-card-badge {
    background: rgba(255,107,53,0.15);
    color: #ff8c42;
}

body.dark .example-card-desc {
    color: #886655;
}

/* 内容区滚动条美化 */
.history-list::-webkit-scrollbar,
.jc-input-body::-webkit-scrollbar,
.jc-result-body::-webkit-scrollbar,
.jc-modal-body::-webkit-scrollbar {
    width: 4px;
}

.history-list::-webkit-scrollbar-track,
.jc-input-body::-webkit-scrollbar-track,
.jc-result-body::-webkit-scrollbar-track,
.jc-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.history-list::-webkit-scrollbar-thumb,
.jc-input-body::-webkit-scrollbar-thumb,
.jc-result-body::-webkit-scrollbar-thumb,
.jc-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255,140,66,0.3);
    border-radius: 4px;
}

.history-list::-webkit-scrollbar-thumb:hover,
.jc-input-body::-webkit-scrollbar-thumb:hover,
.jc-result-body::-webkit-scrollbar-thumb:hover,
.jc-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,140,66,0.55);
}

/* 暗黑模式滚动条 */
body.dark .history-list::-webkit-scrollbar-thumb,
body.dark .jc-input-body::-webkit-scrollbar-thumb,
body.dark .jc-result-body::-webkit-scrollbar-thumb {
    background: rgba(255,107,53,0.2);
}

body.dark .history-list::-webkit-scrollbar-thumb:hover,
body.dark .jc-input-body::-webkit-scrollbar-thumb:hover,
body.dark .jc-result-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,107,53,0.4);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .jc-history-panel {
        display: none;
    }
    .jc-input-panel {
        width: 240px;
    }
}

@media (max-width: 768px) {
    /* 历史面板切换为顶部横向滑动条 */
    .jc-main-content {
        flex-direction: column;
    }
    .jc-history-panel {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        max-height: 108px;
        border-right: none;
        border-bottom: 1px solid #ffe0c2;
        flex-shrink: 0;
    }
    .history-panel-header {
        padding: 6px 10px;
    }
    .history-panel-header h3 {
        font-size: 11px;
    }
    .history-clear-btn {
        font-size: 10px;
        padding: 2px 5px;
    }
    .history-search {
        display: none;
    }
    .history-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 6px;
        gap: 5px;
    }
    .history-item {
        flex-shrink: 0;
        width: 150px;
        min-width: 150px;
        margin: 0;
    }
    .history-empty {
        white-space: nowrap;
        padding: 10px 16px;
    }
    /* 规范：移动端复制按鈕强制可见 */
    .joke-card-actions {
        opacity: 1 !important;
    }
    /* 工具栏按鈕字体缩小 */
    .toolbar-btn {
        font-size: 11px;
        padding: 5px 8px;
    }
    .toolbar-title {
        font-size: 13px;
    }
    /* 笑话卡片内边距减小 */
    .joke-card {
        padding: 12px 14px;
    }
    .joke-card-text {
        font-size: 13px;
    }
}

@media (max-width: 680px) {
    .jc-input-panel {
        display: none;
    }
    .jc-result-panel {
        min-width: unset;
    }
}
