* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #FFF;
    min-height: 100vh;
    color: #222222;
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* 移动端安全区域支持 - 移除body padding，改为在具体元素中处理 */
}

html, body {
    height: 100%;
    overflow: hidden;
}

.container {
    position: relative;
    min-height: 100vh;
}

/* 历史记录按钮 */
.history-btn, .settings-menu-btn {
    height: 36px;
    min-width: 36px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px !important;
    background: #F4F4F4;
    color: #222;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 36px;
    transition: all 0.3s;
    will-change: transform;
    transform-origin: 50% 50%;
}
.history-btn:hover, .settings-menu-btn:hover {
    background: #E8E8E8;
}
.settings-menu-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    /* 确保图标大小固定 */
    min-width: 20px;
    min-height: 20px;
}

/* 确保设置菜单按钮在移动端正确响应 */
.settings-menu-btn {
    /* 移动端优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    cursor: pointer;
}

/* 历史记录页面 */
.history-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: auto;
    transition: transform 0.45s cubic-bezier(.4,1.3,.6,1), opacity 0.3s;
    border-radius: 16px !important;
}

.history-page.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.history-page.hide {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.history-blur-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,1);
    /* backdrop-filter: blur(3px); */
    will-change: backdrop-filter;
    z-index: 0;
    pointer-events: none;
}

.history-header, .history-content {
    position: relative;
    z-index: 1;
}

.history-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.history-header h3 {
    color: #222222;
    font-weight: 500;
    font-size: 18px;
    position: absolute;
    left: 50%;
    top: 32px;
    transform: translateX(-50%);
    z-index: 1;
}

.history-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #e8e8e8;
    color: #666;
    border-radius: 8px;
}

.history-content {
    flex: 1;
    height: 100%;
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    pointer-events: auto;
    box-sizing: border-box;
    border-radius: 8px !important;
}

.history-list {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    min-height: 320px;
    box-sizing: border-box;
    padding: 20px;
}

