/* 基础样式重置和字体设置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 购买积分页面样式 */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-8 {
    padding: 2rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-bold {
    font-weight: 700;
}

.mb-8 {
    margin-bottom: 2rem;
}

.bg-purple-600 {
    background-color: #7c3aed;
}

.text-white {
    color: #ffffff;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.border-2 {
    border-width: 2px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.p-4 {
    padding: 1rem;
}

.cursor-pointer {
    cursor: pointer;
}

.hover\:border-purple-500:hover {
    border-color: #a855f7;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.bg-white {
    background-color: #ffffff;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-semibold {
    font-weight: 600;
}

.text-gray-800 {
    color: #1f2937;
}

.text-purple-600 {
    color: #7c3aed;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.w-full {
    width: 100%;
}

.hover\:bg-purple-700:hover {
    background-color: #6d28d9;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.flex {
    display: flex;
}

.space-x-6 {
    gap: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.items-center {
    align-items: center;
}

.mr-2 {
    margin-right: 0.5rem;
}

.text-green-500 {
    color: #10b981;
}

.mr-1 {
    margin-right: 0.25rem;
}

.text-blue-500 {
    color: #3b82f6;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.bg-green-600 {
    background-color: #10b981;
}

.hover\:bg-green-700:hover {
    background-color: #059669;
}

.border-green-500 {
    border-color: #10b981;
}

.bg-green-50 {
    background-color: #ecfdf5;
}

.ring-2 {
    box-shadow: 0 0 0 2px currentColor;
}

.ring-green-300 {
    color: #d1fae5;
    box-shadow: 0 0 0 2px #d1fae5;
}

/* 响应式媒体查询 */
@media (max-width: 768px) {

    /* 容器调整 */
    .container {
        padding: 0 1rem;
    }

    /* 头部导航 */
    .gallery-header {
        padding: 12px 0;
    }

    .gallery-logo {
        width: 32px;
        height: 32px;
    }

    .gallery-title {
        font-size: 1rem;
    }

    .gallery-settings-button {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* 主内容布局 */
    .main-content-grid {
        flex-direction: column;
        gap: 1rem;
    }

    /* 控制面板 */
    .gallery-card {
        padding: 1rem;
        margin: 0 1rem;
    }

    /* 购买积分模态框 */
    .gallery-progress-card {
        min-width: unset;
        max-width: 100vw;
        padding: 8px;
        margin: 0;
        max-height: 75vh;
        overflow-y: auto;
    }

    /* 模态框标题 */
    .text-xl.font-bold {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    /* 积分套餐网格 */
    .grid.grid-cols-2 {
        gap: 4px;
    }

    /* 套餐卡片 */
    .border-2.border-gray-300.rounded-lg.p-4 {
        padding: 4px;
        min-height: 70px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        gap: 2px;
    }

    /* 套餐卡片内文字 */
    .border-2.border-gray-300.rounded-lg.p-4>div {
        margin: 0;
        padding: 0;
    }

    /* 积分数量文字 */
    .border-2.border-gray-300.rounded-lg.p-4 .text-lg.font-semibold {
        font-size: 0.625rem;
    }

    /* 金额文字 */
    .border-2.border-gray-300.rounded-lg.p-4 .text-2xl.font-bold {
        font-size: 0.75rem;
    }

    /* 选择套餐文字 */
    .border-2.border-gray-300.rounded-lg.p-4 .text-purple-600.font-medium {
        font-size: 0.5rem;
    }

    /* 积分数量文字 */
    .text-lg.font-semibold {
        font-size: 0.625rem;
    }

    /* 金额文字 */
    .text-2xl.font-bold {
        font-size: 0.75rem;
        margin-top: 1px;
    }

    /* 选择套餐文字 */
    .mt-4.w-full.text-center {
        margin-top: 1px;
        font-size: 0.5rem;
    }

    /* 自定义金额卡片文字 */
    #customAmountCard .text-2xl.font-bold {
        font-size: 0.625rem !important;
    }

    #customAmountCard .text-lg.font-bold {
        font-size: 0.75rem !important;
        font-weight: bold !important;
    }

    /* 支付方式区域 */
    .bg-gray-50.p-4 {
        padding: 6px;
    }

    /* 积分说明区域 */
    .bg-blue-50.p-4 {
        padding: 6px;
        margin-top: 4px;
    }

    /* 说明文字 */
    .text-sm {
        font-size: 0.5rem;
        line-height: 1.1;
    }

    /* 立即支付按钮 */
    .py-3 {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    /* 按钮文字 */
    .text-lg.font-semibold {
        font-size: 0.625rem;
    }

    /* 间距调整 */
    .space-y-4 {
        gap: 4px;
    }

    .mb-6 {
        margin-bottom: 4px;
    }

    .mb-4 {
        margin-bottom: 2px;
    }

    .mb-2 {
        margin-bottom: 1px;
    }

    .mb-3 {
        margin-bottom: 2px;
    }

    /* 支付方式选项 */
    .flex.space-x-6 {
        gap: 8px;
    }

    /* 支付方式标签 */
    .flex.items-center label {
        font-size: 0.625rem;
    }

    /* 自定义金额模态框 */
    #customAmountModal .gallery-progress-card {
        max-width: 85vw;
        padding: 20px !important;
    }

    /* 桌面端自定义金额模态框 */
    @media (min-width: 769px) {
        #customAmountModal .gallery-progress-card {
            padding: 20px !important;
        }
    }

    /* 自定义金额输入框 */
    .w-full.p-3 {
        padding: 4px;
        font-size: 0.75rem;
    }

    /* 自定义金额按钮 */
    .py-2 {
        padding-top: 2px;
        padding-bottom: 2px;
        font-size: 0.625rem;
    }

    /* 自定义金额标签 */
    .block.text-gray-700.font-medium {
        font-size: 0.625rem;
        margin-bottom: 2px;
    }

    /* 关闭按钮 */
    #closePurchasePointsModal {
        width: 24px;
        height: 24px;
    }

    #closePurchasePointsModal span {
        font-size: 12px;
    }

    /* 批量按钮网格 */
    .batch-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-batch-button-modern {
        padding: 10px 12px !important;
        height: 40px !important;
        font-size: 0.875rem !important;
    }

    /* 模型选择 */
    .gallery-model-select {
        padding: 12px 32px 12px 16px;
        font-size: 0.875rem;
    }

    /* 上传区域 */
    .gallery-upload-zone-compact {
        min-height: 100px;
        padding: 10px;
    }

    /* 模板卡片 */
    .gallery-template-card {
        width: 120px;
    }

    .gallery-template-inner {
        padding: 8px;
    }

    .gallery-template-name {
        font-size: 0.75rem;
    }

    .gallery-template-desc {
        font-size: 0.6875rem;
    }

    /* 结果展示 */
    .gallery-image-frame {
        aspect-ratio: 1;
    }

    /* 进度状态 */
    .gallery-progress-inline {
        padding: 32px 20px;
        max-width: 90%;
    }

    .progress-title {
        font-size: 1.25rem;
    }

    .progress-number {
        font-size: 1.5rem;
    }

    /* 模态框 */
    .gallery-modal-card {
        margin: 1rem;
        max-width: 90%;
    }

    .gallery-modal-image {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {

    /* 更小型设备的调整 */
    .container {
        padding: 0 0.75rem;
    }

    /* 头部 */
    .gallery-title {
        font-size: 0.875rem;
    }

    .gallery-settings-button span {
        display: none;
    }

    /* 批量按钮 */
    .batch-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 模板卡片 */
    .gallery-template-card {
        width: 100px;
    }

    /* 上传提示 */
    .gallery-upload-text p {
        font-size: 0.75rem;
    }

    /* 生成按钮 */
    .gallery-accent-button {
        padding: 8px 16px;
        font-size: 0.875rem;
    }

    /* 结果区域 */
    .gallery-results-container {
        padding: 12px;
    }

    /* 空状态 */
    .gallery-empty-state {
        padding: 24px 16px;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        margin-top: 2rem;
    }

    .gallery-empty-icon svg {
        width: 120px;
        height: 120px;
    }

    .gallery-empty-title {
        font-size: 1rem;
    }

    .gallery-empty-subtitle {
        font-size: 0.75rem;
    }
}

/* 横屏移动设备优化 */
@media (max-height: 480px) and (orientation: landscape) {
    .gallery-card {
        padding: 0.75rem;
    }

    .gallery-upload-zone-compact {
        min-height: 80px;
    }

    .batch-buttons-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .gallery-batch-button-modern {
        height: 36px !important;
        font-size: 0.75rem !important;
    }

    .gallery-template-card {
        width: 90px;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
    line-height: 1.6;
    color: #374151;
    overflow-x: hidden;
    overflow-y: auto;
}

/* 渐变背景动画 */
.bg-gallery-gradient {
    background: linear-gradient(135deg, #fdf2f8, #fef7ff, #f0f9ff, #f7fee7, #fef3c7, #fdf2f8);
    background-size: 400% 400%;
    animation: gallery-gradient 20s ease-in-out infinite;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes gallery-gradient {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 浮动装饰元素 */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    animation-duration: 20s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b9d, #ffc3a0);
    top: 10%;
    left: 10%;
    animation-name: float-1;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #a8edea, #fed6e3);
    top: 20%;
    right: 15%;
    animation-name: float-2;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #d299c2, #fef9d7);
    bottom: 20%;
    left: 20%;
    animation-name: float-3;
    animation-delay: 4s;
}

.shape-4 {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #89f7fe, #66a6ff);
    top: 60%;
    right: 25%;
    animation-name: float-4;
    animation-delay: 6s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    bottom: 30%;
    right: 10%;
    animation-name: float-5;
    animation-delay: 8s;
}

@keyframes float-1 {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translate(0) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: translate(15px) rotate(-180deg);
        opacity: 0.4;
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: translateY(0) translate(0) rotate(0deg);
        opacity: 0.5;
    }

    33% {
        transform: translateY(-15px) translate(10px) rotate(120deg);
        opacity: 0.7;
    }

    66% {
        transform: translateY(10px) translate(-10px) rotate(240deg);
        opacity: 0.3;
    }
}

@keyframes float-4 {

    0%,
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-25px) scale(1.1) rotate(180deg);
        opacity: 0.4;
    }
}

@keyframes float-5 {

    0%,
    100% {
        transform: translate(0) translateY(0) rotate(0deg);
        opacity: 0.5;
    }

    25% {
        transform: translate(-10px) translateY(-10px) rotate(90deg);
        opacity: 0.7;
    }

    75% {
        transform: translate(10px) translateY(10px) rotate(270deg);
        opacity: 0.3;
    }
}

/* 页面动画效果 */
.animate-fade-in {
    animation: fade-in 1s ease-out;
}

.animate-slide-in-left {
    animation: slide-in-left 0.8s ease-out;
}

.animate-slide-in-right {
    animation: slide-in-right 0.8s ease-out 0.2s both;
}

.animate-slide-in-up {
    animation: slide-in-up 0.8s ease-out 0.4s both;
}

.animate-slide-in-down {
    animation: slide-in-down 0.5s ease-out;
}

.animate-bounce-in {
    animation: bounce-in 0.8s ease-out;
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-left {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-down {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce-in {
    0% {
        transform: scale(0.3) rotate(-10deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* 头部样式 */
.gallery-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(236, 72, 153, 0.2);
}

.gallery-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b9d, #ffc3a0, #a8edea);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-logo:hover {
    transform: none;
}

.gallery-title {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

.gallery-quota-card,
.gallery-loading {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 8px 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.gallery-quota-card:hover {
    transform: none;
    box-shadow: none;
}

.loading-dots {
    display: flex;
    gap: 2px;
}

.loading-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9ca3af;
    animation: loading-bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loading-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.gallery-icon-button {
    padding: 10px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 12px;
    color: #7c3aed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-icon-button svg {
    position: relative;
    z-index: 10;
    display: block;
}

/* 带文本的按钮样式 */
.gallery-text-button {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 12px;
    color: #7c3aed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
}

.gallery-text-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-text-button:hover:before {
    opacity: 0;
}

.gallery-text-button:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(147, 51, 234, 0.2);
}

.gallery-text-button svg,
.gallery-text-button span {
    position: relative;
    z-index: 10;
    display: inline !important;
    flex-shrink: 0;
}

.gallery-text-button span {
    white-space: nowrap;
}

.gallery-text-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 设置按钮样式 */
.gallery-settings-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 12px;
    color: #7c3aed;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
}

.gallery-settings-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-settings-button:hover:before {
    opacity: 0;
}

.gallery-settings-button:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(147, 51, 234, 0.2);
}

.gallery-settings-button svg,
.gallery-settings-button span {
    position: relative;
    z-index: 10;
}

.gallery-settings-button svg {
    display: inline-block;
    flex-shrink: 0;
    color: #7c3aed;
    stroke: currentColor;
}

.gallery-settings-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 状态指示器动画 */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* 状态指示器圆点 */
.status-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background-color: #4ade80 !important;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
    flex-shrink: 0 !important;
    display: block !important;
}

/* 状态指示器专用动画 */
@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}



/* 复制URL功能样式 */
.copy-url-input {
    position: relative;
}

.copy-url-input:hover {
    background-color: #f3f4f6 !important;
    border-color: rgba(236, 72, 153, 0.3) !important;
}

.copy-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #374151, #4b5563);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #374151;
}

.copy-url-input:hover+.copy-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.gallery-icon-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-icon-button:hover:before {
    opacity: 0;
}

.gallery-icon-button:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(147, 51, 234, 0.2);
}

.gallery-icon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gallery-status-card {
    border-radius: 12px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}



/* 卡片样式 */
.gallery-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(252, 231, 243, 0.65), rgba(245, 243, 255, 0.7), rgba(236, 254, 255, 0.65), rgba(255, 251, 235, 0.75));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(255, 105, 180, 0.08), inset 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(255, 105, 180, 0.15), inset 0 1px rgba(255, 255, 255, 0.6);
}

