@import url('/admin/vendor/font-awesome/css/all.min.css');

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

:root {
    --bg-primary: #0f0c29;
    --bg-secondary: #1a1035;
    --bg-tertiary: #2d1b69;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #3b82f6, #8b5cf6);
    --text-primary: #f5f3ff;
    --text-secondary: #a78bfa;
    --border-color: rgba(139,92,246,0.15);
    --input-bg: rgba(15,12,41,0.6);
    --card-bg: rgba(26,16,53,0.6);
    --glow: 0 0 20px rgba(139,92,246,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding-bottom: 50px;
}

.header {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(90deg, var(--bg-secondary), var(--bg-tertiary));
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(139,92,246,0.08);
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    color: var(--text-primary);
    font-size: 14px;
    margin-right: 10px;
}

/* 公告滚动字幕 */
.notice-marquee {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 193, 7, 0.1);
    border-top: 1px solid rgba(255, 193, 7, 0.3);
    padding: 6px 16px;
    font-size: 13px;
    color: #ffc107;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}
.marquee-label {
    flex-shrink: 0;
    margin-right: 12px;
    font-weight: bold;
}
.marquee-content {
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
}
.marquee-content span {
    display: inline-block;
    animation: marquee 20s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* 页面底部公告 */
.page-footer-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    color: #ffc107;
    text-align: center;
    padding: 10px 20px;
    font-size: 14px;
    z-index: 100;
}

/* 公告弹窗 */
.notice-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.notice-modal.show {
    display: flex;
}
.notice-modal-content {
    background: var(--bg-secondary, #1e293b);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.1);
}
.notice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.notice-modal-header h3 {
    color: #ffc107;
    margin: 0;
    font-size: 18px;
}
.notice-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
}
.notice-modal-body {
    color: var(--text-primary, #f1f5f9);
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 18px;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
    overflow-x: auto;
}

.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.tab {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.3s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tab.active {
    background: var(--accent-color);
    color: white;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 320px;
    background: var(--bg-secondary);
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group label.required::after {
    content: '*';
    color: var(--accent-color);
    margin-left: 4px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.ratio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ratio-btn {
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.ratio-btn:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.ratio-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.duration-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.duration-btn {
    flex: 1;
    min-width: 60px;
    padding: 8px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.duration-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.duration-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.btn-generate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-primary);
}

.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.preview-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.preview-placeholder p {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.preview-placeholder span {
    font-size: 14px;
}

.preview-container video {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* 生成中的视频预览区域 */
.generation-progress-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--accent-color); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { border-color: #818cf8; box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.2); }
}

.generation-preview-content {
    text-align: center;
    padding: 40px;
    max-width: 400px;
}

.generation-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.generation-info {
    margin-bottom: 24px;
}

.generation-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.generation-stage {
    font-size: 14px;
    color: var(--text-secondary);
    min-height: 20px;
}

.generation-progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.generation-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.generation-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #818cf8);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.generation-percentage {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 45px;
    text-align: right;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.btn-action {
    padding: 10px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-mode-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-mode {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-mode:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
}

.btn-mode.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.history-panel {
    width: 280px;
    background: var(--bg-secondary);
    padding: 20px;
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
}

.history-panel h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.history-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.history-tab {
    flex: 1;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.history-tab.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.history-item {
    aspect-ratio: 1;
    background: var(--input-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.history-item img,
.history-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-item:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(233, 69, 96, 0.3);
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: var(--input-bg);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s;
    width: 0%;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.upload-area {
    margin-top: 8px;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--input-bg);
}

.upload-btn:hover {
    border-color: var(--accent-color);
    background: rgba(233, 69, 96, 0.05);
}

.upload-btn .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.upload-btn span {
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-btn small {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

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

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(233, 69, 96, 0.9);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.preview-item .remove-btn:hover {
    background: var(--accent-color);
}

.scene-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

/* ========== 瀑布流生成区域样式 ========== */
.waterfall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    min-height: 100px;
}

.waterfall-item {
    background: #252542;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    animation: waterfallFadeIn 0.5s ease forwards;
}

@keyframes waterfallFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 瀑布流图片容器 */
.waterfall-item .wf-image-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.waterfall-item .wf-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.waterfall-item:hover .wf-image-wrap img {
    transform: scale(1.03);
}

/* 瀑布流卡片底部信息 */
.waterfall-item .wf-info {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.waterfall-item .wf-label {
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
}

.waterfall-item .wf-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.wf-status.generating {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
}

.wf-status.completed {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

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

/* 生成中状态 */
.waterfall-item.status-generating {
    border-color: #f59e0b;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.waterfall-item.status-completed {
    border-color: #22c55e;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.1);
}

.waterfall-item.status-failed {
    border-color: #ef4444;
}

/* 加载动画占位 */
.waterfall-loading-skeleton {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(90deg, #252542 25%, #2a2a48 50%, #252542 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.loading-spinner-sm {
    width: 28px;
    height: 28px;
    border: 3px solid #3a3a5c;
    border-top-color: #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 编辑按钮 */
.wf-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.65);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s;
}

.waterfall-item:hover .wf-edit-btn {
    opacity: 1;
}

.scene-preview-item {
    aspect-ratio: 4/3;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.scene-preview-item:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.scene-preview-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
}

.scene-preview-item:hover .image-overlay {
    opacity: 1 !important;
}

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

/* 图片悬停操作按钮样式 */
.scene-preview-item .image-overlay-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 30px 8px 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scene-preview-item:hover .image-overlay-actions {
    opacity: 1;
}

.image-action-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.image-action-btn:hover {
    background: rgba(102, 126, 234, 0.8);
    border-color: rgba(102, 126, 234, 0.8);
    transform: scale(1.05);
}

.image-action-btn span {
    font-size: 14px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.template-item {
    aspect-ratio: 9/16;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.template-item:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.template-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
}

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

.template-item .template-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.template-item .template-name {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    margin-bottom: 4px;
}

.template-item .template-desc {
    font-size: 11px;
    color: #888;
}

.detail-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--bg-primary);
    padding: 20px;
    overflow-y: auto;
}

.detail-image-wrapper {
    max-width: 400px;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.detail-image-wrapper img {
    width: 100%;
    display: block;
}

.detail-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-section {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.detail-section img {
    width: 100%;
    display: block;
}

.detail-placeholder {
    text-align: center;
    color: var(--text-secondary);
}

.detail-placeholder .placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.detail-placeholder p {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.detail-placeholder span {
    font-size: 14px;
}

.scene-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.scene-thumbnail {
    width: 100px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.scene-thumbnail:hover {
    border-color: rgba(233, 69, 96, 0.5);
}

.scene-thumbnail.active {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.3);
}

.scene-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-container {
    position: relative;
}

@media (max-width: 1200px) {
    .history-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        z-index: 100;
        transform: translateY(100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateY(0);
    }
    
    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== Hot 示例模板样式 ==================== */

@keyframes hot-flash {
    0%, 100% {
        background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
        box-shadow: 0 0 5px rgba(255, 71, 87, 0.5);
        transform: scale(1);
    }
    50% {
        background: linear-gradient(135deg, #ff6348 0%, #ff4757 100%);
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.8), 0 0 40px rgba(255, 71, 87, 0.4);
        transform: scale(1.05);
    }
}

@keyframes hot-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.hot-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 6px;
    animation: hot-flash 1.5s ease-in-out infinite, hot-pulse 1s ease-in-out infinite;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.hot-template-tab {
    position: relative;
    background: rgba(255, 71, 87, 0.1) !important;
    border: 1px solid rgba(255, 71, 87, 0.3) !important;
}

.hot-template-tab:hover {
    background: rgba(255, 71, 87, 0.2) !important;
    border-color: rgba(255, 71, 87, 0.5) !important;
}

.hot-templates-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hot-templates-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.hot-templates-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 71, 87, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 71, 87, 0.2);
    animation: modal-slide-in 0.3s ease-out;
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hot-templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255, 71, 87, 0.2);
    background: rgba(255, 71, 87, 0.05);
}

.hot-templates-header h2 {
    margin: 0;
    color: #ff4757;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hot-templates-header .close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.hot-templates-header .close-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.hot-templates-body {
    padding: 30px;
}

.template-category {
    margin-bottom: 30px;
}

.template-category:last-child {
    margin-bottom: 0;
}

.template-category h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.template-list .template-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    aspect-ratio: auto;
}

.template-list .template-item:hover {
    background: rgba(255, 71, 87, 0.1);
    border-color: rgba(255, 71, 87, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.2);
}

.template-list .template-item .template-icon {
    font-size: 24px;
}

.template-list .template-item .template-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hot-templates-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .template-list {
        grid-template-columns: 1fr;
    }
    
    .hot-templates-body {
        padding: 20px;
    }
}

/* ==================== 图片类型选择器样式 ==================== */

.image-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.image-type-card {
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.image-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.image-type-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.2);
}

.image-type-card.active {
    border-color: var(--accent-color);
    background: rgba(233, 69, 96, 0.1);
}

.image-type-card.active::before {
    opacity: 0.1;
}

.image-type-card .type-icon {
    font-size: 28px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.image-type-card .type-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.image-type-card .type-desc {
    font-size: 11px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.image-type-card.active .type-icon,
.image-type-card.active .type-name {
    color: var(--accent-color);
}

/* 选中时的勾选标记 */
.image-type-card.active::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .image-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .image-type-card {
        padding: 10px 6px;
    }
    
    .image-type-card .type-icon {
        font-size: 24px;
    }
    
    .image-type-card .type-name {
        font-size: 12px;
    }
    
    .image-type-card .type-desc {
        font-size: 10px;
    }
}

/* ==================== AI提示词生成弹窗样式 ==================== */
.ai-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-prompt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.ai-prompt-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
    animation: modal-slide-in 0.3s ease-out;
}

@keyframes modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.05);
}

.ai-prompt-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.3rem;
}

.ai-prompt-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.ai-prompt-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.ai-prompt-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.ai-prompt-form {
    margin-bottom: 20px;
}

.ai-prompt-form .form-group {
    margin-bottom: 16px;
}

.ai-prompt-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.ai-prompt-form input,
.ai-prompt-form textarea,
.ai-prompt-form select {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.3s;
}

.ai-prompt-form input:focus,
.ai-prompt-form textarea:focus,
.ai-prompt-form select:focus {
    outline: none;
    border-color: #6366f1;
}

.ai-prompt-form textarea {
    resize: vertical;
    min-height: 60px;
}

.ai-prompt-generate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-prompt-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.ai-prompt-generate:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.prompt-result {
    margin-top: 20px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
}

.prompt-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.prompt-result-header h3 {
    margin: 0;
    color: #6366f1;
    font-size: 1rem;
}

.copy-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: rgba(99, 102, 241, 0.5);
    border-color: #6366f1;
}

#generatedPrompt {
    margin: 0 0 16px 0;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.use-prompt-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.use-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-ai-prompt:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-ai-prompt:active {
    transform: scale(0.98);
}

.video-duration-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.video-duration-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-secondary);
    font-size: 14px;
}

.video-duration-options label:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.video-duration-options input[type="radio"] {
    display: none;
}

.video-duration-options input[type="radio"]:checked + span {
    color: #6366f1;
    font-weight: bold;
}

.video-duration-options input[type="radio"]:checked + span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6366f1;
    margin-right: 4px;
}

/* ===== 爆图匠 紫蓝渐变科技风覆盖样式 ===== */

/* 侧边栏紫蓝渐变 */
.admin-sidebar {
    background: linear-gradient(180deg, #0f0c29 0%, #1a1035 50%, #2d1b69 100%) !important;
    border-right: 1px solid rgba(139,92,246,0.12) !important;
    backdrop-filter: blur(10px);
}
.admin-sidebar-header {
    background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.08)) !important;
    border-bottom: 1px solid rgba(139,92,246,0.1) !important;
}
.admin-sidebar-header h2 {
    background: linear-gradient(135deg, #a78bfa, #60a5fa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* 菜单项 */
.nav-item, .menu-item, .sidebar-menu a {
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1) !important;
    border-left: 2px solid transparent !important;
}
.nav-item:hover, .menu-item:hover, .sidebar-menu a:hover {
    background: rgba(139,92,246,0.08) !important;
    border-left-color: var(--accent-color) !important;
    padding-left: 22px !important;
}
.nav-item.active, .menu-item.active, .sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(139,92,246,0.2), transparent) !important;
    border-left-color: var(--accent-color) !important;
    color: #c4b5fd !important;
    box-shadow: inset 0 0 20px rgba(139,92,246,0.05) !important;
}

