/* Pollinations.ai 控制台 - 创作工作台 */
:root {
    --primary: #6d5dfc;
    --primary-light: #8b7cff;
    --primary-dark: #4737c8;
    --accent: #00b8a9;
    --accent-light: #33d6c8;
    --gradient-primary: linear-gradient(135deg, #6d5dfc 0%, #00b8a9 100%);
    --gradient-glow: linear-gradient(135deg, #8b7cff 0%, #33d6c8 100%);
    --gradient-bg: linear-gradient(135deg, #0b0d12 0%, #151922 48%, #0f1218 100%);
    
    --bg-primary: #0b0d12;
    --bg-secondary: #121620;
    --bg-tertiary: #1a2030;
    --bg-card: #151a24;
    --bg-hover: #202838;
    --bg-input: #0f131c;
    
    --text-primary: #f7f8fb;
    --text-secondary: #b4bdcc;
    --text-muted: #748094;
    
    --border-color: rgba(109, 93, 252, 0.28);
    --border-light: rgba(255, 255, 255, 0.08);
    
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.46);
    --shadow-glow: 0 0 28px rgba(0, 184, 169, 0.22);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 8px;
    --radius-xl: 12px;
}

/* 全局重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03) 0, rgba(255,255,255,0) 320px),
        var(--gradient-bg);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(5, 9, 16, 0.78), rgba(5, 9, 16, 0.94)),
        url('assets/ai-console-hero.png') center 22% / min(1600px, 130vw) auto no-repeat,
        radial-gradient(circle at 18% 12%, rgba(0, 184, 169, 0.18), transparent 32%),
        radial-gradient(circle at 78% 8%, rgba(109, 93, 252, 0.2), transparent 36%),
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: auto, min(1600px, 130vw) auto, auto, auto, 48px 48px, 48px 48px;
    mask-image: linear-gradient(to bottom, black 0%, black 48%, transparent 86%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 42%, rgba(0, 184, 169, 0.08) 48%, transparent 54%),
        linear-gradient(245deg, transparent 0 36%, rgba(109, 93, 252, 0.08) 43%, transparent 52%);
    mix-blend-mode: screen;
    z-index: -1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

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

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* 顶部导航栏 */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: linear-gradient(90deg, rgba(7, 10, 16, 0.94), rgba(15, 20, 31, 0.86));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.top-header::after {
    content: '';
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 249, 238, 0.65), rgba(109, 93, 252, 0.55), transparent);
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 8px 18px rgba(0, 184, 169, 0.18));
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
}

/* 主导航 */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.main-nav {
    display: flex;
    gap: 4px;
    background: rgba(18, 22, 32, 0.78);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 0 24px rgba(0,0,0,0.18);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-btn.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 10px 28px rgba(0, 184, 169, 0.22), 0 0 18px rgba(109, 93, 252, 0.2);
}

/* 右侧区域 */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.api-key-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.api-key-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px;
    transition: all 0.2s ease;
}

.api-key-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 45, 216, 0.2);
}

.api-key-input-group input {
    width: 210px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: 'SF Mono', Monaco, monospace;
}

.api-key-input-group input::placeholder {
    color: var(--text-muted);
}

.api-key-input-group input:focus {
    outline: none;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

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

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--error);
    transition: all 0.3s ease;
}

.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.connecting {
    background: var(--warning);
    animation: pulse 1s infinite;
}

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

.history-btn {
    position: relative;
}

.history-btn::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-btn.has-items::after {
    opacity: 1;
}

/* 主内容区 */
.main-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.main-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    scrollbar-gutter: stable;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

#account-section.active {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 112px);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 区块头部 */
.section-header {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.section-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 首页能量中枢 */
.account-hero {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    margin-bottom: 18px;
    background: #070a10;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
}

.account-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7,10,16,0.96) 0%, rgba(7,10,16,0.68) 42%, rgba(7,10,16,0.24) 100%),
        linear-gradient(180deg, rgba(7,10,16,0.12) 0%, rgba(7,10,16,0.88) 100%);
    z-index: 1;
}

.account-hero::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 90deg, transparent, rgba(0, 184, 169, 0.18), transparent, rgba(109, 93, 252, 0.16), transparent);
    animation: heroSweep 18s linear infinite;
    opacity: 0.65;
    z-index: 2;
}