/* 标题样式 */
.gallery-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.gallery-subsection-title {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0;
}

/* 标签页样式 */
.gallery-tab-container,
.gallery-results-tab-container {
    display: flex;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 0;
    backdrop-filter: none;
    box-shadow: none;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-tab-button,
.gallery-results-tab-button {
    position: relative;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    background: none;
    text-align: center;
    flex: 1;
    margin: 0 10px;
}

/* 确保按钮内的 span 元素不会阻止点击事件 */
.gallery-tab-button span,
.gallery-results-tab-button span {
    pointer-events: none;
}

.gallery-tab-inactive,
.gallery-results-tab-inactive {
    color: #6b7280;
    background: rgba(243, 244, 246, 0.8);
    border: 1px solid rgba(209, 213, 219, 0.3);
}

.gallery-tab-inactive:hover,
.gallery-results-tab-inactive:hover {
    color: #ec4899;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.gallery-tab-active,
.gallery-results-tab-active {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-tab-text {
    background: linear-gradient(135deg, #ec4899, #f97316);
}

.gallery-tab-image {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
}

.gallery-results-tab-latest {
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

.gallery-results-tab-password {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.gallery-results-tab-history {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

/* 媒体类型选择按钮样式 */
.gallery-media-tab {
    position: relative;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-align: center;
    justify-content: center;
}

.gallery-media-tab-active {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#imageTab.gallery-media-tab-active {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#videoTab.gallery-media-tab-active {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.gallery-media-tab-inactive {
    color: #6b7280;
    background: rgba(243, 244, 246, 0.8);
    border: 1px solid rgba(209, 213, 219, 0.3);
}

.gallery-media-tab-inactive:hover {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.gallery-media-tab svg {
    flex-shrink: 0;
    display: inline-block;
    width: 1rem;
    height: 1rem;
}

/* 微信登录选项样式 */
.wechat-options {
    text-align: left;
    padding: 0 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.login-reminder {
    margin-top: 4px;
    text-align: left;
    padding-left: 0;
}

/* 微信快捷登录按钮样式 */
#wechatQuickLogin {
    background: #07C160 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
}

/* 密码登录区域样式 */
.password-login,
.wechat-login {
    padding: 56px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    text-align: left;
}

/* 手机端登录区域调整 */
@media (max-width: 768px) {

    .password-login,
    .wechat-login {
        padding: 32px 24px;
        margin: 0 16px;
    }
}

.password-login form {
    width: 100%;
}

.password-login .form-group {
    margin-bottom: 16px;
    width: 100%;
}

.password-login .form-group.remember-me {
    width: 100%;
    text-align: left;
    padding: 0;
}

.password-login .gallery-accent-button {
    margin-top: 16px;
    width: 100%;
}

/* 输入框样式 */
.gallery-input,
.gallery-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(236, 72, 153, 0.2);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
    resize: none;
}

.gallery-textarea {
    min-height: 120px;
    line-height: 1.6;
    padding-bottom: 40px;
    /* 为字符计数器留出空间 */
}

/* 确保textarea的父容器支持绝对定位 */
.gallery-textarea+.gallery-char-counter {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
}

/* 确保相对定位的父容器 */
.relative {
    position: relative !important;
}

.gallery-input:focus,
.gallery-textarea:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
    transform: translateY(-1px);
}

.gallery-input::placeholder,
.gallery-textarea::placeholder {
    color: #9ca3af;
}

.gallery-char-counter {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    z-index: 10;
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
}

/* 标签样式 */
.gallery-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.gallery-label.mb-0 {
    margin-bottom: 0;
}

.gallery-label-inline {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 按钮样式 */
.gallery-button,
.gallery-secondary-button,
.gallery-accent-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.gallery-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.gallery-button:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.gallery-secondary-button {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(156, 163, 175, 0.1));
    border: 1px solid rgba(107, 114, 128, 0.2);
    color: #6b7280;
    font-size: 1rem;
    padding: 10px 22px;
    min-width: 110px;
}

.gallery-secondary-button:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(156, 163, 175, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
    color: #4b5563;
}

.gallery-accent-button {
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    font-size: 1rem;
    padding: 10px 22px;
    min-width: 110px;
    width: 100%;
}

.gallery-accent-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #db2777, #7c3aed, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.gallery-accent-button:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6 !important;
}

.gallery-accent-disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.gallery-generate-loading {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    cursor: not-allowed !important;
}

/* 小尺寸按钮样式 */
.gallery-button-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(244, 63, 94, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    height: 32px;
    white-space: nowrap;
}

.gallery-button-small svg {
    flex-shrink: 0;
    display: inline-block;
}

.gallery-button-small:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(244, 63, 94, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* 文件上传区域 */
.gallery-upload-zone {
    border: 2px dashed rgba(236, 72, 153, 0.3);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(252, 231, 243, 0.3));
    backdrop-filter: blur(10px);
}

/* 紧凑文件上传区域 */
.gallery-upload-zone-compact {
    border: 2px dashed rgba(236, 72, 153, 0.3);
    border-radius: 12px;
    padding: 12px 12px 40px 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(252, 231, 243, 0.3));
    backdrop-filter: blur(10px);
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.gallery-upload-icon {
    margin-bottom: 4px;
}

.gallery-upload-text {
    text-align: center;
}

.gallery-upload-zone:hover,
.gallery-upload-zone-compact:hover {
    border-color: rgba(236, 72, 153, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(252, 231, 243, 0.5));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2);
}

.gallery-upload-zone-active {
    border-color: #ec4899;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(252, 231, 243, 0.6));
    transform: scale(1.02);
}

.gallery-upload-zone-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gallery-upload-icon {
    margin-bottom: 16px;
}

.gallery-upload-icon-compact {
    margin-bottom: 2px;
}

.gallery-upload-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.gallery-upload-button:hover {
    background: linear-gradient(135deg, #db2777, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.gallery-upload-link {
    color: #ec4899;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.gallery-upload-link:hover {
    color: #db2777;
    text-decoration: none;
}

/* 上传区域悬停提示 */
.gallery-upload-tooltip {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.gallery-upload-zone-compact:hover .gallery-upload-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.gallery-tooltip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    white-space: nowrap;
}

.gallery-tooltip-badge::before {
    content: "⌨️";
    font-size: 0.8em;
}

.gallery-upload-button-compact {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(236, 72, 153, 0.3);
    line-height: 1.2;
}

.gallery-upload-button-compact:hover {
    background: linear-gradient(135deg, #db2777, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.gallery-clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(244, 63, 94, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.gallery-clear-button:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(244, 63, 94, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.gallery-clear-button svg {
    flex-shrink: 0;
    display: inline-block;
}

/* 确保所有按钮中的SVG图标显示正常 */
.gallery-button-small svg,
.gallery-clear-button svg,
.gallery-secondary-button svg,
.gallery-accent-button svg {
    flex-shrink: 0;
    display: inline-block !important;
    width: 1rem;
    height: 1rem;
}

/* 图片预览样式 */
.gallery-image-preview-container {
    position: relative;
    animation: scale-in 0.3s ease-out;
}

.gallery-image-preview {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
}

.gallery-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.gallery-image-preview-container:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-remove-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #fff;
    border-radius: 50%;
    padding: 6px;
    opacity: 0;
    transition: all 0.3s ease;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.gallery-image-preview-container:hover .gallery-remove-button {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-remove-button:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    transform: scale(1.2);
}

.gallery-remove-button svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

@keyframes scale-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 批量生成控制样式 */
.gallery-batch-card-compact {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(252, 231, 243, 0.65), rgba(245, 243, 255, 0.7), rgba(236, 254, 255, 0.65), rgba(255, 251, 235, 0.75));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(255, 105, 180, 0.06), inset 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.gallery-batch-card-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(255, 105, 180, 0.1), inset 0 1px rgba(255, 255, 255, 0.6);
}

.gallery-batch-button-inline,
.gallery-quality-button-inline {
    position: relative;
    padding: 10px 12px !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    min-width: 90px !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 等高数量按钮 */
.gallery-batch-button-equal {
    position: relative;
    padding: 8px 12px !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    flex: 1;
    height: 36px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}





/* 现代化数量按钮网格 */
.batch-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

/* 现代化数量按钮样式 */
.gallery-batch-button-modern {
    position: relative;
    padding: 14px 16px !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    height: 48px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 现代化尺寸显示 */
.gallery-size-display-modern {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.12));
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.3s ease;
    cursor: not-allowed;
    opacity: 0.9;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.1);
}

.gallery-size-display-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.gallery-size-display-modern .gallery-size-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gallery-size-display-modern .gallery-size-text {
    font-size: 0.95rem;
    color: #059669;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.gallery-size-display-modern .gallery-size-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    letter-spacing: 0.5px;
}

/* 模型选择提示文本样式 */
.gallery-model-hint {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    text-align: right;
}

/* 模型选择下拉框样式 */
.gallery-model-select-container {
    position: relative;
    width: 100%;
}

.gallery-model-select {
    width: 100%;
    padding: 16px 40px 16px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(236, 72, 153, 0.2);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ec4899;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    backdrop-filter: blur(10px);
    /* 确保下拉菜单宽度与选择框一致 */
    max-width: 100%;
}

.gallery-model-select:hover {
    border-color: rgba(236, 72, 153, 0.3);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.gallery-model-select:focus {
    border-color: rgba(236, 72, 153, 0.5);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
    transform: translateY(-1px);
}

.gallery-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #ec4899;
    transition: all 0.3s ease;
}

.gallery-model-select-container:hover .gallery-select-arrow {
    color: #db2777;
}

/* 自定义下拉框样式 */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    padding: 16px 40px 16px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(236, 72, 153, 0.2);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ec4899;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.custom-select-trigger:hover {
    border-color: rgba(236, 72, 153, 0.3);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.custom-select-trigger.active {
    border-color: rgba(236, 72, 153, 0.5);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
}

.custom-select-arrow {
    transition: transform 0.3s ease;
    color: #ec4899;
}

.custom-select-trigger.active .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid rgba(236, 72, 153, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* 向上展开的下拉框 */
.custom-select-options.dropdown-up {
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateY(10px);
}

.custom-select-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-options.dropdown-up.show {
    transform: translateY(0);
}

.custom-select-option {
    padding: 14px 20px;
    color: #ec4899;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-option:hover {
    background: rgba(236, 72, 153, 0.08);
}

.custom-select-option.selected {
    background: rgba(236, 72, 153, 0.12);
    font-weight: 600;
}

/* 第一个选项圆角 */
.custom-select-option:first-child {
    border-radius: 10px 10px 0 0;
}

/* 最后一个选项圆角 */
.custom-select-option:last-child {
    border-radius: 0 0 10px 10px;
}

/* 只有一个选项时的圆角 */
.custom-select-option:first-child:last-child {
    border-radius: 10px;
}

/* 自定义下拉菜单样式，确保宽度与选择框一致 */
select.gallery-model-select {
    /* 修复Firefox下拉菜单宽度 */
    -moz-appearance: none;
    text-indent: 0.01px;
    text-overflow: '';
    /* 确保下拉菜单宽度与选择框一致 */
    min-width: 100%;
}

/* 下拉菜单弹出层样式 */
select.gallery-model-select:focus option {
    width: 100%;
    max-width: 100%;
}

/* 修复Chrome下拉菜单宽度 */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select.gallery-model-select {
        padding-right: 40px;
    }
    
    /* 强制下拉选项宽度与选择框一致 */
    select.gallery-model-select optgroup,
    select.gallery-model-select option {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
    }
}

/* 针对所有浏览器的下拉框样式 */
select.gallery-model-select {
    /* 确保下拉框不会超出容器 */
    box-sizing: border-box;
}

/* 尝试使用appearance:none来完全自定义下拉框 */
select.gallery-model-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 尺寸显示区域 */
.gallery-size-display {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.05), rgba(156, 163, 175, 0.05));
    border: 1px solid rgba(107, 114, 128, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    cursor: not-allowed;
    opacity: 0.8;
    height: 36px;
    display: flex;
    align-items: center;
}

.gallery-size-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gallery-size-text {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.gallery-size-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
}

.gallery-batch-button-inactive,
.gallery-quality-button-inactive {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(156, 163, 175, 0.1));
    border: 1px solid rgba(107, 114, 128, 0.2);
    color: #6b7280;
    padding: 3px 8px;
    height: 26px;
}

.gallery-batch-button-inactive:hover,
.gallery-quality-button-inactive:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(156, 163, 175, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
    color: #4b5563;
    border-color: rgba(107, 114, 128, 0.3);
}

.gallery-batch-button-active {
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
    border: 1px solid rgba(249, 115, 22, 0.3);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    transform: translateY(-1px);
    padding: 3px 8px;
    height: 26px;
}

.gallery-batch-button-active:hover {
    background: linear-gradient(135deg, #ea580c, #db2777);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* 简约绿色按钮激活状态 */
.gallery-batch-button-modern.gallery-batch-button-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.2));
    color: #059669;
    border: 2px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.2);
    font-weight: 700;
}

.gallery-batch-button-modern.gallery-batch-button-active:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25));
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.4);
}