/* 主内容区 */
.admin-main, .main-content {
    background: var(--bg-primary) !important;
}

/* 卡片 - 毛玻璃+发光边框 */
.card, .stat-card, .data-card, .panel, .box {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 40px rgba(139,92,246,0.04) !important;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1) !important;
}
.card:hover, .stat-card:hover, .data-card:hover, .panel:hover, .box:hover {
    border-color: rgba(139,92,246,0.3) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 60px rgba(139,92,246,0.1) !important;
    transform: translateY(-2px) !important;
}

/* 统计数字渐变 */
.stat-number, .stat-value, .number-display {
    background: linear-gradient(135deg, #a78bfa, #60a5fa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: 700 !important;
}

/* 按钮紫蓝渐变 */
.btn-primary, .btn-submit, button[type="submit"]:not(.login-btn) {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 10px !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 16px rgba(139,92,246,0.25) !important;
}
.btn-primary:hover, .btn-submit:hover, button[type="submit"]:not(.login-btn):hover {
    background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 24px rgba(139,92,246,0.4) !important;
}

/* 次要按钮 */
.btn-secondary, .btn-cancel, .btn-default {
    background: rgba(139,92,246,0.08) !important;
    border: 1px solid rgba(139,92,246,0.2) !important;
    color: #c4b5fd !important;
    border-radius: 10px !important;
    transition: all 0.3s !important;
}
.btn-secondary:hover, .btn-cancel:hover, .btn-default:hover {
    background: rgba(139,92,246,0.15) !important;
    border-color: rgba(139,92,246,0.4) !important;
}

/* 危险按钮 */
.btn-danger, .btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(239,68,68,0.25) !important;
}