.account-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('assets/ai-console-hero.png');
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.15) contrast(1.08);
}

.account-hero-content {
    position: relative;
    z-index: 3;
    min-height: 240px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #7df9ee;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    width: 42px;
    height: 2px;
    background: linear-gradient(90deg, #7df9ee, transparent);
    box-shadow: 0 0 18px rgba(125, 249, 238, 0.9);
}

.hero-copy h1 {
    margin: 0;
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: 0;
    color: #f8fbff;
    text-shadow: 0 0 24px rgba(0, 184, 169, 0.26), 0 8px 36px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
    max-width: 560px;
    margin-top: 14px;
    color: rgba(231, 238, 250, 0.78);
    font-size: 16px;
}

.reset-orb {
    justify-self: end;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(125, 249, 238, 0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(9, 16, 28, 0.62), rgba(9, 16, 28, 0.28));
    backdrop-filter: blur(14px);
    box-shadow: inset 0 0 28px rgba(125, 249, 238, 0.05), 0 20px 50px rgba(0,0,0,0.32);
}

.reset-ring {
    position: relative;
    width: 168px;
    aspect-ratio: 1;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
}

.reset-ring-fill {
    --reset-progress: 0deg;
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        conic-gradient(from -90deg, #7df9ee var(--reset-progress), rgba(255,255,255,0.09) 0),
        radial-gradient(circle, rgba(109, 93, 252, 0.28), transparent 62%);
    box-shadow: 0 0 46px rgba(0, 184, 169, 0.34);
}

.reset-ring-fill::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: rgba(5, 9, 16, 0.92);
    border: 1px solid rgba(255,255,255,0.08);
}

.reset-ring-core {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reset-ring-core span {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 0 22px rgba(125, 249, 238, 0.55);
}

.reset-ring-core small {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.reset-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.09);
    color: var(--text-secondary);
    font-size: 13px;
}

.reset-meta strong {
    color: #7df9ee;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    white-space: nowrap;
}

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

.section-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

/* 账户卡片网格 */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.account-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(21, 26, 36, 0.78), rgba(12, 16, 25, 0.88));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(125, 249, 238, 0.12), transparent 38%),
        linear-gradient(315deg, rgba(109, 93, 252, 0.12), transparent 42%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.account-card:hover {
    border-color: rgba(125, 249, 238, 0.34);
    transform: translateY(-3px);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34), 0 0 36px rgba(0, 184, 169, 0.1);
}

.account-card:hover::before {
    opacity: 1;
}

.account-card.balance-card {
    background:
        linear-gradient(135deg, rgba(109, 93, 252, 0.28) 0%, rgba(0, 184, 169, 0.14) 100%),
        linear-gradient(180deg, rgba(21, 26, 36, 0.78), rgba(12, 16, 25, 0.88));
    border-color: rgba(125, 249, 238, 0.3);
}

.card-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background:
        radial-gradient(circle at 35% 24%, rgba(255,255,255,0.72), transparent 14%),
        radial-gradient(circle at 70% 72%, rgba(125, 249, 238, 0.72), transparent 24%),
        linear-gradient(135deg, rgba(109, 93, 252, 0.96), rgba(0, 184, 169, 0.88));
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 16px;
    box-shadow: 0 0 28px rgba(0, 184, 169, 0.28), inset 0 0 18px rgba(255,255,255,0.08);
    transform: rotate(-8deg);
}

.card-icon::before,
.card-icon::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.card-icon::before {
    inset: 6px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 12px;
}

.card-icon::after {
    width: 24px;
    height: 2px;
    right: -10px;
    top: 14px;
    background: linear-gradient(90deg, rgba(125,249,238,0.9), transparent);
    box-shadow: 0 12px 0 rgba(109, 93, 252, 0.46), 0 0 16px rgba(125,249,238,0.8);
}

.card-icon svg {
    width: 25px;
    height: 25px;
    color: white;
    filter: drop-shadow(0 0 9px rgba(255,255,255,0.34));
    transform: rotate(8deg);
}

.card-content h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

#balanceAmount {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-unit {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-display {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
    min-height: 58px;
    font-size: 14px;
}

.info-display .placeholder {
    color: var(--text-muted);
}

