/*
Theme Name: GagaSora2 WordPress Theme
Description: AI视频生成网站主题，集成用户系统、积分系统和n8n工作流
Version: 1.0
Author: Your Name
*/

/* WordPress 样式重置 - 确保主题样式优先 */
body.wp-admin,
body.wp-core-ui,
body {
    margin: 0 !important;
    padding: 0 !important;
}

.wp-site-blocks {
    padding: 0 !important;
    margin: 0 !important;
}

.site-main {
    margin: 0 !important;
    padding: 0 !important;
}

article,
.entry-content {
    margin: 0 !important;
    padding: 0 !important;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

:root {
    --feature-section-lift: 2rem;
    --gallery-section-lift: 0.5rem;
}

/* 背景视频 */
.bg-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.7;
    /* 视频透明度 70% */
}

.bg-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
}

/* 背景渐变 */
.bg-gradient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.bg-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(234, 179, 8, 0.1), transparent);
}

.bg-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(168, 85, 247, 0.05), transparent);
}

/* 主容器 */
.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    margin-top: -0.5rem;
    /* 整体向上移动 0.5rem */
}

/* 头部样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    /* 减少头部上下内边距 */
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo .highlight {
    color: #fbbf24;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    background: #f3f4f6;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 英雄区域 */
.hero {
    max-width: 1024px;
    margin: -0.5rem auto 0;
    /* 向上移动 0.5rem */
    padding: 2rem 1.5rem 0.5rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: bold;
    margin-bottom: 0.75rem;
    /* 减少标题下方间距 */
    line-height: 1.1;
}

.hero .highlight {
    color: #fbbf24;
}

.hero p {
    font-size: 1.25rem;
    color: #d1d5db;
    margin-bottom: 1.5rem;
    /* 减少描述文字下方间距 */
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-legal-note {
    display: inline-block;
    font-size: 1rem;
    color: rgba(209, 213, 219, 0.85);
    margin-top: 0.35rem;
}

/* 输入区域 */
.input-section {
    max-width: 60rem;
    /* 调整为60rem，与用户面板一致 */
    margin: 0 auto;
}

.input-container {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.case-feature-toggle-row {
    width: 100%;
    margin-bottom: 1rem;
    /* 相对定位，作为弹出窗口的参考点 */
    position: relative;
}

.feature-panels-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.feature-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.feature-toggle-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.15);
    /* 提高不透明度 */
    color: #fff;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.feature-toggle-btn.is-open,
.feature-toggle-btn.has-selection {
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.12);
}

.toggle-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.feature-toggle-btn.has-selection .toggle-dot {
    background: #fbbf24;
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.8);
}

.toggle-index {
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.feature-toggle-btn.has-selection .toggle-index,
.feature-toggle-btn.is-open .toggle-index {
    background: rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

.feature-toggle-btn .toggle-label {
    white-space: nowrap;
}

.feature-toggle-hint {
    display: none;
}

.case-feature-window {
    /* 绝对定位，向上弹出 */
    position: absolute;
    bottom: 100%;
    /* 定位在按钮上方 */
    left: 0;
    right: 0;
    margin-bottom: 0.5rem;
    /* 与按钮的间距 */
    z-index: 100;

    /* 样式 */
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    background: rgba(17, 24, 39, 0.95);
    /* 提高不透明度 */
    backdrop-filter: blur(10px);
    /* 添加模糊效果 */
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    /* 向上的阴影 */

    /* 初始状态：隐藏 */
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    /* 向下偏移（关闭时） */

    /* 过渡动画 */
    transition: max-height 0.4s ease,
        opacity 0.3s ease,
        padding 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.case-feature-window.open {
    padding: 1.25rem;
    max-height: 640px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    /* 无偏移（打开时） */
    box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.7);
    /* 打开时更强的阴影 */
}

.feature-windows-stack {
    /* 相对定位容器，用于绝对定位的弹出窗口 */
    position: relative;
    /* 不占据空间，因为窗口是绝对定位的 */
    height: 0;
    overflow: visible;
    /* 允许弹出窗口超出容器 */
}

.feature-windows-stack .case-feature-window {
    margin-bottom: 0;
}

.case-feature-window__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.feature-window-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.case-feature-window__header .title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.case-feature-window__header .subtitle {
    font-size: 0.85rem;
    color: #9ca3af;
    margin: 0.25rem 0 0;
}

.feature-window-close {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #d1d5db;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.feature-window-close:hover {
    background: rgba(251, 191, 36, 0.2);
    color: #fff;
}

.case-feature-window__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.case-feature-option {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.case-feature-option input {
    margin-top: 0.2rem;
    accent-color: #fbbf24;
}

.case-feature-option .option-content strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
}

.case-feature-option .option-content small {
    display: block;
    color: #9ca3af;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.case-feature-option:hover {
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateY(-2px);
    background: rgba(251, 191, 36, 0.08);
}

.feature-radio-option {
    align-items: flex-start;
}

.feature-radio-option input {
    margin-right: 0.5rem;
}

.feature-window-reset {
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #d1d5db;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.feature-window-reset:hover {
    border-color: rgba(251, 191, 36, 0.6);
    color: #fff;
}

.feature-window-empty {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
}

.feature-chip-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background: rgba(251, 191, 36, 0.06);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease, margin 0.3s ease, padding 0.3s ease;
}

.feature-chip-preview.is-hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.feature-chip-preview__label {
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feature-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.85rem;
    font-size: 0.85rem;
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.5);
    box-shadow: inset 0 0 12px rgba(251, 191, 36, 0.2);
}