/* 简约按钮非激活状态 */
.gallery-batch-button-modern.gallery-batch-button-inactive {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(248, 250, 252, 0.8));
    color: #6b7280;
    border: 2px solid rgba(209, 213, 219, 0.3);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.gallery-batch-button-modern.gallery-batch-button-inactive:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.95));
    color: #4b5563;
    border-color: rgba(156, 163, 175, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-quality-button-active {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.gallery-quality-button-active:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.gallery-batch-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine-sweep 2s ease-in-out infinite;
}

@keyframes shine-sweep {

    0%,
    100% {
        left: -100%;
    }

    50% {
        left: 100%;
    }
}

.gallery-generate-button-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    min-height: 36px;
}

.gallery-generate-button-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
    min-height: 44px;
    width: 100%;
}

.gallery-generate-button-ready {
    background: linear-gradient(135deg, #f97316, #ec4899);
    color: #fff;
    border: 1px solid rgba(249, 115, 22, 0.3);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.gallery-generate-button-ready:hover:not(:disabled) {
    background: linear-gradient(135deg, #ea580c, #db2777);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.gallery-generate-button-loading {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: #fff;
    cursor: not-allowed;
}

.gallery-generate-button-inline:disabled,
.gallery-generate-button-full:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gallery-loading-spinner-inline {
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.gallery-counter {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    background: rgba(107, 114, 128, 0.1);
    padding: 4px 12px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* 个人中心样式 */
.user-center {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 160px);
    background: linear-gradient(135deg, #fdf2f8, #fef7ff, #f0f9ff, #f7fee7, #fef3c7, #fdf2f8);
    background-size: 400% 400%;
    animation: gallery-gradient 20s ease-in-out infinite, fade-in 0.3s ease-out;
    z-index: 15;
    margin-bottom: 80px;
}

.user-center-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(252, 231, 243, 0.8), rgba(245, 243, 255, 0.8), rgba(236, 254, 255, 0.8), rgba(255, 251, 235, 0.9));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(255, 105, 180, 0.12), inset 0 1px rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 0;
    padding: 0 24px 24px 24px;
    overflow-y: auto;
    animation: slide-in-up 0.4s ease-out;
}

/* 手机端调整 */
@media (max-width: 768px) {
    .user-center-container {
        margin: 0 auto 0;
    }
}

.user-center-content {
    padding: 0 24px;
    margin-top: 20px;
}

.user-info-section {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    margin-top: 24px;
    margin-bottom: 32px;
    padding: 12px 20px 20px 20px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    border: none;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    width: 100%;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    flex-shrink: 0;
    transform: translateY(0px);
}

.user-avatar svg {
    width: 40px;
    height: 40px;
}

.user-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #374151;
    margin: 0 0 4px 0;
}

.user-details {
    flex: 1;
    min-width: 300px;
    transform: translateY(-10px);
}

.user-details p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 4px 0;
}

.user-settings-section {
    margin-bottom: 32px;
}

.user-settings-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #374151;
    margin: 0 0 16px 0;
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.setting-item input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(236, 72, 153, 0.2);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: 'Inter', sans-serif;
}