.info-display p {
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.info-display .label {
    color: var(--text-muted);
    font-size: 12px;
}

.info-display .value {
    color: var(--text-primary);
    font-weight: 500;
}

.home-gallery {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(21, 26, 36, 0.72), rgba(7, 10, 16, 0.86)),
        radial-gradient(circle at 12% 0%, rgba(0, 184, 169, 0.14), transparent 32%);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
    backdrop-filter: blur(16px);
}

.gallery-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.gallery-header .eyebrow {
    margin-bottom: 8px;
}

.gallery-header h2 {
    font-size: 24px;
    line-height: 1.2;
}

.gallery-sections {
    display: grid;
    gap: 22px;
}

.gallery-section {
    min-width: 0;
}

.gallery-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.gallery-section-title h3 {
    font-size: 16px;
    color: var(--text-primary);
}

.gallery-section-title span {
    color: var(--text-muted);
    font-size: 12px;
}

.gallery-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
}

.gallery-grid-video,
.gallery-grid-audio {
    display: flex;
}

.gallery-thumb {
    flex: 0 0 150px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0;
    background: rgba(5, 9, 16, 0.74);
    cursor: zoom-in;
    box-shadow: 0 16px 36px rgba(0,0,0,0.28);
    scroll-snap-align: start;
}

.gallery-grid-video .gallery-thumb,
.gallery-grid-audio .gallery-thumb {
    flex-basis: 180px;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.gallery-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: rgba(5, 9, 16, 0.9);
    transition: transform 0.28s ease, filter 0.28s ease;
}

.gallery-thumb:hover img,
.gallery-thumb:hover video {
    transform: scale(1.06);
    filter: saturate(1.12) contrast(1.05);
}

.media-thumb {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px;
    text-align: left;
    cursor: pointer;
}

.media-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(125, 249, 238, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(109, 93, 252, 0.18), rgba(0, 184, 169, 0.08));
    pointer-events: none;
}

.media-thumb-icon {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.96), rgba(0, 184, 169, 0.88));
    box-shadow: 0 0 26px rgba(0, 184, 169, 0.28);
}

.media-thumb-icon svg {
    width: 22px;
    height: 22px;
}

.video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.94), rgba(0, 184, 169, 0.9));
    box-shadow: 0 0 28px rgba(0, 184, 169, 0.34);
}

.media-thumb strong,
.media-thumb small {
    position: relative;
    z-index: 1;
}

.media-thumb strong {
    color: #fff;
    font-size: 14px;
}

.media-thumb small {
    color: var(--text-secondary);
}

.gallery-thumb span {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(5, 9, 16, 0.72);
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.gallery-empty {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed rgba(125, 249, 238, 0.2);
    border-radius: 12px;
    background: rgba(5, 9, 16, 0.42);
}

.gallery-empty.compact {
    padding: 18px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 28%, rgba(0, 184, 169, 0.16), transparent 32%),
        rgba(2, 5, 10, 0.88);
    backdrop-filter: blur(18px);
}

.gallery-lightbox.hidden {
    display: none;
}

.gallery-lightbox-content {
    max-width: min(1080px, 92vw);
    max-height: 88vh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
}

.gallery-lightbox-media {
    display: grid;
    place-items: center;
    min-height: 180px;
}

.gallery-lightbox-media img,
.gallery-lightbox-media video {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 30px 90px rgba(0,0,0,0.62), 0 0 48px rgba(0, 184, 169, 0.18);
    background: #050914;
}

.audio-lightbox-player {
    width: min(640px, 86vw);
    padding: 34px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 184, 169, 0.22), transparent 42%),
        rgba(5, 9, 16, 0.88);
    box-shadow: 0 30px 90px rgba(0,0,0,0.46);
}

.audio-lightbox-player audio {
    width: 100%;
}

.gallery-lightbox-meta {
    max-width: 900px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(5, 9, 16, 0.76);
}

.gallery-lightbox-meta strong {
    color: #7df9ee;
}

.gallery-lightbox-meta p {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    max-height: 82px;
    overflow: auto;
}

.gallery-close {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 1201;
}

.home-footer {
    margin-top: 22px;
    margin-bottom: 0;
    padding: 22px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(5, 9, 16, 0.88), rgba(17, 24, 38, 0.72));
    color: var(--text-secondary);
}