.feature-chip[data-panel-id="feature-window-1"] {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.25);
}

.feature-chip[data-panel-id="feature-window-2"] {
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: inset 0 0 12px rgba(168, 85, 247, 0.25);
}

.feature-chip[data-panel-id="feature-window-3"] {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: inset 0 0 12px rgba(34, 197, 94, 0.25);
}

.feature-chip[data-panel-id="feature-window-4"] {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.5);
    box-shadow: inset 0 0 12px rgba(249, 115, 22, 0.25);
}

.feature-chip[data-panel-id="feature-window-5"] {
    color: #fbcfe8;
    background: rgba(236, 72, 153, 0.18);
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: inset 0 0 12px rgba(236, 72, 153, 0.25);
}

.textarea-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.textarea-container::before,
.textarea-container::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 1.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.textarea-container::before {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.textarea-container::after {
    background: conic-gradient(from 90deg, rgba(251, 191, 36, 0.2), rgba(14, 165, 233, 0.3), rgba(236, 72, 153, 0.25), rgba(251, 191, 36, 0.2));
    filter: blur(18px);
}

.textarea-container.features-active::before {
    opacity: 1;
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.2);
}

.textarea-container.features-active::after {
    opacity: 0.7;
    animation: featureGlowSweep 8s linear infinite;
}

.textarea-container.features-just-applied {
    animation: featurePop 0.8s ease;
}

.textarea-container .prompt-textarea,
.textarea-container .image-upload-container {
    position: relative;
    z-index: 1;
}

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

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

@keyframes featurePop {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.01);
    }

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

.prompt-textarea {
    width: 100%;
    background: transparent;
    color: #fef3c7;
    /* 轻暖色区分示例与手动输入 */
    font-size: 0.95rem;
    /* 调小字体大小，从1.125rem改为0.95rem */
    border: none;
    outline: none;
    resize: none;
    min-height: 180px;
    /* 90px * 2 = 180px (再加高100%) */
    max-height: 360px;
    /* 180px * 2 = 360px (再加高100%) */
}

.prompt-textarea::placeholder {
    color: #9ca3af;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.size-selector {
    display: flex;
    gap: 0.5rem;
}

.size-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-btn.active {
    background: #fff;
    color: #000;
}

.size-btn:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.size-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 质量选择器 */
.quality-selector {
    display: flex;
    align-items: center;
}

.quality-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.quality-checkbox:hover {
    background: rgba(255, 255, 255, 0.15);
}

.quality-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #fbbf24;
}

.quality-checkbox span {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}

.generate-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    color: #000;
    border: none;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.25);
}

.generate-btn:disabled {
    background: #6b7280;
    color: #9ca3af;
    cursor: not-allowed;
}

.generate-btn .loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #9ca3af;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 功能特性 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1024px;
    margin: 2rem auto 1rem;
    /* 与画廊区域距离 2rem */
    margin-top: calc(-1 * var(--feature-section-lift, 4rem));
    /* 向上移动功能特性窗口 4rem */
    padding: 0 1.5rem;
}