.setting-item input:focus {
    outline: none;
    border-color: rgba(236, 72, 153, 0.5);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
    transform: translateY(-1px);
}

.save-button {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.save-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.user-info-items {
    margin-top: -140px;
    margin-left: auto;
    margin-right: 680px;
    width: fit-content;
}

.user-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: none;
    width: 350px;
}

.user-info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
    margin-right: 0px;
    white-space: nowrap;
    width: 50px;
    margin-left: 20px;
}

.info-value {
    font-size: 1rem;
    color: #374151;
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
}

.info-value-content {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0px;
}

.info-value a {
    white-space: nowrap;
    flex-shrink: 0;
}

.user-actions-section {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.logout-button {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.logout-button:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.delete-account-button {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.delete-account-button:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
}

.user-stats-section {
    display: flex;
    gap: 16px;
    margin-bottom: 5px;
}

.stat-item {
    flex: 1;
    min-width: 200px;
}

.stat-item {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px solid rgba(147, 51, 234, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.2);
    border-color: rgba(147, 51, 234, 0.2);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #7c3aed;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.stat-button {
    width: 100%;
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.stat-button:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.user-works-section {
    margin-bottom: 32px;
    min-height: 800px;
}

.user-works-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #374151;
    margin: 0 0 16px 0;
}

.works-list {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(252, 231, 243, 0.5));
    border: 1px solid rgba(236, 72, 153, 0.1);
    border-radius: 12px;
    padding: 40px 20px;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(10px);
}

.no-works {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* 个人中心响应式设计 */
@media (max-width: 768px) {
    .user-center-container {
        width: 100%;
        height: 100%;
        max-height: 100vh;
    }

    .user-center-header {
        padding: 16px 20px;
    }

    .user-center-header h2 {
        font-size: 1.25rem;
    }

    .user-center-content {
        padding: 20px;
    }

    .user-info-section {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 16px;
    }

    .user-avatar {
        width: 64px;
        height: 64px;
    }

    .user-avatar svg {
        width: 32px;
        height: 32px;
    }

    .user-details h3 {
        font-size: 1.125rem;
    }

    .user-info-items {
        width: 100%;
    }

    .user-info-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 4px;
    }

    .info-label {
        min-width: auto;
        font-weight: 600;
    }

    .info-value {
        margin-left: 0;
        text-align: left;
        width: 100%;
    }

    .user-actions-section {
        flex-direction: column;
    }

    .user-stats-section {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-item {
        padding: 16px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .works-list {
        padding: 32px 16px;
    }
}

/* 横屏移动设备优化 */
@media (max-height: 480px) and (orientation: landscape) {
    .user-center-content {
        padding: 16px;
    }

    .user-info-section {
        padding: 12px;
        gap: 12px;
    }

    .user-avatar {
        width: 56px;
        height: 56px;
    }

    .user-avatar svg {
        width: 28px;
        height: 28px;
    }

    .user-details h3 {
        font-size: 1rem;
    }

    .user-info-items {
        margin-top: 8px;
    }

    .user-actions-section {
        margin-bottom: 24px;
    }

    .user-stats-section {
        margin-bottom: 24px;
    }

    .stat-item {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .works-list {
        padding: 24px 12px;
    }

    .user-works-section {
        margin-bottom: 24px;
    }

    .user-info-item {
        padding: 6px 0;
    }
}

/* 模板区域样式 */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 自定义模态对话框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* 购买积分模态框位置调整 */
#purchasePointsModal {
    align-items: flex-start;
    padding-top: 10%;
    z-index: 10000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: modal-fade-in 0.3s ease-out;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 20px;
}

#modal-message {
    margin-bottom: 16px;
    color: #6b7280;
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.modal-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button.cancel {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-button.cancel:hover {
    background-color: #e5e7eb;
}

.modal-button.confirm {
    background-color: #8b5cf6;
    color: white;
}

.modal-button.confirm:hover {
    background-color: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.gallery-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.1), rgba(236, 72, 153, 0.1));
    border: 1px solid rgba(147, 51, 234, 0.2);
    border-radius: 10px;
    color: #7c3aed;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.gallery-nav-button:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.2));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.25);
    border-color: rgba(147, 51, 234, 0.4);
}

.gallery-nav-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(147, 51, 234, 0.2);
}

.gallery-template-card {
    animation: template-entrance 0.5s ease-out;
    flex-shrink: 0;
    width: 160px;
    cursor: pointer;
}

.gallery-template-inner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(252, 231, 243, 0.8), rgba(245, 243, 255, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(236, 72, 153, 0.1), inset 0 1px rgba(255, 255, 255, 0.4);
}

.gallery-template-card:hover .gallery-template-inner {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 6px 16px rgba(236, 72, 153, 0.2), inset 0 1px rgba(255, 255, 255, 0.5);
    border-color: rgba(236, 72, 153, 0.3);
}

.gallery-template-image {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(243, 244, 246, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gallery-template-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-template-card:hover .gallery-template-img {
    transform: scale(1.1);
}

.gallery-template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(139, 92, 246, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-template-card:hover .gallery-template-overlay {
    opacity: 1;
}

.gallery-template-content {
    text-align: center;
}

.gallery-template-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-template-desc {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-template-card:hover .gallery-template-name {
    color: #ec4899;
}

.gallery-template-card:hover .gallery-template-desc {
    color: #8b5cf6;
}

@keyframes template-entrance {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 结果展示区域样式 */
.gallery-results-container {
    padding: 16px;
}

.gallery-image-item,
.gallery-video-item {
    animation: gallery-item-entrance 0.6s ease-out both;
}

@keyframes gallery-item-entrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-image-frame,
.gallery-video-frame {
    position: relative;
    overflow: hidden;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    display: inline-block;
    max-width: 100%;
    margin: 0 auto;
}

.gallery-image-frame img,
.gallery-video-frame video {
    width: 100%;
    height: auto;
    display: block;
}

/* 历史记录内容网格调整 */
.gallery-history-content .grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* 历史记录中的预览大小一致 */
.gallery-history-content .gallery-image-frame,
.gallery-history-content .gallery-video-frame {
    max-width: 100%;
    margin: 0 auto;
}

.gallery-history-content .gallery-image-content,
.gallery-history-content .gallery-video-content {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* 确保卡片容器能够正确显示 */
.gallery-history-content {
    padding: 1rem;
}

/* 调整历史记录会话容器 */
.gallery-history-session {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* 历史记录头部样式 */
.gallery-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-history-header:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* 历史记录提示词样式 */
.gallery-history-prompt {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #374151;
}

/* 历史记录信息样式 */
.gallery-history-info {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* 历史记录时间样式 */
.gallery-history-time {
    display: inline-block;
}

/* 历史记录数量样式 */
.gallery-history-count {
    display: inline-block;
}

/* 历史记录切换按钮样式 */
.gallery-history-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.gallery-history-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* 历史记录箭头样式 */
.gallery-history-arrow {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
    transition: all 0.3s ease;
}

/* 历史记录箭头展开样式 */
.gallery-history-arrow-expanded {
    transform: rotate(180deg);
}

/* 历史记录内容样式 */
.gallery-history-content {
    background: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 缩小版预览图样式 */
.gallery-preview-thumbnail {
    max-width: 500px;
    margin: 100px auto;
}

.gallery-preview-thumbnail .gallery-image-frame,
.gallery-preview-thumbnail .gallery-video-frame {
    max-width: 500px;
    margin: 0 auto;
}

.gallery-preview-thumbnail .gallery-image-content,
.gallery-preview-thumbnail .gallery-video-content {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.gallery-preview-thumbnail .gallery-image-frame {
    margin-top: -20px;
}

/* 调整历史记录会话容器 */
.gallery-history-session {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-video-content {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    aspect-ratio: unset;
}

/* 修复视频控制条遮挡问题 */
.gallery-video-frame {
    position: relative;
    overflow: visible;
}

.gallery-video-content {
    z-index: 1;
}

.gallery-video-border {
    z-index: 2;
}

.save-tip-overlay {
    z-index: 3;
}

.gallery-timestamp {
    z-index: 4;
}

.gallery-video-item:hover .gallery-video-content {
    transform: scale(1.05);
}

.gallery-video-frame.loaded {
    background: transparent;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.video-play-button:hover {
    opacity: 1;
}

.gallery-video-frame:hover .video-play-button {
    opacity: 1;
}

.gallery-video-content:focus + .video-play-button,
.gallery-video-content:hover + .video-play-button {
    opacity: 1;
}

.video-time-display {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 6;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

.gallery-video-border {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    background: linear-gradient(45deg, #ec4899, #8b5cf6, #3b82f6, #ec4899) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-video-frame:hover .gallery-video-border {
    opacity: 1;
}

.gallery-image-frame:hover,
.gallery-video-frame:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 25px rgba(236, 72, 153, 0.2), inset 0 1px rgba(255, 255, 255, 0.4);
    border-color: rgba(236, 72, 153, 0.4);
}

/* 右键保存提示 */
.save-tip-overlay {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 90%;
}

.gallery-image-item:hover .save-tip-overlay {
    opacity: 1;
}

.gallery-image-frame.loaded {
    background: transparent;
}

.gallery-image-content {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-image-item:hover .gallery-image-content {
    transform: scale(1.05);
}

.gallery-image-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(139, 92, 246, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* 禁用遮罩层交互 */
}

/* 取消悬停显示遮罩层 */
.gallery-image-item:hover .gallery-image-overlay {
    opacity: 0;
    /* 保持隐藏 */
}

.gallery-image-actions {
    display: flex;
    gap: 12px;
}

.gallery-action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    color: #fff;
}

.gallery-view-button {
    background: rgba(59, 130, 246, 0.2);
}

.gallery-view-button:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.gallery-download-button {
    background: rgba(16, 185, 129, 0.2);
}

.gallery-download-button:hover {
    background: rgba(16, 185, 129, 0.4);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.gallery-timestamp {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-download-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(16, 185, 129, 0.8);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.gallery-download-button:hover {
    background: rgba(16, 185, 129, 1);
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.gallery-download-button:active {
    transform: scale(0.95);
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.gallery-video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 标签页内容切换 */
.gallery-tab-content {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 积分套餐卡片样式 */
.border-2 {
    border-width: 2px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.cursor-pointer {
    cursor: pointer;
}

.hover\:border-purple-500:hover {
    border-color: #a855f7;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.bg-white {
    background-color: #ffffff;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-semibold {
    font-weight: 600;
}

.text-gray-800 {
    color: #1f2937;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.font-bold {
    font-weight: 700;
}

/* 积分套餐卡片样式 */
#purchasePointsModal .grid-cols-2>div {
    text-align: center;
}

#purchasePointsModal .grid-cols-2>div>div {
    text-align: center;
}

/* 套餐卡片布局调整 */
#purchasePointsModal .grid-cols-2>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#purchasePointsModal .grid-cols-2>div>div:first-child {
    margin-bottom: 4px;
}

#purchasePointsModal .grid-cols-2>div>div:nth-child(2) {
    margin: 4px 0;
}

#purchasePointsModal .grid-cols-2>div>div:last-child {
    margin-top: 4px;
}

/* 立即支付按钮大小调整 */
#confirmPaymentButton {
    padding: 8px 16px !important;
    font-size: 0.875rem !important;
    min-height: 40px !important;
}

/* 移动端立即支付按钮进一步缩小 */
@media (max-width: 768px) {
    #confirmPaymentButton {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
    }

    /* 移动端套餐卡片容器固定大小 */
    #purchasePointsModal .grid-cols-2>div {
        height: 120px !important;
        max-height: 120px !important;
        overflow: hidden !important;
    }

    /* 移动端套餐卡片标题文字放大 */
    #purchasePointsModal .grid-cols-2>div>div:first-child {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
    }

    /* 移动端套餐卡片金额文字 */
    #purchasePointsModal .grid-cols-2>div>div:nth-child(2) {
        font-size: 1.25rem !important;
        line-height: 1.2 !important;
        margin: 2px 0 !important;
    }

    /* 移动端套餐卡片按钮文字 */
    #purchasePointsModal .grid-cols-2>div>div:last-child {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin-top: 2px !important;
    }

    /* 自定义套餐卡片文字大小调换 */
    #customAmountCard>div:first-child {
        font-size: 1rem !important;
        font-weight: 600 !important;
    }

    #customAmountCard>div:last-child {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
    }
}

/* 自定义套餐卡片文字大小调整 */
#customAmountCard>div:first-child {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
}

#customAmountCard>div:last-child {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* 支付方式文字大小调整 */
#wechatPayOption+label,
#alipayOption+label {
    font-size: 0.9rem !important;
    white-space: nowrap !important;
}

#wechatPayOption+label span,
#alipayOption+label span {
    font-size: 1rem !important;
    margin-right: 0.75rem !important;
}

#wechatPayOption,
#alipayOption {
    transform: scale(0.88) !important;
    margin-right: 0.5rem !important;
}

/* 支付方式容器调整 */
#purchasePointsModal .flex.space-x-6 {
    gap: 2rem !important;
    justify-content: center !important;
}

.text-purple-600 {
    color: #9333ea;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.w-full {
    width: 100%;
}

.bg-purple-600 {
    background-color: #9333ea;
}

.text-white {
    color: #ffffff;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.hover\:bg-purple-700:hover {
    background-color: #7e22ce;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.text-gray-600 {
    color: #4b5563;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.text-blue-700 {
    color: #1d4ed8;
}

.font-medium {
    font-weight: 500;
}

.text-blue-600 {
    color: #2563eb;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.space-y-1>*+* {
    margin-top: 0.25rem;
}

/* 输入框样式 */
input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
}

input[type="number"]:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

input[type="number"]::placeholder {
    color: #9ca3af;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-gray-500 {
    color: #6b7280;
}

/* 历史记录滚动优化 */
#historyContent {
    scrollbar-width: thin;
    scrollbar-color: rgba(236, 72, 153, 0.3) transparent;
    max-height: 60vh;
    /* 历史记录内容区域的最大高度 */
}