.home-footer strong {
    color: var(--text-primary);
}

.home-footer p {
    margin-top: 6px;
    max-width: 720px;
    font-size: 13px;
}

.footer-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: right;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

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

.btn-glow {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 10px 24px rgba(0, 184, 169, 0.14);
}

.btn-glow:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

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

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 聊天布局 */
.chat-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 24px;
    height: calc(100vh - 92px);
    min-height: 760px;
}

.chat-sidebar {
    background: linear-gradient(180deg, rgba(21, 26, 36, 0.78), rgba(12, 16, 25, 0.9));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 28px;
}

.chat-actions {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.chat-main {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(21, 26, 36, 0.78), rgba(12, 16, 25, 0.9));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-width: 0;
    box-shadow: var(--shadow-sm);
}

/* 设置组 */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-group.small {
    flex: 1;
}

.settings-row {
    display: flex;
    gap: 12px;
}

.select-input,
.settings-group input[type="text"],
.settings-group input[type="number"],
.settings-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.select-input:focus,
.settings-group input:focus,
.settings-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 45, 216, 0.15);
}

.settings-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.select-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.select-input optgroup {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.select-input option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px;
}

/* 复选框 */
.checkbox-group {
    flex-direction: row !important;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 聊天消息区 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.welcome-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
}

.welcome-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.welcome-icon svg {
    width: 100%;
    height: 100%;
}

.welcome-message h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.welcome-message p {
    font-size: 14px;
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.message h1,
.message h2,
.message h3,
.message h4 {
    margin: 6px 0 8px;
    line-height: 1.35;
    color: var(--text-primary);
}

.message h1 { font-size: 22px; }
.message h2 { font-size: 19px; }
.message h3 { font-size: 17px; }
.message h4 { font-size: 15px; }

.message p {
    margin: 0 0 10px;
}

.message p:last-child,
.message ul:last-child,
.message pre:last-child {
    margin-bottom: 0;
}

.message ul {
    margin: 0 0 10px 18px;
    padding: 0;
}

.message li {
    margin: 4px 0;
}

.message a {
    color: #7df9ee;
    text-decoration: none;
    border-bottom: 1px solid rgba(125, 249, 238, 0.35);
}

.message a:hover {
    border-bottom-color: rgba(125, 249, 238, 0.9);
}

.message pre {
    white-space: pre;
}

.message.user {
    align-self: flex-end;
    background: var(--gradient-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: #192132;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

/* 聊天输入区 */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.input-container textarea {
    flex: 1;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    min-height: 52px;
    max-height: 150px;
    font-family: inherit;
}

.input-container textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.send-btn {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 14px;
}

/* 生成布局 */
.generation-layout {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.generation-panel {
    background: linear-gradient(180deg, rgba(21, 26, 36, 0.8), rgba(12, 16, 25, 0.92));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
    position: sticky;
    top: 92px;
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.05);
}

.generation-result {
    background: linear-gradient(180deg, rgba(21, 26, 36, 0.78), rgba(12, 16, 25, 0.9));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: min(680px, calc(100vh - 190px));
    display: flex;
    flex-direction: column;
}

.result-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 184, 169, 0.12), transparent 42%),
        linear-gradient(135deg, rgba(255,255,255,0.025), transparent 30%),
        var(--bg-input);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    min-height: 420px;
}

.result-container img,
.result-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.result-container audio {
    width: 100%;
    padding: 20px;
}

.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    text-align: center;
    padding: 32px;
}

.result-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
}

.result-placeholder p {
    font-size: 14px;
}

/* 音频标签页 */
.audio-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(18, 22, 32, 0.72);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px;
    border-radius: 999px;
    width: fit-content;
}

.audio-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-tab svg {
    width: 18px;
    height: 18px;
}

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

.audio-tab.active {
    color: white;
    background: var(--gradient-primary);
}

.audio-panel {
    display: none;
}

.audio-panel.active {
    display: block;
}

/* 文件上传 */
.file-upload {
    position: relative;
}

.file-upload input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    background: var(--bg-input);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s ease;
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary);
    color: var(--text-secondary);
}

.file-upload-label svg {
    width: 32px;
    height: 32px;
}