.feature {
    text-align: center;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon.yellow {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.feature-icon.purple {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.feature-icon.green {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #9ca3af;
}

/* 画廊区域 - 横向滚动布局 */
.gallery {
    width: 100%;
    margin: 2rem auto 5rem;
    /* 与输入栏距离 2rem */
    margin-top: calc(-1 * var(--gallery-section-lift, 2rem));
    /* 上移画廊窗口 2rem */
    overflow: visible;
    position: relative;
    z-index: 5;
}

.gallery h2 {
    font-size: 1.875rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: -1.5rem;
    padding: 0 1.5rem;
    display: none;
    /* 隐藏标题 */
}

.gallery-tip-banner {
    margin: 2.5rem auto -1rem;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    flex-wrap: wrap;
}

.gallery-tip-text {
    margin: 0;
    letter-spacing: 0.05em;
    color: #fff;
    animation: gallery-tip-breathe 2.8s ease-in-out infinite;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.gallery-tip-subtext {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.gallery-tip-hands {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.gallery-tip-hand {
    font-size: 1.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    animation: gallery-hand-bounce 1.4s ease-in-out infinite;
    filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.35));
}

.gallery-tip-hands .gallery-tip-hand:nth-child(2) {
    animation-delay: 0.35s;
}

.gallery-tip-hand.right {
    animation-delay: 0.25s;
}

@keyframes gallery-hand-bounce {

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

    40% {
        transform: translateY(6px) scale(1.05);
        opacity: 1;
    }

    70% {
        transform: translateY(2px);
    }
}

@keyframes gallery-tip-breathe {

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

    50% {
        transform: scale(1.04);
    }
}

/* 横向滚动容器 */
.gallery-scroll-container {
    position: relative;
    padding: 0 1.5rem;
    /* 添加上下内边距，防止放大时被遮挡 */
    padding-top: 4rem;
    /* 增加到 4rem */
    padding-bottom: 5rem;
    overflow: visible;
    /* 确保可见 */
}

.gallery-carousel {
    display: flex !important;
    flex-direction: row !important;
    /* 强制横向排列 */
    flex-wrap: nowrap !important;
    /* 不换行 */
    gap: 0.75rem;
    /* 缩小间距从 1.5rem 到 0.75rem */
    overflow-x: auto;
    overflow-y: visible;
    /* 改为 visible，允许放大时超出 */
    padding-top: 2rem;
    /* 添加上内边距 */
    padding-bottom: 4rem;
    /* 增加下内边距 */
    /* 移除 scroll-snap 避免与自动滚动冲突 */
    -webkit-overflow-scrolling: touch;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-carousel::-webkit-scrollbar {
    display: none;
}

/* 自动滚动时禁用平滑滚动 */
.gallery-carousel.auto-scrolling {
    scroll-behavior: auto;
}

/* 滚动提示 */
.scroll-hint {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.scroll-hint svg {
    width: 16px;
    height: 16px;
}

/* 画廊滚动按钮 */
.gallery-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(251, 191, 36, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    opacity: 0.7;
    /* 调整到画廊窗口的纵向中间 */
    margin-top: -2rem;
    /* 向上移动，使其对齐画廊窗口中心 */
}

.gallery-scroll-btn:hover {
    opacity: 1;
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-scroll-btn.left {
    left: 10px;
}

.gallery-scroll-btn.right {
    right: 10px;
}

.gallery-scroll-btn svg {
    width: 24px;
    height: 24px;
    color: #fbbf24;
}

/* 移动端隐藏滚动按钮 */
@media (max-width: 768px) {
    .gallery-scroll-btn {
        width: 40px;
        height: 40px;
    }

    .gallery-scroll-btn svg {
        width: 20px;
        height: 20px;
    }

    .gallery-tip-banner {
        flex-direction: column;
        gap: 0.35rem;
        font-size: 1.05rem;
    }

    .gallery-tip-hand {
        font-size: 1.5rem;
    }
}

.gallery-item {
    position: relative;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    /* 横向滚动布局 - 竖屏尺寸 9:16 */
    flex-shrink: 0 !important;
    width: 240px !important;
    /* 竖屏宽度 */
    height: 420px !important;
    /* 竖屏高度 */
    aspect-ratio: 9 / 16;
    /* scroll-snap-align: center; */
    /* 移除避免冲突 */
    /* 悬停放大效果 */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* 优化渲染性能 - 保留布局/样式隔离，允许放大溢出 */
    contain: layout style;
    transform: translateZ(0);
    transform-origin: center center;
    transform-origin: center center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: scale(1.18);
    z-index: 50;
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.3);
}

/* 视频加载状态 */
.gallery-item.loading {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.gallery-item.loaded {
    background: #000;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .gallery-item {
        width: 200px;
        /* 移动端竖屏宽度 */
        height: 356px;
        /* 移动端竖屏高度 (9:16) */
        aspect-ratio: 9 / 16;
    }

    .gallery-item:hover {
        transform: scale(1.15) translateZ(0);
    }

    .gallery-carousel {
        gap: 0.5rem;
        /* 移动端进一步缩小间距 */
    }
}

.gallery-video,
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    /* 优化视频和图片渲染质量 */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

/* Poster图片优化 */
.gallery-video[poster] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 图片质量优化 */
.gallery-item img,
.gallery-item video::cue {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
}

.gallery-item:hover .gallery-video,
.gallery-item:hover .gallery-image {
    opacity: 0.7;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* 始终显示遮罩层 */
    transition: opacity 0.3s ease;
    pointer-events: none;
    /* 允许点击穿透到视频 */
}

.gallery-item:hover .video-overlay {
    opacity: 1;
}

.video-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(251, 191, 36, 0.3), rgba(168, 85, 247, 0.3));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover .video-overlay::before {
    opacity: 1;
}

.video-overlay .play-btn {
    position: relative;
    z-index: 2;
    width: 2.8rem;
    /* 缩小20%: 3.5rem * 0.8 = 2.8rem */
    height: 2.8rem;
    background: rgba(0, 0, 0, 0.3);
    /* 更透明: 从0.6降到0.3 */
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    /* 边框也更透明 */
    opacity: 0;
    pointer-events: auto;
}

.gallery-item:hover .video-overlay .play-btn {
    opacity: 1;
    transform: scale(1.25);
    background: rgba(251, 191, 36, 0.3);
    /* 透明黄色背景 */
    border-color: rgba(251, 191, 36, 0.8);
    /* 黄色边框 */
}

.gallery-item:hover .video-overlay .play-btn svg {
    color: #fbbf24;
    /* 黄色图标 */
}

.video-overlay .info {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.5s ease;
}

.video-overlay .info h4 {
    font-weight: 600;
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.5s ease;
}

.gallery-item:hover .video-overlay .info h4 {
    color: #fbbf24;
}

.video-overlay .info p {
    font-size: 0.875rem;
    color: #d1d5db;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: color 0.5s ease;
}

.gallery-item:hover .video-overlay .info p {
    color: #fff;
}

/* 边框光效 */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(251, 191, 36, 0.5);
}

/* 模态框 */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
}

.modal h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-align: center;
}

.modal p {
    color: #9ca3af;
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 1rem;
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:focus {
    outline: none;
    border-color: #fbbf24;
}

/* 用户面板 */
.user-panel {
    background: rgba(0, 0, 0, 1);
    /* 完全不透明 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 60rem;
    /* 与输入区域宽度一致 */
}

.credits-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 0.5rem;
}

.credits-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbbf24;
}

.recharge-btn {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    color: #000;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1rem;
        /* 移动端进一步减少头部内边距 */
    }

    .hero {
        padding: 1.5rem 1rem 0.5rem;
        /* 移动端减少英雄区域内边距 */
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .generate-btn {
        width: 100%;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 画
质选择器样式 */
.quality-selector {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quality-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.quality-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.quality-checkbox span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fbbf24;
}

.quality-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0;
    padding-left: 26px;
}

/* 积分消耗提示动画 */
.quality-checkbox:hover span {
    color: #f59e0b;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .quality-hint {
        font-size: 0.7rem;
    }
}


/* 画质选择器新样式 - 靠近生成视频按钮 */
.quality-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    cursor: pointer !important;
    user-select: none !important;
    padding: 0.5rem 1rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 9999px !important;
    transition: background 0.2s !important;
}