#historyContent::-webkit-scrollbar {
    width: 6px;
}

#historyContent::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#historyContent::-webkit-scrollbar-thumb {
    background: rgba(236, 72, 153, 0.3);
    border-radius: 3px;
    transition: background 0.3s ease;
}

#historyContent::-webkit-scrollbar-thumb:hover {
    background: rgba(236, 72, 153, 0.5);
}

.gallery-tab-active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 1;
}

.gallery-tab-hidden {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
    pointer-events: none;
}

/* 空状态样式 */
.gallery-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px;
    height: 100%;
    min-height: 300px;
}

.gallery-empty-icon {
    margin-bottom: 24px;
    opacity: 0.6;
    animation: gentle-float 4s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 电脑端示例图标放大三倍 */
@media (min-width: 769px) {
    .gallery-empty-icon svg {
        width: 60px !important;
        height: 60px !important;
    }
}

/* 手机端示例图标保持默认大小 */
@media (max-width: 768px) {
    .gallery-empty-icon svg {
        width: 20px !important;
        height: 20px !important;
    }
}

.gallery-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.gallery-empty-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 400px;
    text-align: center !important;
    margin: 0 auto !important;
}

@keyframes gentle-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 错误状态样式 */
.gallery-error-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(252, 165, 165, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    animation: error-entrance 0.3s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    font-family: 'Inter', 'Microsoft YaHei', sans-serif !important;
}