/* 历史侧边栏 */
.history-sidebar {
    width: 0;
    background: rgba(18, 22, 32, 0.96);
    backdrop-filter: blur(18px);
    border-left: 1px solid rgba(125, 249, 238, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s ease;
}

.history-sidebar.open {
    width: 340px;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.history-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.history-scope-label {
    color: rgba(231, 238, 250, 0.62);
    font-size: 12px;
    margin-top: 2px;
}

.history-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(5, 9, 16, 0.42);
}

.history-tab {
    min-height: 34px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    background: rgba(9, 14, 24, 0.68);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.history-tab:hover,
.history-tab.active {
    color: #fff;
    border-color: rgba(125, 249, 238, 0.34);
    background: linear-gradient(135deg, rgba(109, 93, 252, 0.38), rgba(0, 184, 169, 0.22));
    box-shadow: 0 0 18px rgba(0, 184, 169, 0.12);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
}

.history-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.history-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--border-color);
    transform: translateX(4px);
}

.history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.history-item-type {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.history-item-type svg {
    width: 14px;
    height: 14px;
}

.history-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.history-item-preview {
    width: 100%;
    height: 80px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.history-item-preview.audio-preview {
    background: var(--gradient-primary);
}

.history-item-preview.audio-preview svg {
    width: 32px;
    height: 32px;
    color: white;
}

.history-item-preview.text-preview {
    padding: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.history-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.history-item-actions button {
    flex: 1;
    padding: 6px;
    font-size: 11px;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.hidden {
    display: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Toast通知 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    z-index: 1001;
    animation: slideIn 0.3s ease;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.toast.hidden {
    display: none;
}

.toast.success {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, var(--bg-card) 100%);
}

.toast.error {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--bg-card) 100%);
}

.toast.warning {
    border-color: var(--warning);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, var(--bg-card) 100%);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .generation-layout {
        grid-template-columns: 1fr;
    }

    .generation-panel {
        position: static;
    }
    
    .generation-result {
        min-height: 400px;
    }
}

@media (max-width: 900px) {
    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .chat-sidebar {
        order: 2;
    }
    
    .chat-main {
        height: 500px;
    }
    
    .top-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
    }
    
    .main-nav {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .api-key-input-group input {
        width: 150px;
    }
}

@media (max-width: 600px) {
    .top-header {
        padding: 12px 14px;
    }

    .main-content {
        padding: 16px;
    }

    #account-section.active {
        min-height: calc(100vh - 142px);
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
    }

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

    .gallery-grid {
        display: flex;
    }

    .gallery-grid-video,
    .gallery-grid-audio {
        display: flex;
    }

    .gallery-thumb {
        flex-basis: 145px;
    }

    .gallery-grid-video .gallery-thumb,
    .gallery-grid-audio .gallery-thumb {
        flex-basis: 165px;
    }

    .gallery-lightbox {
        padding: 16px;
    }

    .home-footer {
        flex-direction: column;
    }

    .footer-meta {
        align-items: flex-start;
        text-align: left;
    }
    
    .audio-tabs {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .audio-tab {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .settings-row {
        flex-direction: column;
    }

    .api-key-wrapper,
    .api-key-input-group,
    .api-key-input-group input {
        width: 100%;
    }

    .header-right {
        width: 100%;
    }

    .history-btn {
        flex: 0 0 36px;
    }

    .result-container {
        min-height: 300px;
    }
    
    .history-sidebar.open {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 200;
        width: min(100vw, 360px);
    }
}

/* 付费模型标记 */
.paid-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
}

/* 代码块 */
.message pre {
    background: var(--bg-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 8px 0;
}

.message code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
}

/* 打字指示器 */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* 提示词优化模块 */
.prompt-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
}

