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

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: scale(1.1);
}

.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: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.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.1;
}

.gallery-text-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
    border-color: rgba(124, 58, 237, 0.4);
}

.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.1;
}

.gallery-settings-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
    border-color: rgba(124, 58, 237, 0.4);
}

.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.1;
}

.gallery-icon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
    border-color: rgba(124, 58, 237, 0.4);
}

.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;
}

.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: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.8));
    border: 1px solid rgba(236, 72, 153, 0.2);
    border-radius: 16px;
    padding: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.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;
}

.gallery-tab-inactive,
.gallery-results-tab-inactive {
    color: #6b7280;
}

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

.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-history {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

/* 输入框样式 */
.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);
}

.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;
}

/* 下拉框选项样式 */
.gallery-model-select option {
    padding: 12px;
    background: white;
    color: #ec4899;
    font-weight: 500;
}

/* 尺寸显示区域 */
.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);
}

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

.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 {
    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 {
    position: relative;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.5), rgba(229, 231, 235, 0.3));
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    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.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-image-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-tab-content {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 历史记录滚动优化 */
#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;
}

.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;
}

@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: center;
    justify-content: center;
    min-height: 100%;
    height: 100%;
    padding: 40px 20px;
}

.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: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    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;
}

.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-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: 1fr 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%;
}

.results-container .gallery-card {
    height: 100%;
}

/* 批量生成卡片布局修复 */
.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;
    }
} 