@keyframes error-entrance {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 错误消息文本样式 */
.gallery-error-alert p {
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

.gallery-error-alert #errorMessage {
    font-size: 0.875rem;
    color: #dc2626;
    font-weight: 500;
    margin-top: 4px;
    max-width: 100%;
    display: block;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
}

/* 强制文本水平显示 */
.horizontal-text {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    display: inline !important;
    white-space: normal !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    font-family: 'Inter', 'Microsoft YaHei', sans-serif !important;
}

/* 结果区域内的进度显示样式 */
/* 重新设计的进度状态 */
.gallery-progress-state {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100%;
    height: 100%;
    padding: 20px;
    margin-top: 40px;
}

.gallery-progress-inline {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border: 2px solid rgba(236, 72, 153, 0.2);
    border-radius: 24px;
    padding: 48px 32px;
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(236, 72, 153, 0.15), 0 8px 32px rgba(139, 92, 246, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-progress-inline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(236, 72, 153, 0.05), transparent);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

/* 简单的进度指示器 */
.simple-progress-spinner {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.dot-1 {
    animation-delay: 0s;
}

.dot-2 {
    animation-delay: 0.3s;
}

.dot-3 {
    animation-delay: 0.6s;
}

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.spinner-emoji {
    font-size: 2.5rem;
    animation: emojiFloat 2s ease-in-out infinite;
}

@keyframes emojiFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* 文本容器 */
.progress-text-container {
    margin-bottom: 24px;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.progress-status {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.progress-number {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    letter-spacing: -0.03em;
}

.gallery-progress-percent {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.gallery-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(229, 231, 235, 0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.gallery-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 统计信息样式 */
.progress-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 8px;
    font-size: 0.875rem;
}

.progress-success {
    color: #059669;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.progress-failed {
    color: #dc2626;
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.gallery-progress-preview-inline {
    margin-top: 20px;
}

.gallery-progress-preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    text-align: center;
}

.gallery-progress-images-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.gallery-progress-images-inline img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(236, 72, 153, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-progress-images-inline img:hover {
    transform: scale(1.05);
    border-color: rgba(236, 72, 153, 0.4);
}

@keyframes progress-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(236, 72, 153, 0.2);
    }
}

/* 历史记录样式 */
.gallery-history-session {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(252, 231, 243, 0.3), rgba(245, 243, 255, 0.35), rgba(236, 254, 255, 0.3), rgba(255, 251, 235, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 0;
    transition: all 0.3s ease;
}

.gallery-history-session:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.gallery-history-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-history-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: -4px;
    padding: 20px;
}

.gallery-history-clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.gallery-history-prompt {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.4;
    background: linear-gradient(135deg, #6b7280, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-history-info {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
}

.gallery-history-time {
    color: #6b7280;
    font-weight: 500;
}

.gallery-history-count {
    color: #059669;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.gallery-history-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.gallery-history-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-history-arrow {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: all 0.3s ease;
    transform: rotate(0deg);
}

.gallery-history-arrow-expanded {
    transform: rotate(90deg);
    color: #8b5cf6;
}

.gallery-history-content {
    padding: 0 16px 16px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 生成进度模态框样式 */
.gallery-progress-container {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    animation: gallery-progress-entrance 0.5s ease-out;
}

@keyframes gallery-progress-entrance {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.gallery-progress-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(252, 231, 243, 0.9), rgba(245, 243, 255, 0.9), rgba(236, 254, 255, 0.9), rgba(255, 251, 235, 0.95));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 32px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(236, 72, 153, 0.2), inset 0 1px rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

/* 购买积分面板高度调整 */
#purchasePointsModal .gallery-progress-card {
    padding: 32px 24px;
    min-height: auto;
    max-height: 80vh;
    overflow-y: auto;
}

/* 移动端购买积分面板高度调整 */
@media (max-width: 768px) {
    #purchasePointsModal .gallery-progress-card {
        padding: 24px 16px;
        min-height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* 手机端积分套餐卡片标题大小调整 */
    #purchasePointsModal .gallery-progress-card #package200Points>div:first-child,
    #purchasePointsModal .gallery-progress-card #package500Points>div:first-child,
    #purchasePointsModal .gallery-progress-card #package1000Points>div:first-child {
        font-size: 80% !important;
    }

    /* 手机端自定义金额卡片文字大小调整 */
    #purchasePointsModal .gallery-progress-card #customAmountCard>div:first-child {
        font-size: 50% !important;
    }

    #purchasePointsModal .gallery-progress-card #customAmountCard>div:last-child {
        font-size: 150% !important;
    }
}

.gallery-progress-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.gallery-progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.gallery-progress-stroke {
    transition: stroke-dashoffset 0.6s ease;
    filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.25));
}

.gallery-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.gallery-progress-number {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.gallery-progress-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.gallery-progress-info {
    text-align: center;
    margin-bottom: 24px;
}

.gallery-progress-title {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.gallery-progress-status {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 12px;
}

.gallery-progress-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.gallery-progress-success {
    color: #059669;
}

.gallery-progress-failed {
    color: #dc2626;
}

.gallery-progress-preview {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 20px;
}

.gallery-progress-preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-align: center;
}

.gallery-progress-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 8px;
}

.gallery-progress-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    animation: gallery-image-appear 0.5s ease-out both;
}