.prompt-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.prompt-result {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

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

.result-header h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.prompt-output {
    flex: 1;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 20px;
    min-height: 200px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt-output .result-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.negative-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.negative-section h4 {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.prompt-negative {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 14px;
    color: var(--error);
    line-height: 1.6;
}

.prompt-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.prompt-actions .btn {
    flex: 1;
}

/* OSS上传状态 */
.oss-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 12px;
}

.oss-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.oss-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.oss-link {
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.oss-link:hover {
    text-decoration: underline;
}

/* 响应式 - 提示词模块 */
@media (max-width: 900px) {
    .prompt-layout {
        grid-template-columns: 1fr;
    }
}

/* 提示词优化按钮 */
.btn-optimize {
    margin-top: 8px;
    padding: 8px 16px;
    font-size: 12px;
    width: 100%;
}

.btn-optimize svg {
    width: 14px;
    height: 14px;
}

.btn-optimize.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-optimize.loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

/* 任务队列样式 */
.task-queue-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.task-queue-container.minimized {
    max-height: 48px;
}

.task-queue-container.minimized .queue-body {
    display: none;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.queue-header:hover {
    opacity: 0.95;
}

.queue-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-toggle-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.task-queue-container.minimized .queue-toggle-btn {
    transform: rotate(180deg);
}

.queue-count {
    font-size: 12px;
    opacity: 0.9;
}

.queue-body {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-tertiary);
}

.queue-body::-webkit-scrollbar {
    width: 6px;
}

.queue-body::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.queue-body::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.queue-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}

.queue-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.queue-item:hover {
    background: var(--bg-hover);
}

.queue-item.running {
    background: rgba(139, 92, 246, 0.1);
}

.queue-item.completed {
    opacity: 0.6;
}

.queue-item.failed {
    background: rgba(239, 68, 68, 0.1);
}

.queue-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.queue-item-type {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
}

.queue-item-prompt {
    font-size: 11px;
    color: var(--text-muted);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.status-badge.running {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent);
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

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

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.btn-cancel {
    font-size: 10px;
    padding: 2px 6px;
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--error);
    color: white;
}

.progress-bar {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 结果区域等待提示 */
.result-placeholder .hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

/* 全站科技质感增强 */
.top-header,
.account-card,
.chat-sidebar,
.chat-main,
.generation-panel,
.generation-result,
.prompt-panel,
.prompt-result,
.history-sidebar,
.task-queue-container,
.toast {
    backdrop-filter: blur(18px);
}

.chat-sidebar,
.chat-main,
.generation-panel,
.generation-result,
.prompt-panel,
.prompt-result {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.05);
}

.chat-sidebar::before,
.chat-main::before,
.generation-panel::before,
.generation-result::before,
.prompt-panel::before,
.prompt-result::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(125, 249, 238, 0.08), transparent 34%),
        linear-gradient(315deg, rgba(109, 93, 252, 0.08), transparent 38%);
    opacity: 0.9;
}

.chat-sidebar > *,
.chat-main > *,
.generation-panel > *,
.generation-result > *,
.prompt-panel > *,
.prompt-result > * {
    position: relative;
    z-index: 1;
}

.section-header {
    padding: 18px 0 2px;
}

.section-title {
    text-shadow: 0 0 22px rgba(0, 184, 169, 0.18);
}

.section-desc {
    max-width: 760px;
}

.btn {
    min-height: 42px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
}

.btn-glow:hover::before {
    transform: translateX(120%);
}

.btn-glow > *,
.btn-glow {
    position: relative;
}

.btn-glow::before {
    z-index: 0;
}

.btn-glow svg {
    position: relative;
    z-index: 1;
}

.btn-outline {
    background: rgba(9, 14, 24, 0.68);
}

.icon-btn:hover,
.btn-outline:hover {
    box-shadow: 0 0 24px rgba(125, 249, 238, 0.12);
}