/* 新的卡片布局样式 */
.history-card {
    background: #f9f9f9;
    border-radius: 16px;
    padding: 19px;
    height: 161px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.history-card:hover {
    background: #f0f0f0;
}

.history-card-content {
    position: absolute;
    top: 19px;
    left: 19px;
    right: 19px;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-card .history-question {
    font-weight: 400;
    color: #666;
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-card .history-answer {
    color: #222222;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.history-card-bottom {
    position: absolute;
    bottom: 19px;
    left: 19px;
    right: 50px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 14px;
}

.history-card .history-date {
    color: #c4c4c4;
    font-size: 12px;
    line-height: 14px;
    white-space: nowrap;
}

/* 保持向后兼容的旧样式 */
.history-item {
    background: transparent;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    border-radius: 8px !important;
}

.history-item:hover {
    background: #f8f8f8;
}

.history-item .history-question {
    font-weight: 400;
    color: #666;
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.4;
}

.history-item .history-answer {
    color: #222222;
    font-size: 22px;
    margin-bottom: 0px;
    line-height: 1.3;
    font-weight: 500;
}

.history-item .history-date {
    color: #c4c4c4;
    font-size: 12px;
}

.history-more {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
}

.history-item:hover .history-more {
    opacity: 1;
}

.history-more:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.history-actions {
    position: absolute;
    top: 40px;
    right: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    display: none;
    z-index: 10;
}

.history-actions.show {
    display: block;
}

.history-actions button {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background 0.3s ease;
}

.history-actions button:hover {
    background: #f5f5f5;
    color: #ff6b35;
}

/* 主要内容区域 */
.main-content {
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
}

/* 日期显示 */
.date-display {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 24px;
    color: #222222;
    font-weight: 500;
    font-family: 'Source Serif 4', serif;
    white-space: nowrap;
    z-index: 2;
}

.question-section {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 确保在所有屏幕尺寸下位置一致 */
    position: relative;
}

.input-container {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    height: auto;
    transition: transform 0.4s cubic-bezier(.4,1.3,.6,1);
    /* 确保在所有屏幕尺寸下位置一致 */
    margin: 0 auto;
}

.input-container.move-up {
    transform: translateY(-40px);
}

.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 680px;
    text-align: center;
    color: #e8e8e8;
    font-size: 32px;
    font-weight: bold;
    cursor: text;
    border-radius: 16px;
    transition: all 0.3s ease;
    user-select: none;
    box-sizing: border-box;
    pointer-events: auto;
    padding: 0;
    margin-top: -24px;
    /* 防止跳格：确保文字不会换行 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* 确保在所有屏幕尺寸下位置一致 */
    z-index: 1;
}

.placeholder-text:hover {
    color: #cdcdcd;
}

.question-input {
    width: 100%;
    max-width: 680px;
    min-height: 50px;
    border: none;
    border-radius: 16px;
    font-size: 32px;
    font-family: inherit;
    resize: none;
    background: transparent;
    transition: all 0.3s ease;
    outline: none;
    color: #222222;
    font-weight: bold;
    text-align: center;
    caret-color: #ff8c00;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
    vertical-align: middle;
    /* 移动端优化 */
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    /* 防止跳格：确保文字不会换行 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Safari特殊优化 */
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.question-input:focus {
    background: transparent;
}

/* 答案区域 */
.answer-section {
    margin: 8px 0 0 0;
    padding: 20px;
    border-radius: 16px;
    background: rgba(255, 165, 0, 0.05);
    text-align: center;
    width: 100%;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.4s cubic-bezier(.4,1.3,.6,1), transform 0.4s cubic-bezier(.4,1.3,.6,1);
    pointer-events: none;
}

.answer-section.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.answer-text {
    font-size: 24px;
    color: #ff8c00;
    line-height: 1.6;
    margin-bottom: 10px;
    font-weight: 500;
}

.answer-page {
    color: #ff8c00;
    font-size: 14px;
    font-weight: 500;
    font-style: italic;
}

/* 按钮区域 */
.button-section {
    width: 100%;
    position: fixed;
    left: 0;
    bottom: 24px;
    display: flex;
    justify-content: center;
    z-index: 100;
    padding: 0 24px;
    box-sizing: border-box;
    pointer-events: none;
    /* 移动端安全区域支持 - 移除重复的padding */
}

.seek-answer-btn {
    width: 100%;
    max-width: 680px;
    padding: 18px 30px;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b35 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    /* 移动端优化：防止长按时触发系统菜单 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 防止移动端长按时出现系统菜单 */
    -webkit-tap-highlight-color: transparent;
    /* Safari特殊优化 */
    -webkit-appearance: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.seek-answer-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 165, 0, 0.3);
}

.seek-answer-btn:disabled {
    background: #F1F1F1;
    color: #d4d4d4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.seek-answer-btn:active:not(:disabled) {
    transform: translateY(0);
}

.seek-answer-btn.holding {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b35 100%);
    /* 仅按住时缩小到90% */
    transform: scale(0.9) !important;
    animation: seek-hold-inset-shadow 1.2s linear infinite;
    box-shadow: 0px 0px 24px 0px rgba(255,255,255,0.3) inset;
}

@keyframes seek-hold-inset-shadow {
    0% {
        box-shadow: 0px 0px 24px 0px rgba(255,255,255,0.4) inset;
    }
    40% {
        box-shadow: 0px 0px 24px 0px rgba(255,255,255,1) inset;
    }
    60% {
        box-shadow: 0px 0px 24px 0px rgba(255,255,255,1) inset;
    }
    100% {
        box-shadow: 0px 0px 24px 0px rgba(255,255,255,0.4) inset;
    }
}

.action-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    max-width: 680px;
    flex-wrap: nowrap;
}