@keyframes gallery-image-appear {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

.gallery-progress-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-progress-image-item:hover .gallery-progress-image {
    transform: scale(1.1);
}

.gallery-progress-image-overlay {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.gallery-progress-image-number {
    color: #fff;
}

.gallery-progress-video {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-progress-video-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-progress-image-item:hover .gallery-progress-video-content {
    transform: scale(1.1);
}

.gallery-progress-video-inline {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.gallery-progress-particles {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
}

.gallery-progress-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 50%;
    animation: gallery-particle-float 3s ease-in-out infinite;
}

.gallery-progress-particle:nth-child(1) {
    top: 20%;
    left: 10%;
}

.gallery-progress-particle:nth-child(2) {
    top: 30%;
    right: 15%;
}

.gallery-progress-particle:nth-child(3) {
    top: 60%;
    left: 20%;
}

.gallery-progress-particle:nth-child(4) {
    bottom: 25%;
    right: 20%;
}

.gallery-progress-particle:nth-child(5) {
    top: 40%;
    left: 80%;
}

.gallery-progress-particle:nth-child(6) {
    bottom: 40%;
    left: 15%;
}

.gallery-progress-particle:nth-child(7) {
    top: 70%;
    right: 25%;
}

.gallery-progress-particle:nth-child(8) {
    bottom: 15%;
    left: 60%;
}

@keyframes gallery-particle-float {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

/* 设置模态框样式 */
.gallery-modal-overlay {
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.3), rgba(221, 160, 221, 0.4), rgba(173, 216, 230, 0.3), rgba(255, 182, 193, 0.4), rgba(230, 230, 250, 0.3));
    backdrop-filter: blur(20px);
}

.gallery-modal-card {
    position: relative;
    animation: modal-float 6s ease-in-out infinite;
    border-radius: 1rem;
    /* 添加圆角 - 对应 rounded-2xl */
    overflow: hidden;
    /* 确保内容不会超出圆角范围 */
}

@keyframes modal-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.gallery-modal-background {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(252, 231, 243, 0.95), rgba(245, 243, 255, 0.95), rgba(236, 254, 255, 0.95), rgba(255, 251, 235, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 10px 25px rgba(255, 105, 180, 0.1), inset 0 1px rgba(255, 255, 255, 0.6);
}

.gallery-modal-shine {
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    animation: modal-shine 3s ease-in-out infinite;
}

@keyframes modal-shine {

    0%,
    100% {
        transform: translateX(-100%) skewX(-15deg);
    }

    50% {
        transform: translateX(100%) skewX(-15deg);
    }
}

.gallery-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.gallery-close-button {
    padding: 8px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(244, 63, 94, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    color: #e11d48;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-close-button:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-close-button:hover:before {
    opacity: 0.1;
}

.gallery-close-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.gallery-close-button svg {
    position: relative;
    z-index: 10;
    display: block;
    color: #e11d48;
    stroke: currentColor;
}

.gallery-modal-content {
    color: #374151;
    line-height: 1.6;
}

.gallery-cancel-button {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(156, 163, 175, 0.1));
    border: 1px solid rgba(107, 114, 128, 0.2);
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1001;
}

.gallery-cancel-button:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(156, 163, 175, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}

.gallery-confirm-button {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1001;
}

.gallery-confirm-button:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, #f97316, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-confirm-button:hover:before {
    opacity: 1;
}

.gallery-confirm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

/* 图片查看模态框样式 */
.gallery-modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(30, 41, 59, 0.95));
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gallery-modal-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(236, 72, 153, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.gallery-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, #db2777, #7c3aed);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.gallery-modal-info {
    margin-top: 16px;
    text-align: center;
    color: #fff;
    max-width: 600px;
}

.gallery-modal-prompt {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.5;
}

.gallery-modal-time {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 页脚样式 */
.bg-gallery-footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
}

/* 修复布局问题 */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr 2fr;
    }

    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .lg\:col-span-2 {
        grid-column: span 1 / span 1;
    }
}

/* 主要内容区域布局修复 */
.main-content-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: stretch;
    min-height: 0;
}

@media (max-width: 1024px) {
    .main-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* 左右面板高度对齐 */
.main-content-grid>div {
    display: flex;
    flex-direction: column;
}

.main-content-grid .gallery-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 结果区域高度修复 */
.results-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.results-container .gallery-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 批量生成卡片布局修复 */
.gallery-batch-card-compact {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(252, 231, 243, 0.65), rgba(245, 243, 255, 0.7), rgba(236, 254, 255, 0.65), rgba(255, 251, 235, 0.75));
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(255, 105, 180, 0.06), inset 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.gallery-batch-card-compact .flex {
    display: flex;
    align-items: end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.gallery-batch-card-compact .flex>div:not(.flex-grow) {
    flex: 0 0 auto;
}

.gallery-batch-card-compact .flex-grow {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: end;
    padding-bottom: 1px;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .gallery-header .container {
        padding: 0 1rem;
    }

    .gallery-card {
        padding: 1rem;
    }

    .gallery-batch-card-compact {
        padding: 12px;
    }

    .gallery-batch-card-compact .flex {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .gallery-batch-card-compact .flex-grow {
        justify-content: center;
    }

    /* 数量按钮在移动端的优化 */
    .batch-buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .gallery-batch-button-modern {
        padding: 12px 8px !important;
        font-size: 0.85rem !important;
        height: 42px !important;
    }

    .gallery-size-display-modern {
        padding: 12px 16px;
    }

    .gallery-size-display-modern .gallery-size-text {
        font-size: 0.85rem;
    }

    .gallery-size-display-modern .gallery-size-badge {
        font-size: 0.75rem;
        padding: 3px 10px;
    }

    /* 移动端模型选择样式 */
    .gallery-model-select {
        padding: 12px 36px 12px 16px;
        font-size: 0.85rem;
    }

    .gallery-select-arrow {
        right: 12px;
    }

    .gallery-model-hint {
        font-size: 0.7rem;
        max-width: 60%;
    }

    .gallery-generate-button-inline {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-height: 32px;
    }

    .gallery-label-inline {
        font-size: 0.65rem;
        margin-bottom: 3px;
    }

    .gallery-template-card {
        width: 144px;
    }

    .gallery-nav-button {
        width: 32px;
        height: 32px;
    }

    .gallery-results-container {
        padding: 12px;
    }

    .gallery-action-button {
        width: 40px;
        height: 40px;
    }

    .gallery-action-button svg {
        width: 16px;
        height: 16px;
    }

    .gallery-modal-image {
        max-height: 70vh;
    }

    .gallery-modal-info {
        padding: 0 16px;
    }

    .gallery-modal-prompt {
        font-size: 0.875rem;
    }

    .save-tip-overlay {
        bottom: 40px;
        font-size: 0.7rem;
        padding: 8px 12px;
        max-width: 85%;
    }

    .gallery-progress-card {
        min-width: 320px;
        padding: 24px;
        margin: 20px;
    }

    .gallery-progress-ring-container {
        width: 100px;
        height: 100px;
    }

    .gallery-progress-number {
        font-size: 1.25rem;
    }

    .gallery-progress-title {
        font-size: 1.125rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gallery-results-container .grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1280px) {
    .gallery-results-container .grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 32px;
    }

    .gallery-image-frame:hover {
        transform: translateY(-12px);
    }
}

/* 滚动条美化 */
.h-full.overflow-y-auto::-webkit-scrollbar {
    width: 6px;
}

.h-full.overflow-y-auto::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.h-full.overflow-y-auto::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.6), rgba(139, 92, 246, 0.6));
    border-radius: 3px;
    transition: all 0.3s ease;
}

