/* 全局风格化页面样式 */

/* 基础样式 */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    max-height: 100vh;
}

/* 页面布局（对齐智能扩图） */
.main-content {
    margin-left: 0 !important;
    margin-top: 60px !important;
    padding: 0 !important;
    height: calc(100vh - 60px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}

.page-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0 1rem 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.expansion-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: stretch;
    flex: 1;
    overflow: hidden;
}

@media (min-width: 1280px) {
    .expansion-grid {
        grid-template-columns: 525px minmax(520px, 1fr) minmax(0, 300px);
    }

    .expansion-grid.history-panel-collapsed {
        grid-template-columns: 525px minmax(0, 1fr) minmax(0, 0px);
    }

    .expansion-grid > .left-panel-container {
        width: 100%;
        min-width: 525px;
        max-width: 525px;
        box-sizing: border-box;
    }

    .left-panel-container > #function-center-container {
        flex: 0 0 200px !important;
        width: 200px !important;
        min-width: 200px !important;
        max-width: 200px !important;
    }
}

.left-panel-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.left-panel-container > #function-center-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    border-right: 1px solid #e5e7eb;
}

.left-panel-container .function-center {
    border-right: none;
}

.left-panel-container > #function-center-container .function-center {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
}

#function-center-container {
    box-sizing: border-box;
    flex: 0 0 200px;
    width: 200px;
    min-width: 200px;
    min-height: 0;
    align-self: stretch;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#function-center-container::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.right-panel {
    margin-top: 1rem;
    height: calc(100vh - 96px);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding-right: 4px;
}

@media (max-width: 1279px) {
    html, body {
        overflow: hidden;
    }

    .main-content {
        height: calc(100vh - 60px);
        overflow: hidden;
    }

    .page-wrapper {
        overflow: hidden;
    }

    .expansion-grid {
        overflow-y: auto;
    }

    .left-panel-container {
        flex-direction: column;
        height: auto;
        max-height: none;
    }

    .left-panel-container > #function-center-container {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .left-panel-container > #function-center-container .function-center {
        flex: none;
        min-height: 0;
    }

    .expansion-settings {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        max-height: none;
        align-self: stretch;
    }

    .right-panel {
        height: auto;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}

/* 功能中心 */
.function-center {
    position: relative;
    height: auto;
    overflow: visible;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
    padding: 0.875rem 2px 0.875rem 8px;
}

.function-center h3 {
    font-size: 0.875rem;
}

.function-group {
    margin-top: 12px;
}

.function-group-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 4px 0;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.function-group-title:hover {
    color: #6366f1;
}

.function-group-title-content {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.function-group-toggle {
    font-size: 0.875rem;
    color: #9ca3af;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.function-group-toggle:hover {
    background-color: #f3f4f6;
    color: #6366f1;
}

.function-group-title.collapsed .function-group-toggle {
    transform: rotate(-90deg);
}

.function-list {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    /* 原来 max-height: 500px，当单组功能项较多（如亚马逊助手）时，后面的入口会被直接裁掉不显示。
       这里调大到足够大的值，既保留展开/收起动画，又能完整显示所有入口。 */
    max-height: 1200px;
    opacity: 1;
}

.function-group-title.collapsed + .function-list {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

.function-list a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.function-list a:hover {
    background: #f3f4f6;
    color: #6366f1;
}

/* 当前激活的功能项样式（用于侧边菜单高亮） */
.function-list a.active {
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 600;
}

/* 上传区域（参照智能扩图） */
.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    pointer-events: auto;
    z-index: 1;
    background: #fafafa;
}

#image-upload {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-preview {
    position: absolute;
    inset: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    object-fit: contain;
    border-radius: 12px;
    background: #ffffff;
    display: none;
    z-index: 1;
}

.upload-area.upload-has-image .upload-content {
    display: none !important;
}

.upload-area.upload-has-image .upload-preview {
    display: block;
}

.upload-actions {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 2;
}

.upload-actions::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.reupload-btn,
.delete-upload-btn {
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reupload-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 18px;
    border-radius: 8px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    border: 1px solid #e5e7eb;
    z-index: 3;
}