.api-key-input-group,
.select-input,
.settings-group input[type="text"],
.settings-group input[type="number"],
.settings-group textarea,
.input-container textarea,
.prompt-output,
.info-display {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
        rgba(5, 9, 16, 0.78);
    border-color: rgba(125, 249, 238, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.api-key-input-group:focus-within,
.select-input:focus,
.settings-group input:focus,
.settings-group textarea:focus,
.input-container textarea:focus {
    border-color: rgba(125, 249, 238, 0.56);
    box-shadow: 0 0 0 3px rgba(0, 184, 169, 0.12), 0 0 26px rgba(109, 93, 252, 0.1);
}

.result-container,
.prompt-output {
    position: relative;
}

.result-container::before,
.prompt-output::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(125, 249, 238, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 249, 238, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}

.result-placeholder {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.result-placeholder svg,
.welcome-icon svg,
.history-empty svg {
    filter: drop-shadow(0 0 16px rgba(125, 249, 238, 0.22));
}

.welcome-message {
    min-height: 320px;
    background:
        radial-gradient(circle at 50% 35%, rgba(0, 184, 169, 0.12), transparent 34%),
        radial-gradient(circle at 50% 55%, rgba(109, 93, 252, 0.1), transparent 42%);
}

.message {
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.message.user {
    box-shadow: 0 16px 34px rgba(0, 184, 169, 0.16);
}

.message.assistant {
    background:
        linear-gradient(180deg, rgba(29, 40, 61, 0.88), rgba(17, 24, 38, 0.92));
}

.chat-input-area {
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.52), rgba(7, 10, 16, 0.86));
}

.file-upload-label {
    background:
        linear-gradient(180deg, rgba(5, 9, 16, 0.62), rgba(5, 9, 16, 0.82)),
        repeating-linear-gradient(135deg, rgba(125, 249, 238, 0.08) 0 1px, transparent 1px 10px);
}

.file-upload:hover .file-upload-label {
    box-shadow: inset 0 0 30px rgba(0, 184, 169, 0.08), 0 0 26px rgba(0, 184, 169, 0.08);
}

.history-sidebar {
    box-shadow: -28px 0 80px rgba(0, 0, 0, 0.38);
}

.history-header,
.queue-header {
    background:
        linear-gradient(90deg, rgba(109, 93, 252, 0.88), rgba(0, 184, 169, 0.82)),
        rgba(10, 14, 22, 0.9);
}

.history-item {
    background:
        linear-gradient(180deg, rgba(21, 26, 36, 0.82), rgba(10, 14, 22, 0.92));
    border-color: rgba(255,255,255,0.08);
}

.history-item:hover {
    border-color: rgba(125, 249, 238, 0.35);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

.task-queue-container {
    background:
        linear-gradient(180deg, rgba(21, 26, 36, 0.92), rgba(7, 10, 16, 0.96));
}

.queue-item.running {
    background: linear-gradient(90deg, rgba(109, 93, 252, 0.16), rgba(0, 184, 169, 0.08));
}

.progress-bar {
    background: rgba(255,255,255,0.08);
}

.progress-fill {
    box-shadow: 0 0 16px rgba(125, 249, 238, 0.58);
}

.loading-overlay {
    background:
        radial-gradient(circle at 50% 38%, rgba(0, 184, 169, 0.12), transparent 34%),
        rgba(5, 9, 16, 0.9);
}

.loading-spinner,
.spinner {
    border-top-color: #7df9ee;
    box-shadow: 0 0 30px rgba(125, 249, 238, 0.2);
}

.paid-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.18);
}

.oss-status {
    background: rgba(5, 9, 16, 0.72);
    border: 1px solid rgba(255,255,255,0.08);
}

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

@media (max-width: 900px) {
    .account-hero {
        min-height: auto;
    }

    .account-hero-content {
        min-height: auto;
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .hero-copy h1 {
        font-size: 42px;
        line-height: 1.05;
    }

    .reset-orb {
        justify-self: stretch;
        max-width: 420px;
    }

    .reset-ring-core span {
        font-size: 38px;
    }
}

@media (max-width: 600px) {
    .account-hero {
        border-radius: 14px;
    }

    .account-hero::before {
        background:
            linear-gradient(180deg, rgba(7,10,16,0.9) 0%, rgba(7,10,16,0.76) 48%, rgba(7,10,16,0.94) 100%);
    }

    .account-hero-content {
        padding: 22px;
        gap: 22px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .eyebrow::before {
        width: 28px;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .hero-copy p {
        font-size: 14px;
    }

    .reset-orb {
        padding: 14px;
    }

    .reset-ring {
        width: min(180px, 70vw);
    }

    .reset-ring-core span {
        font-size: 32px;
    }

    .reset-meta {
        flex-direction: column;
    }

    .generation-panel,
    .generation-result,
    .prompt-panel,
    .prompt-result,
    .chat-sidebar,
    .chat-main {
        border-radius: 12px;
        padding: 18px;
    }

    .chat-main {
        padding: 0;
    }
}

/* 响应式 - 任务队列 */
@media (max-width: 768px) {
    .task-queue-container {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}