.quality-checkbox:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.quality-checkbox input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
}

.quality-checkbox span {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #fbbf24 !important;
    white-space: nowrap !important;
}

.quality-checkbox:hover span {
    color: #f59e0b !important;
}

/* 隐藏旧的提示 */
.quality-hint {
    display: none !important;
}

/* 充值模态框样式 */
.recharge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
    box-sizing: border-box;
    overflow-y: auto;
    touch-action: pan-y;
}

.recharge-modal.hidden {
    display: none;
}

.recharge-content {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.recharge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.recharge-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.recharge-close {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.recharge-close:hover,
.recharge-close:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.recharge-close svg {
    width: 20px;
    height: 20px;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.recharge-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.recharge-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fbbf24;
    transform: translateY(-2px);
}

.recharge-option.selected {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
}

.recharge-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.recharge-credits {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.recharge-bonus {
    font-size: 0.85rem;
    color: #10b981;
}

.recharge-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.recharge-actions button {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-recharge {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    color: #000;
}

.btn-recharge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.btn-recharge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: space-between;
    }

    .size-selector {
        flex-wrap: nowrap;
    }

    .quality-checkbox span {
        font-size: 0.85rem !important;
    }

    .recharge-modal {
        align-items: flex-start;
        padding: 1rem;
    }

    .recharge-content {
        width: 100%;
        max-height: calc(100vh - 2rem);
        padding: 1.5rem;
    }

    .recharge-options {
        grid-template-columns: 1fr;
    }
}


/* 交易记录样式 */
.transactions-section {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.transactions-header h4 {
    font-size: 1.2rem;
    color: #fbbf24;
    margin: 0;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fbbf24;
}

.btn-refresh svg {
    width: 16px;
    height: 16px;
}

.transactions-list {
    min-height: 200px;
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.transactions-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #fbbf24;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.transactions-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}

.transactions-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.type-gift {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.type-recharge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.type-consume {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.type-refund {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

.type-manual {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.amount-positive {
    color: #10b981;
    font-weight: 600;
}

.amount-negative {
    color: #ef4444;
    font-weight: 600;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.no-transactions {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.transactions-pagination {
    margin-top: 1rem;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.btn-page {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-page:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fbbf24;
}

.page-info {
    color: #9ca3af;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .transactions-table {
        font-size: 0.85rem;
    }

    .transactions-table th,
    .transactions-table td {
        padding: 0.5rem;
    }

    .transactions-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .btn-refresh {
        width: 100%;
        justify-content: center;
    }
}

/* 移动端表格滚动 */
@media (max-width: 640px) {
    .transactions-list {
        overflow-x: auto;
    }

    .transactions-table {
        min-width: 600px;
    }
}

/* 视频链接单元格样式 */
.video-link-cell {
    text-align: center;
}

.video-link-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.btn-copy-link,
.btn-play-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-link:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

.btn-play-video:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
    transform: translateY(-2px);
}

.btn-copy-link svg,
.btn-play-video svg {
    width: 20px;
    height: 20px;
}

.no-video {
    color: #6b7280;
    font-size: 0.9rem;
}

/* 状态列样式 */
.status-cell {
    text-align: center;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.status-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    animation: pulse 2s ease-in-out infinite;
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.no-status {
    color: #6b7280;
    font-size: 0.9rem;
}

.video-processing {
    color: #3b82f6;
    font-size: 0.85rem;
    font-style: italic;
}

.video-failed {
    color: #ef4444;
    font-size: 0.85rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* 图片上传样式 */
.image-upload-container {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* 减少间距，让按钮更贴近 */
}

.upload-image-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 0.5rem;
    color: #fbbf24;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    position: relative;
}

.upload-image-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
}

.upload-image-btn::after,
.upload-image-btn::before {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.upload-image-btn::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #fef3c7;
    padding: 0.35rem 0.65rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.upload-image-btn::before {
    content: '';
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
    z-index: 20;
}

.upload-image-btn:hover::after,
.upload-image-btn:hover::before,
.upload-image-btn:focus-visible::after,
.upload-image-btn:focus-visible::before {
    opacity: 1;
}

.upload-image-btn svg {
    width: 20px;
    height: 20px;
}

.image-preview {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.image-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
}

.image-preview-item .remove-image:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* 交易记录表格样式 */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.transactions-table th,
.transactions-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transactions-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    font-size: 0.875rem;
    color: #9ca3af;
}

.transactions-table tbody tr {
    transition: background 0.2s;
}

.transactions-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* 状态徽章样式 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.status-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-badge.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.status-failure {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.status-badge.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* 类型徽章样式 */
.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.type-badge.type-consume {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.type-badge.type-recharge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.type-badge.type-gift {
    background: rgba(236, 72, 153, 0.2);
    color: #ec4899;
}

.type-badge.type-refund {
    background: rgba(139, 92, 246, 0.2);
    color: #8b5cf6;
}

/* 积分变动样式 */
.amount-positive {
    color: #22c55e;
    font-weight: 600;
}

.amount-negative {
    color: #ef4444;
    font-weight: 600;
}

/* 流程号样式 */
.generation-id {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
}

.no-generation-id {
    color: #6b7280;
}

/* 视频链接操作按钮 */
.video-link-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.btn-copy-link,
.btn-play-video {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-copy-link:hover,
.btn-play-video:hover {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.5);
}

.video-processing,
.video-failed,
.no-video,
.no-status {
    color: #9ca3af;
    font-size: 0.875rem;
}

.video-failed {
    color: #ef4444;
}

/* ========== 画廊区域样式 ========== */
.gallery {
    width: 100%;
    margin: 0 auto 5rem;
    margin-top: calc(-1 * var(--gallery-section-lift, 2rem));
    /* 上移画廊窗口 2rem */
    overflow: visible;
    padding-top: 3rem;
    position: relative;
    z-index: 5;
}

.gallery h2 {
    font-size: 1.875rem;
    font-weight: bold;
    text-align: center;
    /* 恢复居中 */
    margin-bottom: -1.5rem;
    padding: 0 1.5rem;
}

/* 横向滚动容器 */
.gallery-scroll-container {
    position: relative;
    padding: 0 1.5rem;
    padding-top: 4rem;
    padding-bottom: 5rem;
    overflow: visible;
}

.gallery-carousel {
    display: flex !important;
    flex-direction: row !important;
    /* 强制横向排列 */
    flex-wrap: nowrap !important;
    /* 不换行 */
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: visible;
    padding-top: 2rem;
    padding-bottom: 4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-carousel::-webkit-scrollbar {
    display: none;
}

.gallery-carousel.auto-scrolling {
    scroll-behavior: auto;
}

/* 滚动提示 */
.scroll-hint {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.scroll-hint svg {
    width: 16px;
    height: 16px;
}

/* 画廊滚动按钮 */
.gallery-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(251, 191, 36, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    opacity: 0.7;
    margin-top: -2rem;
}

.gallery-scroll-btn:hover {
    opacity: 1;
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-scroll-btn.left {
    left: 10px;
}

.gallery-scroll-btn.right {
    right: 10px;
}

.gallery-scroll-btn svg {
    width: 24px;
    height: 24px;
    color: #fbbf24;
}

.gallery-item {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    width: 240px;
    height: 420px;
    aspect-ratio: 9 / 16;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    contain: layout style;
    transform: translateZ(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: scale(1.18);
    z-index: 50;
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.3);
}

.gallery-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover .video-overlay {
    opacity: 1;
}

.video-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(251, 191, 36, 0.3), rgba(168, 85, 247, 0.3));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover .video-overlay::before {
    opacity: 1;
}

.video-overlay .play-btn {
    position: relative;
    z-index: 2;
    width: 2.8rem;
    height: 2.8rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    pointer-events: auto;
}

.gallery-item:hover .video-overlay .play-btn {
    opacity: 1;
    transform: scale(1.25);
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.8);
}

.gallery-item:hover .video-overlay .play-btn svg {
    color: #fbbf24;
}

.video-overlay .info {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.5s ease;
}

.video-overlay .info h4 {
    font-weight: 600;
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.5s ease;
}

.gallery-item:hover .video-overlay .info h4 {
    color: #fbbf24;
}

.video-overlay .info p {
    font-size: 0.875rem;
    color: #d1d5db;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: color 0.5s ease;
}

.gallery-item:hover .video-overlay .info p {
    color: #fff;
}

/* 边框光效 */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 0.75rem;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(251, 191, 36, 0.5);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .gallery-item {
        width: 200px;
        height: 356px;
        aspect-ratio: 9 / 16;
    }

    .gallery-item:hover {
        transform: scale(1.15) translateZ(0);
    }
}

/* 不同颜色的渐变背景 */
.gallery-item:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gallery-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gallery-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gallery-item:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gallery-item:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gallery-item:nth-child(6) {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.gallery-item:nth-child(7) {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gallery-item:nth-child(8) {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.gallery-item:nth-child(9) {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.gallery-item:nth-child(10) {
    background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%);
}

/* 选中案例提示 */
.selected-case-hint {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 0.5rem;
    color: #fbbf24;
    font-size: 0.875rem;
    display: none;
    text-align: center;
}

.selected-case-hint.active {
    display: block;
}

/* ========== 案例指示器样式 ========== */
.case-indicator {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    font-size: 0.875rem;
    color: #9ca3af;
    user-select: none;
    padding: 0.5rem 1rem;
    border: 2px solid rgba(156, 163, 175, 0.3);
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.case-indicator.has-case {
    color: #f97316;
    /* 橙色 */
    border-color: rgba(249, 115, 22, 0.5);
    background: rgba(249, 115, 22, 0.1);
    cursor: pointer;
}

.case-indicator.has-case:hover {
    border-color: rgba(249, 115, 22, 0.8);
    background: rgba(249, 115, 22, 0.2);
}

#case-indicator-text {
    font-weight: 500;
}

.textarea-container {
    position: relative;
}

/* ========== 视频播放模态框样式 ========== */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.video-modal-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.video-modal-close:hover {
    background: rgba(251, 191, 36, 0.3);
    border-color: rgba(251, 191, 36, 0.8);
    transform: rotate(90deg);
}

.video-modal-title {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.video-modal-player {
    width: auto;
    height: auto;
    max-width: min(1200px, 90vw);
    max-height: calc(90vh - 6rem);
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 0.5rem;
    outline: none;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .video-modal-content {
        padding: 1rem;
        max-width: 95vw;
    }

    .video-modal-title {
        font-size: 1.25rem;
    }

    .video-modal-player {
        max-width: 100%;
        max-height: 65vh;
    }
}

/* ========== 页尾样式 ========== */
.primary-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 5rem;
    padding: 3rem 0;
}

.primary-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.primary-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.primary-footer__brand .logo {
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
}

.primary-footer__text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

.primary-footer__title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.primary-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    align-items: flex-start;
}

.primary-footer__links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.primary-footer__links a:hover {
    color: #fbbf24;
}

.primary-footer__divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .primary-footer__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        text-align: left;
        justify-items: stretch;
        gap: 0.75rem;
    }

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

.site-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.875rem;
}

.site-footer p {
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

/* ========== 特性窗口颜色区分 ========== */
/* 为每个特性窗口设置不同的主题色，方便区分 */

/* 特性窗口1 - 蓝色主题 */
#feature-window-1 {
    border-color: rgba(59, 130, 246, 0.3);
}

#feature-window-1.open {
    box-shadow: 0 -15px 50px rgba(59, 130, 246, 0.3);
}

#feature-window-1 .case-feature-window__header .title {
    color: #3b82f6;
}

.feature-panel[data-panel-id="feature-window-1"] .feature-toggle-btn.is-open,
.feature-panel[data-panel-id="feature-window-1"] .feature-toggle-btn.has-selection {
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.12);
}

.feature-panel[data-panel-id="feature-window-1"] .feature-toggle-btn.has-selection .toggle-dot {
    background: #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.8);
}

.feature-panel[data-panel-id="feature-window-1"] .feature-toggle-btn.has-selection .toggle-index,
.feature-panel[data-panel-id="feature-window-1"] .feature-toggle-btn.is-open .toggle-index {
    background: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.feature-panel[data-panel-id="feature-window-1"] .feature-toggle-hint.active {
    color: #3b82f6;
}

/* 特性窗口2 - 紫色主题 */
#feature-window-2 {
    border-color: rgba(168, 85, 247, 0.3);
}

#feature-window-2.open {
    box-shadow: 0 -15px 50px rgba(168, 85, 247, 0.3);
}

#feature-window-2 .case-feature-window__header .title {
    color: #a855f7;
}

.feature-panel[data-panel-id="feature-window-2"] .feature-toggle-btn.is-open,
.feature-panel[data-panel-id="feature-window-2"] .feature-toggle-btn.has-selection {
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
    background: rgba(168, 85, 247, 0.12);
}

.feature-panel[data-panel-id="feature-window-2"] .feature-toggle-btn.has-selection .toggle-dot {
    background: #a855f7;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.8);
}

.feature-panel[data-panel-id="feature-window-2"] .feature-toggle-btn.has-selection .toggle-index,
.feature-panel[data-panel-id="feature-window-2"] .feature-toggle-btn.is-open .toggle-index {
    background: rgba(168, 85, 247, 0.25);
    color: #a855f7;
}

.feature-panel[data-panel-id="feature-window-2"] .feature-toggle-hint.active {
    color: #a855f7;
}

/* 特性窗口3 - 绿色主题 */
#feature-window-3 {
    border-color: rgba(34, 197, 94, 0.3);
}

#feature-window-3.open {
    box-shadow: 0 -15px 50px rgba(34, 197, 94, 0.3);
}

#feature-window-3 .case-feature-window__header .title {
    color: #22c55e;
}

.feature-panel[data-panel-id="feature-window-3"] .feature-toggle-btn.is-open,
.feature-panel[data-panel-id="feature-window-3"] .feature-toggle-btn.has-selection {
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.12);
}

.feature-panel[data-panel-id="feature-window-3"] .feature-toggle-btn.has-selection .toggle-dot {
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

.feature-panel[data-panel-id="feature-window-3"] .feature-toggle-btn.has-selection .toggle-index,
.feature-panel[data-panel-id="feature-window-3"] .feature-toggle-btn.is-open .toggle-index {
    background: rgba(34, 197, 94, 0.25);
    color: #22c55e;
}

.feature-panel[data-panel-id="feature-window-3"] .feature-toggle-hint.active {
    color: #22c55e;
}

/* 特性窗口4 - 橙色主题 */
#feature-window-4 {
    border-color: rgba(249, 115, 22, 0.3);
}

#feature-window-4.open {
    box-shadow: 0 -15px 50px rgba(249, 115, 22, 0.3);
}

#feature-window-4 .case-feature-window__header .title {
    color: #f97316;
}