.reupload-btn:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.32);
}

.reupload-btn.hovered {
    background: #3b82f6;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.32);
}

.delete-upload-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.delete-upload-btn:hover {
    background: rgba(0, 0, 0, 0.85);
}

.upload-area.upload-has-image:hover .upload-actions {
    display: block !important;
}

.upload-area:hover {
    border-color: #6366f1;
    background: #f5f7ff;
}

.upload-area:hover .upload-content .bg-gray-100 {
    background: #e5e7eb;
}

.upload-area:hover .upload-content i {
    color: #6366f1;
}

.upload-area.dragover {
    border-color: #6366f1;
    background: #eef2ff;
    border-style: solid;
}

.upload-area.dragover .upload-content i,
.upload-area.dragover .upload-content p {
    color: #6366f1;
}

.upload-content {
    pointer-events: none;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.upload-content i {
    display: block;
    margin: 0 auto;
    margin-bottom: 0.5rem;
}

.upload-content p {
    margin: 0;
    line-height: 1.4;
}

/* 设置区（对齐智能扩图） */
.expansion-settings {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    background: #ffffff;
}

.expansion-settings-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem;
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    .expansion-settings {
        flex: 0 0 325px !important;
        width: 325px !important;
        min-width: 325px !important;
        max-width: 325px !important;
        height: 796px !important;
        min-height: 796px !important;
        max-height: 796px !important;
        align-self: flex-start;
    }

    .expansion-settings-content {
        scrollbar-gutter: stable;
    }
}

.expansion-settings-content::-webkit-scrollbar {
    width: 6px;
}

.expansion-settings-content::-webkit-scrollbar-track {
    background: transparent;
}

.expansion-settings-content::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.35);
    border-radius: 999px;
}

.expansion-settings-content::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.6);
}

/* 生成按钮样式 */
#generate-btn {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
}

/* 操作按钮样式（参照智能扩图） */
#download-btn,
#save-to-downloads-btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

#download-btn:hover,
#save-to-downloads-btn:hover {
    transform: translateY(-1px);
}

#download-btn:active,
#save-to-downloads-btn:active {
    transform: translateY(0);
}

#download-btn {
    background: #6366f1;
}

#download-btn:hover {
    background: #4f46e5;
}

#save-to-downloads-btn {
    background: #10b981;
}

#save-to-downloads-btn:hover {
    background: #059669;
}

@media (max-width: 1279px) {
    #function-center-container {
        flex: none;
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        max-height: none;
        overflow-y: visible;
    }
    .function-center {
        width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
}

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* 效果展示区域（完全对齐智能扩图） */
#effect-showcase {
    height: calc(100vh - 96px);
    max-height: calc(100vh - 96px);
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 1rem;
    box-sizing: border-box;
}
/* 隐藏效果展示区域的滚动条，避免窄屏下出现横向滚动条 */
#effect-showcase::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

#effect-showcase.history-collapsed {
    transform: none;
}

/* 效果展示容器 */
#effect-showcase-container {
    width: 805px;
    height: 655px;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 26px;
    padding: 2rem;
    margin: 0 auto;
}

/* 全屏显示模式（显示图片时） */
#effect-showcase-container.fullscreen-mode {
    padding: 0;
    border-radius: 26px;
    overflow: hidden;
}

/* 默认内容包装器 */
#effect-default-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* 全局风格化效果展示区不需要内部滚动条，统一禁用滚动，避免出现滑块 */
    overflow: hidden;
}

