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

:root {
    /* Higgsfield 风格配色 */
    --bg-primary: #0A0A0A;
    --bg-elevated: #141414;
    --bg-input: #1a1a1a;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-tertiary: #6B7280;
    --accent-purple: #8B5CF6;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
    --accent-orange: #F59E0B;
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 页面切换 */
.page-content {
    min-height: 100vh;
}

/* 顶部导航 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 32px;
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-cta {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

/* Hero 区 */
.hero {
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px 120px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #FFFFFF 0%, #A1A1AA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 48px;
}

.hero-cta {
    padding: 16px 32px;
    font-size: 16px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.5);
}

/* 工作区网格 */
.workspaces {
    padding: 0 32px 120px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.workspace-card {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.workspace-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.workspace-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

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

.workspace-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.workspace-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.workspace-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.workspace-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.workspace-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 演示画廊 */
.gallery {
    padding: 120px 32px;
    background: var(--bg-elevated);
}

.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-placeholder {
    font-size: 48px;
    opacity: 0.3;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

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

/* 页脚 */
.footer {
    padding: 80px 32px 40px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 13px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* ==================== 登录模态框 ==================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.auth-modal-content {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 40px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.auth-modal-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.auth-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #1f1f1f;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.google-signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

/* ==================== 对话消息样式 ==================== */

.message {
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
    max-width: 800px;
}

.message-user {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    margin-left: auto;
}

.message-assistant {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

.message-content {
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.message-user .message-content {
    color: var(--text-primary);
}

.message-assistant .message-content {
    color: var(--text-secondary);
}

/* 加载状态 */
.loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: loadingBounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* ==================== 定价页面样式 ==================== */

.pricing-hero {
    margin-top: 64px;
    padding: 120px 32px 80px;
    text-align: center;
}

.pricing-hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #A1A1AA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.billing-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.billing-option {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.billing-option:hover {
    color: var(--text-primary);
}

.billing-option.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.save-badge {
    margin-left: 8px;
    padding: 2px 6px;
    background: var(--accent-green);
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

/* 价格卡片 */
.pricing-cards {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px 120px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.price-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 40px 32px;
    position: relative;
    transition: all 0.3s;
}

.price-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-purple);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.price-card.featured {
    border-color: var(--accent-purple);
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, var(--bg-elevated) 100%);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.plan-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.plan-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 48px;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.price-currency {
    font-size: 24px;
    color: var(--text-secondary);
}

.price-period {
    font-size: 16px;
    color: var(--text-tertiary);
}

.price-intro {
    font-size: 13px;
    color: var(--accent-green);
    margin-bottom: 24px;
}

.price-strike {
    font-size: 16px;
    color: var(--text-tertiary);
    text-decoration: line-through;
    margin-bottom: 24px;
}

.credits-info {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 32px;
}

.credits-amount {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.plan-cta {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 32px;
}

.plan-cta-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
}

.plan-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.4);
}

.plan-cta-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

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

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.check-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

/* FAQ */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px 120px;
}

.faq-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
}

.faq-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.faq-answer {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== 模型库页面样式 ==================== */

.content {
    margin-top: 64px;
    padding: 80px 32px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.page-header {
    margin-bottom: 48px;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* 筛选器 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.filter-btn.active {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent-purple);
    color: var(--text-primary);
}

.filter-count {
    margin-left: 8px;
    color: var(--text-tertiary);
}

/* 模型网格 */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
}

.model-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.model-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.model-item:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.model-item:hover::before {
    opacity: 1;
}

.model-item .model-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.model-logo-large {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    font-weight: 600;
}

.model-info {
    flex: 1;
}

.model-badges {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-live {
    background: var(--accent-green);
    color: white;
}

.badge-preview {
    background: var(--accent-orange);
    color: white;
}

.badge-kind {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.model-name-large {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.model-provider {
    font-size: 13px;
    color: var(--text-tertiary);
}

.model-item .model-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.model-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.feature-tag {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.model-item .model-meta {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

/* ==================== 工作台页面样式 ==================== */

/* 布局 */
.app-layout {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    grid-template-rows: 64px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* 顶部导航 */
.topbar {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
}

.topbar-tabs {
    display: flex;
    gap: 4px;
}

.topbar-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.topbar-tab.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    cursor: pointer;
}

/* 左侧栏 - 任务类型 */
.sidebar {
    border-right: 1px solid var(--border-subtle);
    padding: 24px 16px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 12px;
    padding: 0 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 主区域 - 对话 */
.main-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-primary);
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

/* 空态 */
.empty-state {
    max-width: 600px;
    margin: 120px auto 0;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.empty-state h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.quick-prompts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 40px;
}

.quick-prompt {
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-prompt:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.quick-prompt-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.quick-prompt-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 输入区 */
.input-area {
    padding: 24px 40px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.input-box {
    width: 100%;
    min-height: 56px;
    padding: 16px 120px 16px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    transition: all 0.2s;
}

.input-box:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-box::placeholder {
    color: var(--text-tertiary);
}

.input-actions {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    gap: 8px;
}

.input-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.input-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.send-btn {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: white;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* 右侧栏 - 模型选择器 */
.right-panel {
    border-left: 1px solid var(--border-subtle);
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.panel-section {
    margin-bottom: 32px;
}

.panel-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}

.model-card {
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.model-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

.model-card.selected {
    border-color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

.model-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.model-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.model-name {
    font-size: 14px;
    font-weight: 600;
}

.model-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--accent-green);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.model-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.model-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 响应式 */
@media (max-width: 1200px) {
    .workspace-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar,
    .right-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        padding: 60px 16px 80px;
    }

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

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

    .topbar-tabs {
        display: none;
    }

    .chat-container {
        padding: 20px;
    }

    .input-area {
        padding: 16px;
    }
}

/* 用户菜单样式 */
.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    border-color: var(--border-strong);
    background: var(--bg-input);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-icon {
    transition: transform 0.2s;
}

.user-menu-trigger[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1000;
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-credits {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid var(--border-subtle);
}

.credits-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.user-credits strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-purple);
}

.credits-upgrade {
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.credits-upgrade:hover {
    transform: scale(1.05);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-dropdown-item svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* 账户页面样式 */
.account-sections {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.account-section {
    margin-bottom: 40px;
}

.account-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.account-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 24px;
}

/* Profile Section */
.profile-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info small {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-details {
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Credits & Billing */
.credits-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 20px;
}

.credits-display {
    display: flex;
    flex-direction: column;
}

.credits-display .credits-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.credits-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-purple);
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.billing-details {
    padding-top: 20px;
}

/* Usage Statistics */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Legal Links */
.legal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.legal-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-strong);
}

.legal-link svg {
    flex-shrink: 0;
    color: var(--text-secondary);
}

.legal-link div {
    flex: 1;
}

.legal-link strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.legal-link small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Danger Zone */
.danger-zone {
    border-color: rgba(239, 68, 68, 0.2);
}

.danger-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.danger-action:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.danger-action:first-child {
    padding-top: 0;
}

.danger-action strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.danger-action small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-secondary {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #EF4444;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* 消息样式 */
.message {
    display: flex;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    font-size: 18px;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.message-user .message-avatar {
    background: var(--accent-purple);
}

.message-assistant .message-avatar {
    background: var(--bg-elevated);
}

.message-content {
    flex: 1;
    min-width: 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.message-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.message-content em {
    font-style: italic;
    color: var(--text-secondary);
}

.message-content code {
    padding: 2px 6px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid var(--border-subtle);
}

.thinking-indicator {
    display: flex;
    gap: 6px;
    padding: 8px 0;
}

.thinking-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-purple);
    animation: thinkingBounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes thinkingBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.message-streaming .message-content::after {
    content: '▋';
    animation: blink 1s infinite;
    margin-left: 2px;
    color: var(--accent-purple);
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* 参考图片预览 */
.reference-images-preview {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
}

.reference-image-item {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

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

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

.reference-image-remove:hover {
    background: rgba(239, 68, 68, 0.9);
}