.h-full.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(139, 92, 246, 0.8));
}

::-webkit-scrollbar {
    width: 0px;
    /* 完全隐藏滚动条 */
}

/* 针对结果区域隐藏滚动条 */
.gallery-tab-content::-webkit-scrollbar {
    width: 0px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #db2777, #7c3aed);
}

/* 通用工具类 */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-grow {
    flex-grow: 1;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.space-x-2> :not([hidden])~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(0.5rem * var(--tw-space-x-reverse));
    margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-3> :not([hidden])~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(0.75rem * var(--tw-space-x-reverse));
    margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-x-4> :not([hidden])~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(1rem * var(--tw-space-x-reverse));
    margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}

.space-y-4> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.space-y-6> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}

.space-y-8> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(2rem * var(--tw-space-y-reverse));
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

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

.overflow-auto {
    overflow: auto;
}

.min-h-0 {
    min-height: 0px;
}

.h-full {
    height: 100%;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.min-w-0 {
    min-width: 0px;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-auto {
    margin-top: auto;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-green-600 {
    color: #16a34a;
}

.text-red-500 {
    color: #ef4444;
}

.text-red-600 {
    color: #dc2626;
}

.text-pink-500 {
    color: #ec4899;
}

.text-pink-600 {
    color: #db2777;
}

.text-purple-600\/70 {
    color: rgba(147, 51, 234, 0.7);
}

.text-white {
    color: #ffffff;
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-pink-200\/30 {
    border-color: rgba(251, 207, 232, 0.3);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-pink-50\/80 {
    --tw-gradient-from: rgba(253, 242, 248, 0.8);
    --tw-gradient-to: rgba(253, 242, 248, 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-purple-50\/60 {
    --tw-gradient-to: rgba(250, 245, 255, 0);
    --tw-gradient-stops: var(--tw-gradient-from), rgba(250, 245, 255, 0.6), var(--tw-gradient-to);
}

.to-blue-50\/80 {
    --tw-gradient-to: rgba(239, 246, 255, 0.8);
}

.from-pink-500 {
    --tw-gradient-from: #ec4899;
    --tw-gradient-to: rgba(236, 72, 153, 0);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-purple-500 {
    --tw-gradient-to: rgba(168, 85, 247, 0);
    --tw-gradient-stops: var(--tw-gradient-from), #a855f7, var(--tw-gradient-to);
}

.to-blue-500 {
    --tw-gradient-to: #3b82f6;
}

.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.text-transparent {
    color: transparent;
}

@media (min-width: 640px) {
    .sm\:flex {
        display: flex;
    }

    .sm\:grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .md\:flex-row {
        flex-direction: row;
    }

    .md\:space-y-0> :not([hidden])~ :not([hidden]) {
        --tw-space-y-reverse: 0;
        margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
        margin-bottom: calc(0px * var(--tw-space-y-reverse));
    }

    .md\:text-left {
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:gap-6 {
        gap: 1.5rem;
    }
}

/* 强制样式更新 - 修复字符计数器位置 */
.gallery-char-counter {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    z-index: 999 !important;
}

/* 全新的API Key输入框样式 */
.api-key-field {
    margin-bottom: 20px;
}

.api-key-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.api-key-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.api-key-wrapper:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.api-key-field-input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #374151;
    font-family: 'Inter', sans-serif;
}

.api-key-field-input::placeholder {
    color: #9ca3af;
}

.api-key-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.api-key-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.api-key-action-btn:hover {
    background-color: #f3f4f6;
    transform: scale(1.1);
}

.api-key-action-btn:active {
    transform: scale(0.95);
}

.eye-icon,
.clear-icon {
    display: block;
    line-height: 1;
}

.eye-icon {
    transition: all 0.2s ease;
}

.api-key-action-btn:hover .eye-icon {
    transform: scale(1.1);
}

.api-key-help {
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
    font-family: 'Inter', sans-serif;
}

/* API Key 按钮包装器 */
.api-key-btn-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 10;
}

/* API Key 悬停提示样式 - 复制复制按钮的样式 */
.api-key-tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #374151, #4b5563);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

/* 提示框小箭头 */
.api-key-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #374151;
}

/* 悬停时显示提示 */
.api-key-btn-wrapper:hover .api-key-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* 全新的设置按钮样式 */
.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.cancel-btn {
    padding: 10px 20px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.cancel-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.save-api-key-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.save-api-key-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.save-api-key-btn:active {
    transform: translateY(0);
}

/* 波浪水动画样式 */
.water-wave-container {
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.water-wave-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 波浪动画 */
.water-wave {
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.water-wave.wave1 {
    animation: wave1 2s infinite;
}

.water-wave.wave2 {
    animation: wave2 2.5s infinite;
    animation-delay: -0.5s;
}

.water-wave.wave3 {
    animation: wave3 3s infinite;
    animation-delay: -1s;
}

/* 波浪关键帧动画 */
@keyframes wave1 {
    0% {
        d: path("M0,60 Q25,45 50,60 T100,60 V100 H0 Z");
        opacity: 0.8;
    }

    50% {
        d: path("M0,65 Q25,50 50,65 T100,65 V100 H0 Z");
        opacity: 0.6;
    }

    100% {
        d: path("M0,60 Q25,45 50,60 T100,60 V100 H0 Z");
        opacity: 0.8;
    }
}

@keyframes wave2 {
    0% {
        d: path("M0,65 Q25,50 50,65 T100,65 V100 H0 Z");
        opacity: 0.6;
    }

    50% {
        d: path("M0,70 Q25,55 50,70 T100,70 V100 H0 Z");
        opacity: 0.4;
    }

    100% {
        d: path("M0,65 Q25,50 50,65 T100,65 V100 H0 Z");
        opacity: 0.6;
    }
}

@keyframes wave3 {
    0% {
        d: path("M0,70 Q25,55 50,70 T100,70 V100 H0 Z");
        opacity: 0.4;
    }

    50% {
        d: path("M0,75 Q25,60 50,75 T100,75 V100 H0 Z");
        opacity: 0.2;
    }

    100% {
        d: path("M0,70 Q25,55 50,70 T100,70 V100 H0 Z");
        opacity: 0.4;
    }
}

/* 水波上下浮动效果 */
@keyframes waterFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-3px);
    }
}

.water-wave-container {
    animation: waterFloat 4s ease-in-out infinite;
}

/* 渐变色边框脉冲效果 */
.water-wave-container circle[stroke] {
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {

    0%,
    100% {
        stroke-width: 3;
        opacity: 1;
    }

    50% {
        stroke-width: 4;
        opacity: 0.8;
    }
}

/* 消息通知容器 */
.gallery-notification-container {
    background: linear-gradient(90deg, rgba(255, 237, 247, 0.8) 0%, rgba(255, 240, 255, 0.6) 50%, rgba(240, 245, 255, 0.8) 100%);
    min-height: 40px;
    height: 40px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(236, 72, 153, 0.2);
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.1);
    margin: 8px 0;
    padding: 0;
    z-index: 999;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gallery-notification-content {
    overflow: visible;
    position: relative;
    height: 40px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 通知动画 */
@keyframes scrollNotification {
    0% {
        left: -100%;
    }
    100% {
        left: 100vw;
    }
}

/* 通知样式 */
.notification-info {
    color: #3b82f6;
}

.notification-success {
    color: #10b981;
}

.notification-warning {
    color: #f59e0b;
}

.notification-error {
    color: #ef4444;
}

/* 通知图标 */
.notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    font-weight: bold;
}

.notification-info .notification-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-success .notification-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-warning .notification-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-error .notification-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}