#effect-showcase-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 功能介绍标题 */
#effect-intro-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* 轮播容器 */
.effect-carousel {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carousel-track {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 360px;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.carousel-slide.active {
    display: flex;
    opacity: 1;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.carousel-nav:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #0ea271;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.carousel-nav.prev {
    left: 8px;
}

.carousel-nav.next {
    right: 8px;
}

.carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.25rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.carousel-dot.active {
    width: 18px;
    background: linear-gradient(90deg, #4f46e5 0%, #10b981 100%);
    box-shadow: 0 3px 8px rgba(79, 70, 229, 0.25);
}

/* 一键体验按钮（黑色渐变，与智能扩图一致） */
.one-click-btn {
    background: linear-gradient(180deg, #3c3c3c 0%, #111111 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 64px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid #222222;
    transition: all 0.2s ease;
    min-width: 180px;
}

.one-click-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
}

.one-click-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    background: linear-gradient(180deg, #2f2f2f 0%, #0d0d0d 100%);
}

/* 效果展示图片容器 */
.effect-image-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 单个图片展示区域 */
.effect-image-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.effect-image-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.effect-image-wrapper {
    width: 279px;
    height: 279px;
    max-width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.effect-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.effect-image-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #9ca3af;
}

.effect-image-placeholder-content i {
    font-size: 2.5rem;
}

/* 箭头连接（对齐智能扩图的效果展示箭头样式） */
.effect-arrow {
    display: none;
}

@media (min-width: 768px) {
    .effect-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #eef2ff;
        color: #4f46e5;
        box-shadow: 0 8px 20px rgba(79, 70, 229, 0.15);
        flex-shrink: 0;
        font-size: 1.25rem;
    }
}

/* 全屏显示的图片 */
.effect-full-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f9fafb;
    z-index: 10;
    padding: 0;
    margin: 0;
    display: block;
    visibility: visible;
    opacity: 1;
    border-radius: 26px;
}

/* 确保容器内的图片继承圆角 */
#effect-showcase-container.fullscreen-mode .effect-full-image {
    border-radius: 26px;
}

.effect-full-image.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 响应式：小屏幕下的圆角 */
@media (max-width: 1279px) {
    #effect-showcase-container.fullscreen-mode .effect-full-image {
        border-radius: 20px;
    }
}

/* 滚动条美化 */
#effect-showcase-container::-webkit-scrollbar {
    width: 6px;
}

#effect-showcase-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#effect-showcase-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#effect-showcase-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 兼容旧的 carousel-dots button 写法 */
.carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.carousel-dots button.active {
    width: 18px;
    background: linear-gradient(90deg, #4f46e5 0%, #10b981 100%);
    box-shadow: 0 3px 8px rgba(79, 70, 229, 0.25);
}

/* 历史记录列表样式 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    max-height: calc(100vh - 240px);
}

/* 历史记录卡片样式（与智能扩图一致） */
.history-card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    transform: none;
    box-shadow: none;
}

.history-card:hover {
    opacity: 0.8;
    box-shadow: none;
}

.history-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* 删除重复的 carousel-slide 定义，以下为补全 */
.carousel-slide.placeholder {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.carousel-slide.active {
    display: flex;
    opacity: 1;
}

/* 历史列 */
.history-column {
    margin-top: 1rem;
    height: calc(100vh - 96px);
    max-height: calc(100vh - 96px);
    width: 100%;
    max-width: 300px;
    overflow: hidden;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.25s ease, max-width 0.25s ease, padding 0.25s ease;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.history-toggle {
    position: absolute;
    top: 1.25rem;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.history-toggle:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}

.history-toggle .toggle-icon {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.history-toggle span {
    font-size: 13px;
    font-weight: 700;
}

.history-column.collapsed {
    width: 0;
    max-width: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    overflow: visible;
}

.history-column.collapsed .history-content {
    display: none;
}

.history-column.collapsed .history-toggle {
    position: fixed;
    top: 1.25rem;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 104px;
    padding: 10px 8px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    border-color: #e5e7eb;
    gap: 8px;
    z-index: 40;
}

.history-column.collapsed .history-toggle .toggle-icon {
    transform: rotate(180deg);
    font-size: 18px;
}

.history-column.collapsed .history-toggle span {
    line-height: 1.2;
    font-size: 13px;
    font-weight: 700;
}

.history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    padding: 1rem;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.history-content::-webkit-scrollbar {
    display: none;
}

/* 历史记录头部按钮组下移，避免被折叠按钮覆盖 */
.history-actions {
    margin-top: 2rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.history-card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: transparent;
    transform: none;
    box-shadow: none;
}

.history-card:hover {
    opacity: 0.8;
    box-shadow: none;
}

.history-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* 三张一屏 + 纯图片列表（同步图像上色） */
#history-container {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

#history-container .bg-white {
    flex: 0 0 auto;
    max-height: calc((100vh - 320px) / 3);
    overflow: visible;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

#history-container .bg-white .p-4,
#history-container .bg-white .p-3 {
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: visible;
    flex: 1;
}

#history-container .bg-white img {
    max-height: calc((100vh - 280px) / 3);
    object-fit: contain;
    width: 100%;
    flex: 1;
    height: auto;
    min-height: 0;
    border-radius: 0;
}

#history-container .bg-white p {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.history-time-notice {
    margin-top: auto;
    flex-shrink: 0;
    padding: 0.75rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    color: #6b7280;
}