.save-btn, .new-question-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 8px;
    border: none;
    border-radius: 4px !important;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F1F1F1;
    color: #222222;
    /* 移动端优化 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.save-btn:hover, .new-question-btn:hover {
    background: #E5E5E5;
    transform: translateY(-2px);
}

.save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.save-btn .icon-bookmark {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}
.save-btn .icon-bookmark svg {
    display: block;
    width: 1.2em;
    height: 1.2em;
    stroke: #222;
}

/* 响应式设计 */
/* 平板尺寸响应式 */
@media (max-width: 1024px) and (min-width: 769px) {
    .history-list {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 20px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0;
    }
    
    .question-section {
        max-width: 100%;
    }
    
    .history-list {
        max-width: 100%;
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }
    
    .history-card {
        min-height: 140px;
        height: auto;
        padding: 16px;
    }
    
    .history-card-content {
        top: 16px;
        left: 16px;
        right: 16px;
        bottom: 45px;
    }
    
    .history-card-bottom {
        bottom: 16px;
        left: 16px;
        right: 45px;
    }
    
    .history-delete {
        bottom: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
    }
    
    .history-delete img {
        width: 20px;
        height: 20px;
    }
    
    .history-card .history-question {
        font-size: 16px;
    }
    
    .history-card .history-answer {
        font-size: 20px;
    }
    
    /* 移动端输入框字体大小调整 - 保持固定大小 */
    .question-input {
        font-size: 32px;
    }
    
    /* 移动端占位文字大小调整 - 保持固定大小 */
    .placeholder-text {
        font-size: 32px;
    }
    
    /* 移动端按钮优化 - 保持固定大小 */
    .seek-answer-btn {
        padding: 18px 30px;
        font-size: 18px;
    }
    
    /* 移动端答案文字大小 */
    .answer-text {
        font-size: 20px;
    }
    
    /* 移动端顶部栏优化 - 保持固定高度避免跳格 */
    .top-bar {
        height: 100px;
        padding-top: calc(env(safe-area-inset-top) + 16px);
        padding-bottom: 16px;
        padding-left: calc(24px + env(safe-area-inset-left));
        padding-right: calc(24px + env(safe-area-inset-right));
    }
    
    /* 移动端底部栏优化 - 保持固定高度避免跳格 */
    .bottom-bar {
        height: 100px;
        padding-top: 16px;
        padding-bottom: calc(env(safe-area-inset-bottom) + 16px);
        padding-left: calc(24px + env(safe-area-inset-left));
        padding-right: calc(24px + env(safe-area-inset-right));
    }
}

@media (max-width: 600px) {
    .date-display {
        left: 24px;
        top: 50%;
        transform: translateY(-50%);
        text-align: left;
        margin-left: 0;
        position: absolute;
    }
    
    /* 小屏幕设备顶部栏进一步优化 - 保持固定高度避免跳格 */
    .top-bar {
        height: 100px;
        padding-top: calc(env(safe-area-inset-top) + 12px);
        padding-bottom: 12px;
        padding-left: calc(24px + env(safe-area-inset-left));
        padding-right: calc(24px + env(safe-area-inset-right));
    }
    
    /* 小屏幕设备底部栏进一步优化 - 保持固定高度避免跳格 */
    .bottom-bar {
        height: 100px;
        padding-top: 12px;
        padding-bottom: calc(env(safe-area-inset-bottom) + 12px);
        padding-left: calc(24px + env(safe-area-inset-left));
        padding-right: calc(24px + env(safe-area-inset-right));
    }
    
    /* 小屏幕设备按钮优化 - 保持固定大小 */
    .seek-answer-btn {
        padding: 18px 30px;
        font-size: 18px;
    }
    
    /* 小屏幕设备历史按钮优化 - 保持固定大小 */
    .history-btn, .settings-menu-btn {
        height: 36px;
        min-width: 36px;
        padding: 0 14px;
        font-size: 15px;
    }
    
    /* 小屏幕设备输入框和占位文字优化 - 保持固定大小 */
    .question-input {
        font-size: 32px;
    }
    
    .placeholder-text {
        font-size: 32px;
    }
    
    /* 移动端下拉菜单优化 */
    .settings-menu-dropdown {
        min-width: 180px;
        right: -8px;
        top: 40px;
    }
    
    .settings-menu-item {
        padding: 12px 16px 12px 24px;
        min-height: 48px;
    }
    
    /* 小屏幕卡片优化 */
    .history-list {
        padding: 12px;
        gap: 12px;
    }
    
    .history-card {
        min-height: 120px;
        padding: 14px;
    }
    
    .history-card-content {
        top: 14px;
        left: 14px;
        right: 14px;
        bottom: 40px;
        gap: 6px;
    }
    
    .history-card-bottom {
        bottom: 14px;
        left: 14px;
        right: 40px;
    }
    
    .history-delete {
        bottom: 6px;
        right: 6px;
        width: 26px;
        height: 26px;
    }
    
    .history-delete img {
        width: 18px;
        height: 18px;
    }
    
    .history-card .history-question {
        font-size: 15px;
    }
    
    .history-card .history-answer {
        font-size: 18px;
    }
}

/* 滚动条样式 */
.history-content::-webkit-scrollbar {
    width: 6px;
}

.history-content::-webkit-scrollbar-track {
    background: rgba(255, 165, 0, 0.1);
    border-radius: 3px;
}

.history-content::-webkit-scrollbar-thumb {
    background: rgba(255, 165, 0, 0.3);
    border-radius: 3px;
}