/* 输入框 */
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="search"], textarea, select {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    transition: all 0.3s !important;
}
input:focus, textarea:focus, select:focus {
    border-color: rgba(139,92,246,0.5) !important;
    box-shadow: 0 0 0 4px rgba(139,92,246,0.08) !important;
    outline: none !important;
}

/* 表格 */
table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
thead th {
    background: linear-gradient(180deg, rgba(139,92,246,0.12), rgba(59,130,246,0.06)) !important;
    color: #c4b5fd !important;
    border-bottom: 2px solid rgba(139,92,246,0.2) !important;
    padding: 12px 16px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}
tbody tr {
    border-bottom: 1px solid rgba(139,92,246,0.06) !important;
    transition: background 0.2s !important;
}
tbody tr:hover {
    background: rgba(139,92,246,0.05) !important;
}

/* 徽章 */
.badge, .tag {
    border-radius: 6px !important;
    padding: 3px 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}
.badge-success, .tag-success {
    background: rgba(34,197,94,0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34,197,94,0.2) !important;
}
.badge-warning, .tag-warning {
    background: rgba(251,191,36,0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251,191,36,0.2) !important;
}
.badge-danger, .tag-danger {
    background: rgba(239,68,68,0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239,68,68,0.2) !important;
}
.badge-info, .tag-info {
    background: rgba(139,92,246,0.15) !important;
    color: #c4b5fd !important;
    border: 1px solid rgba(139,92,246,0.2) !important;
}

/* 分页 */
.pagination button, .page-btn {
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
}
.pagination button:hover, .page-btn:hover {
    background: rgba(139,92,246,0.1) !important;
    border-color: rgba(139,92,246,0.3) !important;
    color: #c4b5fd !important;
}
.pagination button.active, .page-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6) !important;
    color: #fff !important;
    border: none !important;
}

/* 标题渐变 */
h1, h2, h3, .page-title, .section-title {
    color: #f5f3ff !important;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #3b82f6);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c3aed, #2563eb);
}

/* 链接 */
a {
    color: #a78bfa !important;
    transition: color 0.2s !important;
}
a:hover {
    color: #c4b5fd !important;
}

/* 模态框 */
.modal, .modal-content, .dialog {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 80px rgba(139,92,246,0.06) !important;
}

/* 背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.05) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