.history-time-notice p {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
}

@media (max-width: 1279px) {
    #effect-showcase {
        height: auto;
        max-height: none;
        padding: 1rem;
    }

    #effect-showcase-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 400px;
        max-height: calc(100vh - 120px);
        padding: 1.5rem;
        border-radius: 20px;
    }

    #effect-showcase-container.fullscreen-mode {
        padding: 0;
        border-radius: 20px;
    }

    .effect-full-image {
        border-radius: 20px;
    }

    .history-column {
        height: auto;
        max-height: none;
    }

    .history-column.collapsed {
        width: 100%;
        max-width: none;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .history-column.collapsed .history-content {
        display: flex;
    }

    .history-column.collapsed .history-toggle {
        position: absolute;
        top: 1.25rem;
        right: 12px;
        width: auto;
        height: auto;
        flex-direction: row;
        box-shadow: none;
        border-radius: 999px;
    }
}


/* 动画效果 */
@keyframes firefly-glow {
    0% { text-shadow: 0 0 3px rgba(99, 102, 241, 0.5); }
    50% { text-shadow: 0 0 10px rgba(99, 102, 241, 0.8), 0 0 15px rgba(99, 102, 241, 0.3); }
    100% { text-shadow: 0 0 3px rgba(99, 102, 241, 0.5); }
}

.logo-text {
    animation: firefly-glow 3s infinite;
}

.logo-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #6366f1;
    border-radius: 50%;
    margin-left: 2px;
    margin-right: 4px;
    position: relative;
    top: -2px;
}

/* 图片预览样式 */
.image-preview {
    aspect-ratio: 16/9;
    background-color: #f3f4f6;
}

/* 加载动画 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 5px solid rgba(99, 102, 241, 0.2);
    border-top-color: rgba(99, 102, 241, 1);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 任务列表样式 */
.style-task {
    transition: all 0.3s ease;
}

/* 激活选项样式 */
.active-option {
    background-color: #ede9fe;
    border-color: #6366f1;
    color: #4f46e5;
}

/* 图片拖动禁用 */
img {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* 图像容器 */
.canvas-container {
    position: relative;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f9fafb;
}

/* 滑动控件样式 */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    transition: all 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.1);
}

input[type="range"]::-moz-range-thumb:hover {
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.1);
}

/* 滑块下方标签样式 */
.strength-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #6366f1;
    background-color: #f9fafb;
}

/* 风格选项样式 */
.style-option {
    transition: all 0.3s ease;
}

.style-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .strength-container {
        padding: 0 0.5rem;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 22px;
        height: 22px;
    }
}

/* 任务卡片样式 */
.style-task {
    background-color: #f9fafb;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.style-task:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 状态标签样式 */
.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-running {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-succeeded {
    background-color: #d1fae5;
    color: #065f46;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 按钮样式 */
.btn-primary {
    background-color: #4f46e5;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: #4f46e5;
    border: 1px solid #4f46e5;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
}

/* 加载遮罩样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 24rem;
    width: 100%;
}

/* 结果展示样式 */
.result-container {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.result-image-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background-color: #f9fafb;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #374151;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 错误提示样式 */
.error-message {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* 成功提示样式 */
.success-message {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* 警告提示样式 */
.warning-message {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
} 