.history-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 165, 0, 0.5);
}

.history-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.history-delete {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px !important;
    transition: background 0.2s;
    visibility: hidden;
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.history-item:hover .history-delete,
.history-card:hover .history-delete {
    visibility: visible;
}

.history-delete img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.history-delete:hover {
    background: #e8e8e8;
    border-radius: 4px !important;
}

.delete-toast {
    display: inline-flex;
    padding: 6px 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 4px !important;
    border: 0.5px solid #EAEAEA;
    background: #FFF;
    box-shadow: 0px 9px 6.3px 0px rgba(0, 0, 0, 0.07);
    color: #222;
    font-size: 14px;
    font-weight: 500;
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(-8px);
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.history-delete:hover .delete-toast {
    opacity: 1;
}

.global-toast {
    position: fixed;
    top: 32px;
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 3000;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 220px;
    max-width: 400px;
    padding: 8px 16px;
    border-radius: 16px !important;
    border: 0.5px solid #e3e3e3;
    background: #FFF;
    box-shadow: 0px 10px 13.7px -4px rgba(0, 0, 0, 0.03);
    color: #222;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-40px) scale(0.98);
    transition: opacity 0.3s, transform 0.4s cubic-bezier(.4,1.3,.6,1), box-shadow 0.3s;
}
.global-toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}
.global-toast.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-40px) scale(0.98);
}
.global-toast-message {
    flex: 1 1 auto;
    text-align: left;
    padding-right: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.global-toast-action {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
}
.global-toast .toast-undo {
    margin-left: 0;
    color: #5FCDA8;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 10px;
    transition: background 0.3s;
}
.global-toast .toast-undo:hover {
    background: #eafaf5;
}
.global-toast .toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.global-toast .toast-close:hover {
    background: #e8e8e8;
    color: #666;
}
.global-toast .toast-retry,
.global-toast .toast-details {
    background: none;
    border: none;
    color: #ff8c00;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 10px;
    transition: background 0.3s;
}
.global-toast .toast-retry:hover,
.global-toast .toast-details:hover {
    background: #fff3e6;
}

.top-bar {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    padding: 0 24px;
    position: relative;
    flex-shrink: 0;
}

.bottom-bar {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    left: 0;
    bottom: 0;
    /* background: #fff; */
    z-index: 100;
    box-sizing: border-box;
    padding: 0 24px;
    flex-shrink: 0;
}

.seek-btn-overlay {
    display: none;
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(238,82,25,0.4);
    border-radius: 16px;
    z-index: 0;
    pointer-events: none;
}

.seek-answer-btn > .btn-text,
-loading {
    position: relative;
    z-index: 1;
}

.seek-answer-btn.holding .seek-btn-overlay {
    display: block;
}

.empty-history {
    grid-column: 1 / -1;
    position: relative;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    box-sizing: border-box;
}

.empty-svg {
    width: 680px;
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.empty-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 13px;
    font-style: normal;
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.history-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 16px;
}
.export-btn, .import-btn {
    background: #F4F4F4;
    color: #222222;
    border: none;
    border-radius: 4px !important;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.export-btn:hover, .import-btn:hover {
    background: #E8E8E8;
    color: #222222;
    transform: translateY(-1px);
}

.import-modal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.import-modal-content {
    background: #fff;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    padding: 32px 28px 24px 28px;
    min-width: 400px;
    width: 420px;
    max-width: 98vw;
    text-align: center;
}
.import-modal-title {
    font-size: 17px;
    color: #222;
    margin-bottom: 28px;
    font-weight: 500;
}
.import-modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}
.import-modal-actions .import-cancel {
    flex: 1 1 0;
    background: #f5f5f5;
    color: #888;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s;
}
.import-modal-actions .import-cancel:hover {
    background: #ececec;
}
.import-modal-actions .import-confirm {
    flex: 1 1 0;
    background: #ff8c00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s;
}
.import-modal-actions .import-confirm:hover {
    background: #ff6b35;
}

.history-actions-float {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    max-width: 680px;
    min-width: 0;
    justify-content: center;
}
.history-actions-float .export-btn,
.history-actions-float .import-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 8px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #F1F1F1;
    color: #222222;
}
.history-actions-float .export-btn:hover,
.history-actions-float .import-btn:hover {
    background: #E5E5E5;
    transform: translateY(-2px);
}

.history-gradient-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    pointer-events: none;
    z-index: 9;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #FFF 100%);
}