.feature-panel[data-panel-id="feature-window-4"] .feature-toggle-btn.is-open,
.feature-panel[data-panel-id="feature-window-4"] .feature-toggle-btn.has-selection {
    border-color: rgba(249, 115, 22, 0.7);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.25);
    background: rgba(249, 115, 22, 0.12);
}

.feature-panel[data-panel-id="feature-window-4"] .feature-toggle-btn.has-selection .toggle-dot {
    background: #f97316;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
}

.feature-panel[data-panel-id="feature-window-4"] .feature-toggle-btn.has-selection .toggle-index,
.feature-panel[data-panel-id="feature-window-4"] .feature-toggle-btn.is-open .toggle-index {
    background: rgba(249, 115, 22, 0.25);
    color: #f97316;
}

.feature-panel[data-panel-id="feature-window-4"] .feature-toggle-hint.active {
    color: #f97316;
}

/* 特性窗口5 - 粉色主题 */
#feature-window-5 {
    border-color: rgba(236, 72, 153, 0.3);
}

#feature-window-5.open {
    box-shadow: 0 -15px 50px rgba(236, 72, 153, 0.3);
}

#feature-window-5 .case-feature-window__header .title {
    color: #ec4899;
}

.feature-panel[data-panel-id="feature-window-5"] .feature-toggle-btn.is-open,
.feature-panel[data-panel-id="feature-window-5"] .feature-toggle-btn.has-selection {
    border-color: rgba(236, 72, 153, 0.7);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.25);
    background: rgba(236, 72, 153, 0.12);
}

.feature-panel[data-panel-id="feature-window-5"] .feature-toggle-btn.has-selection .toggle-dot {
    background: #ec4899;
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.8);
}

.feature-panel[data-panel-id="feature-window-5"] .feature-toggle-btn.has-selection .toggle-index,
.feature-panel[data-panel-id="feature-window-5"] .feature-toggle-btn.is-open .toggle-index {
    background: rgba(236, 72, 153, 0.25);
    color: #ec4899;
}

.feature-panel[data-panel-id="feature-window-5"] .feature-toggle-hint.active {
    color: #ec4899;
}