.history-gradient-top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 90px;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(0deg, #FFF 80%, rgba(255,255,255,0) 100%);
}

.settings-menu-dropdown {
    position: absolute;
    right: 0;
    top: 44px;
    min-width: 200px;
    background: #fff;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 8px 8px;
    font-size: 15px;
    font-weight: 500;
    user-select: none;
    /* 移动端优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* 确保在移动端正确显示 */
    pointer-events: auto;
}
.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 10px 20px;
    color: #222;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    position: relative;
    text-align: left;
    /* 移动端优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* 增加点击区域 */
    min-height: 44px;
}
.settings-menu-item:hover {
    background: none;
}
.settings-menu-item::after {
    content: '';
    display: none;
    position: absolute;
    left: 4px;
    right: 4px;
    top: 0;
    bottom: 0;
    border-radius: 6px;
    background: #F4F4F4;
    z-index: -1;
}
.settings-menu-item:hover::after {
    display: block;
}
.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    height: 20px;
    margin-right: 4px;
}

.reward-modal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reward-modal-content {
    background: #fff;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
    padding: 32px 28px 24px 28px;
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.reward-modal-title {
    font-size: 17px;
    color: #222;
    margin-bottom: 18px;
    font-weight: 500;
}
.reward-modal-close {
    margin-top: 18px;
    background: #f5f5f5;
    color: #888;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 0;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}
.reward-modal-close:hover {
    background: #ececec;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.settings-menu-divider {
    height: 1px;
    background: #ececec;
    margin: 6px 0;
    border-radius: 1px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.history-count {
    font-size: 18px;
    color: #222222;
    font-weight: 500;
    font-family: 'Source Serif 4', serif;
    margin-left: 6px;
    vertical-align: middle;
    display: inline-block;
    min-width: 22px;
    text-align: center;
}

/* 圆角分级 */
.rounded-sm { border-radius: 4px !important; }
.rounded-md { border-radius: 8px !important; }
.rounded-lg { border-radius: 16px !important; }

/* 小圆角适用：小按钮、悬浮toast等 */
.export-btn, .import-btn, .save-btn, .new-question-btn, .action-buttons, .history-delete, .delete-toast {
    border-radius: 4px !important;
}

/* 普通圆角适用：历史项、菜单、下拉、数字等 */
.history-item, .history-count, .import-mode-btn, .import-modal, .settings-menu-dropdown {
    border-radius: 8px !important;
}

#loadingPage {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(180deg,#fff 100%,#fff 100%);
    transition: opacity 0.3s;
    padding-top: calc(12vh + 30px);
}

.loading-tip {
    font-size: 32px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 32px;
    text-align: center;
    max-width: 80vw;
    line-height: 1.6;
    font-family: 'SimSun', '宋体', serif;
}

#loadingCountdown {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    margin: 0;
    font-size: 48px;
    font-weight: 700;
    color: #eeeeee;
    font-family: 'Source Serif 4', serif;
}

.loading-flipbook {
    display: block;
    margin: 0 auto -20px auto;
    width: 280px;
    max-width: 90vw;
    height: auto;
    object-fit: contain;
    /* 动图本身会自动循环，无需额外css */
}

/* 网站备案信息样式 */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid #f0f0f0;
    z-index: 1000;
    padding: 8px 0;
}

.footer-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.icp-info {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.icp-info a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.icp-info a:hover {
    color: #666;
}

/* 确保备案信息不影响主要内容 */
.main-content {
    padding-bottom: 40px;
}

/* 下拉菜单备案信息样式 - 左对齐 */
.dropdown-icp-info {
    text-align: left;
    font-size: 11px;
    color: #bbb;
    margin: 6px 0 2px 20px;
    line-height: 1.4;
    pointer-events: auto;
    user-select: text;
}
.dropdown-icp-info a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s;
}
.dropdown-icp-info a:hover {
    color: #888;
    text-decoration: underline;
}

@keyframes bounce {
    0% { transform: scale(1); }
    20% { transform: scale(1.15, 0.85); }
    40% { transform: scale(0.95, 1.05); }
    60% { transform: scale(1.05, 0.95); }
    80% { transform: scale(0.98, 1.02); }
    100% { transform: scale(1); }
}
.bounce {
    animation: bounce 0.5s cubic-bezier(.4,1.3,.6,1) !important;
    transform-origin: 50% 50%;
}

.orange {
    color: #ff8c00;
    font-weight: bold;
}
