/* ========================================
   AI Designer - AI智能创作平台
   深邃科技感 + 温暖渐变
   ======================================== */

/* CSS Variables */
:root {
    /* 色彩系统 - 温暖渐变 + 深邃科技 */
    --primary: #FF6B4A;
    --primary-light: #FF9F6B;
    --primary-dark: #E55535;
    --accent: #4AF4C5;
    --accent-secondary: #6B8AFF;
    
    /* 背景色系 */
    --bg-primary: #0A0A0F;
    --bg-secondary: #12121A;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(18, 18, 26, 0.8);
    
    /* 文字色系 */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-inverse: #0A0A0F;
    
    /* 边框与分割线 */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(255, 107, 74, 0.3);
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-light));
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    
    /* 间距 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 5rem;
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* 字体 */
    --font-display: 'Outfit', 'Noto Sans SC', sans-serif;
    --font-body: 'Noto Sans SC', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s var(--ease-out);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   动态背景效果
   ======================================== */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    top: 40%;
    left: 30%;
    animation-delay: -14s;
    opacity: 0.2;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    mix-blend-mode: overlay;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all 0.3s var(--ease-out);
    background: transparent;
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon img,
.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.logo-icon img {
    filter: drop-shadow(0 8px 18px rgba(255, 107, 74, 0.24));
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s var(--ease-out);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.notice-trigger {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), background 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.notice-trigger:hover {
    color: var(--text-primary);
    border-color: rgba(255, 159, 107, 0.4);
    background: rgba(255, 107, 74, 0.1);
    transform: translateY(-1px);
}

.notice-trigger svg {
    width: 18px;
    height: 18px;
}

.notice-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 244, 197, 0.16);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 32px;
    padding: 0 0.5rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    transition: color 0.2s;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.user-trigger:hover,
.user-trigger[aria-expanded="true"] {
    background: transparent;
    color: var(--text-primary);
}

.user-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.avatar {
    position: relative;
}

.user-avatar.is-vip::after,
.mobile-user-avatar.is-vip::after,
.avatar.is-vip::after {
    content: 'VIP';
    position: absolute;
    right: -0.38rem;
    bottom: -0.22rem;
    min-width: 1.55rem;
    padding: 0.06rem 0.24rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    color: #1F1300;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.02em;
    text-align: center;
    border: 1px solid rgba(31, 19, 0, 0.18);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
    pointer-events: none;
    z-index: 2;
}

.user-avatar span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-inverse);
}

.user-trigger:hover .user-avatar,
.user-trigger[aria-expanded="true"] .user-avatar {
    transform: scale(1.05);
}

.user-nav-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-trigger-chevron {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    color: rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
    transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.user-trigger[aria-expanded="true"] .user-trigger-chevron {
    transform: rotate(180deg);
    color: var(--text-primary);
}

.user-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: rgba(18, 18, 26, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.625rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
    z-index: 1000;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0.75rem 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    border-radius: 14px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.user-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.user-menu-item.logout:hover {
    color: var(--primary);
}

.user-menu-quota {
    display: block;
    margin: 0.25rem 0.125rem 0.5rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(72, 232, 196, 0.24);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(72, 232, 196, 0.11), rgba(255, 127, 87, 0.08)),
        rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.user-menu-quota:hover {
    border-color: rgba(72, 232, 196, 0.46);
    background:
        linear-gradient(135deg, rgba(72, 232, 196, 0.16), rgba(255, 127, 87, 0.1)),
        rgba(255, 255, 255, 0.055);
    transform: translateY(-1px);
}

.user-menu-quota.is-low {
    border-color: rgba(255, 107, 107, 0.32);
    background:
        linear-gradient(135deg, rgba(255, 107, 107, 0.13), rgba(255, 159, 107, 0.08)),
        rgba(255, 255, 255, 0.035);
}

.user-menu-quota-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.user-menu-quota-head span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
}

.user-menu-quota-head strong {
    color: #48e8c4;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}

.user-menu-quota.is-low .user-menu-quota-head strong {
    color: #ff8f7d;
}

.user-menu-quota-meta {
    margin-top: 0.42rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
}

.user-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.375rem 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s var(--ease-out);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 100px var(--space-xl) var(--space-xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.mobile-nav-link {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s var(--ease-out);
}

.mobile-nav-link:hover {
    color: var(--text-primary);
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* 移动端用户信息 */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
}

.mobile-user-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

/* ========================================
   按钮组件
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}

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

.btn-ghost {
    color: var(--text-secondary);
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 107, 74, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 74, 0.4);
}

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

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

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

.btn-white {
    background: var(--text-primary);
    color: var(--text-inverse);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-full {
    width: 100%;
}

/* ========================================
   Hero 区域
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px var(--space-xl) var(--space-3xl);
    z-index: 1;
}

.hero .container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s var(--ease-out);
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    justify-content: center;
    animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
    flex-wrap: wrap;
}

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

.stat-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

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

/* ========================================
   通用 Section 样式
   ======================================== */
section {
    position: relative;
    z-index: 1;
    padding: var(--space-3xl) var(--space-xl);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: var(--space-lg);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

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

/* ========================================
   功能特性
   ======================================== */
.features {
    padding-top: var(--space-3xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.4s var(--ease-out);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-5px);
}



.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--text-inverse);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}



/* ========================================
   工具中心
   ======================================== */
.tools {
    padding-top: var(--space-3xl);
}

.tools-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
}

.tool-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.tool-card.is-disabled {
    cursor: not-allowed;
}

.tool-card.is-disabled:hover {
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-4px);
    box-shadow: none;
}

.tool-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    padding: var(--space-xs) var(--space-md);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    z-index: 10;
}

.tool-badge.hot {
    background: linear-gradient(135deg, #FF6B6B, #FF8E6B);
}

.tool-badge.beta {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
}

.tool-badge.coming-soon {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
}

.tool-visual {
    position: relative;
    height: 160px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.tool-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}

.tool-card:hover .tool-glow {
    opacity: 1;
}

/* PPT Preview */
.ppt-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
}

.slide-mockup {
    width: 200px;
    height: 140px;
    background: #1a1a2e;
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.4s var(--ease-out);
}

.tool-card:hover .slide-mockup {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.slide-header {
    height: 24px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.slide-content {
    padding: var(--space-xs);
}

.mock-title {
    height: 8px;
    width: 80%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 6px;
}

.mock-text {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    margin-bottom: 4px;
}

.mock-text.short {
    width: 60%;
}

.slide-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: var(--space-sm);
}

.slide-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.slide-dots span.active {
    background: var(--primary);
    width: 16px;
    border-radius: 3px;
}

/* Image Preview */
.image-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    width: 200px;
}

.grid-item {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--bg-secondary), var(--border));
    border-radius: var(--radius-sm);
    animation: gridPulse 3s ease-in-out infinite;
}

.grid-item:nth-child(2) { animation-delay: 0.2s; }
.grid-item:nth-child(3) { animation-delay: 0.4s; }
.grid-item:nth-child(4) { animation-delay: 0.6s; }

@keyframes gridPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.image-prompt {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

.prompt-icon {
    font-size: 1rem;
}

/* Video Preview */
.video-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-mockup {
    position: relative;
    width: 220px;
}

.video-player {
    background: #1a1a2e;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.play-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin: 40px auto 20px;
}

.play-btn svg {
    width: 24px;
    height: 24px;
    color: var(--text-inverse);
    margin-left: 4px;
}

.video-timeline {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    margin: var(--space-md);
    border-radius: var(--radius-full);
}

.timeline-progress {
    width: 40%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: timeline 4s linear infinite;
}

@keyframes timeline {
    0% { width: 0%; }
    100% { width: 100%; }
}

.video-effect {
    position: absolute;
    inset: -20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    opacity: 0;
    animation: videoScan 3s ease-in-out infinite;
}

@keyframes videoScan {
    0%, 100% { opacity: 0; transform: scale(0.9); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* Tool Info */
.tool-info {
    padding: var(--space-xl);
}

.tool-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.tool-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-inverse);
}

.tool-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.tool-info > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.tool-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.tool-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.tool-features svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ========================================
   定价方案
   ======================================== */
.pricing {
    padding-top: calc(var(--space-3xl) + 80px);
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.toggle-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.3s var(--ease-out);
}

.toggle-label.active {
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--border);
    border-radius: var(--radius-full);
    transition: background 0.3s var(--ease-out);
}

.toggle-switch.active {
    background: var(--gradient-primary);
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: transform 0.3s var(--ease-spring);
}

.toggle-switch.active .toggle-knob {
    transform: translateX(28px);
}

.save-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(74, 244, 197, 0.2);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    transition: all 0.4s var(--ease-out);
}

.pricing-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.pricing-card.featured {
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.1), rgba(255, 159, 107, 0.05));
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-lg);
    background: var(--gradient-primary);
    color: var(--text-inverse);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.plan-header {
    text-align: center;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-xl);
}

.plan-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.amount {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
}

.plan-desc {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pricing-card .plan-features {
    margin-bottom: var(--space-xl);
}

.pricing-card .plan-features li {
    padding: var(--space-sm) 0;
}

.pricing-card .plan-features li.disabled {
    opacity: 0.4;
}

.pricing-card .plan-features li.disabled svg {
    color: var(--text-muted);
}

/* ========================================
   CTA 区域
   ======================================== */
.cta {
    position: relative;
    padding: var(--space-3xl) var(--space-xl);
    margin-top: var(--space-3xl);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.cta-actions {
    display: flex;
    justify-content: center;
}

.cta-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.deco-circle {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.deco-circle:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -100px;
}

.deco-circle:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -50px;
}

.deco-circle:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
}

/* ========================================
   关于我们
   ======================================== */
.about {
    padding: var(--space-3xl) var(--space-xl);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about h2 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.about p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.about-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
}

.about-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.about-link:hover {
    color: var(--primary);
}

.about-link svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    position: relative;
    z-index: 1;
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border);
}

.footer-brand p {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.footer-column a {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: var(--space-xs) 0;
    transition: color 0.3s var(--ease-out);
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all 0.3s var(--ease-out);
}

.social-links a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.social-links svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .feature-card.feature-main {
        grid-column: span 1;
        grid-row: span 1;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 3rem;
    }

    .nav-links,
    .nav-actions .btn,
    .nav-actions .user-dropdown {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        gap: var(--space-sm);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .stat-divider {
        display: none;
    }

    .features {
        padding-top: var(--space-xl);
    }

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

    .tools {
        padding-top: var(--space-md);
    }

    .tools-showcase {
        grid-template-columns: 1fr;
    }

    .cta {
        margin-top: var(--space-xl);
    }

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

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }

    .about-links {
        flex-direction: column;
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-visual {
        display: none;
    }

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

/* ========================================
   滚动条美化
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* ========================================
   焦点样式
   ======================================== */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ========================================
   选中样式
   ======================================== */
::selection {
    background: var(--primary);
    color: var(--text-inverse);
}

/* ========================================
   模态框样式
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.notice-modal-overlay {
    z-index: 30000;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px) saturate(0.75);
    -webkit-backdrop-filter: blur(14px) saturate(0.75);
    isolation: isolate;
    transition: visibility 0s linear 0.18s;
}

.notice-modal-overlay.active {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s var(--ease-spring);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-lg {
    max-width: 600px;
}

.notice-modal {
    max-width: 680px;
    padding: 2.25rem 2.5rem 2rem;
    border-color: rgba(255, 159, 107, 0.18);
    background: linear-gradient(180deg, #12121a, #0a0a0f);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48), 0 0 42px rgba(255, 107, 74, 0.12);
    isolation: isolate;
    z-index: 1;
}

.notice-modal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.notice-modal-title {
    margin: 0 2rem 1.1rem 0;
    font-size: 1.65rem;
    line-height: 1.25;
    text-align: left;
}

.notice-modal-body {
    margin-bottom: 1.7rem;
    color: var(--text-secondary);
    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1.78;
    overflow-wrap: anywhere;
}

.notice-modal-body > *:first-child {
    margin-top: 0;
}

.notice-modal-body > *:last-child {
    margin-bottom: 0;
}

.notice-modal-body p {
    margin: 0 0 0.95rem;
}

.notice-modal-body h3,
.notice-modal-body h4,
.notice-modal-body h5 {
    margin: 1.15rem 0 0.55rem;
    color: var(--text-primary);
    line-height: 1.35;
    font-weight: 700;
}

.notice-modal-body h3 {
    font-size: 1.08rem;
}

.notice-modal-body h4,
.notice-modal-body h5 {
    font-size: 0.98rem;
}

.notice-modal-body a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 159, 107, 0.45);
}

.notice-modal-body a:hover {
    color: var(--primary);
    border-bottom-color: currentColor;
}

.notice-modal-body img {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    margin: 0.75rem 0 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.notice-modal-body p > a:only-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.62rem 1rem;
    border: 1px solid rgba(255, 159, 107, 0.38);
    border-radius: var(--radius-md);
    background: rgba(255, 107, 74, 0.11);
    color: var(--primary-light);
    box-shadow: 0 10px 28px rgba(255, 107, 74, 0.1);
}

.notice-modal-body p > a:only-child:hover {
    background: rgba(255, 107, 74, 0.16);
}

.notice-modal-body ul,
.notice-modal-body ol {
    margin: 0.25rem 0 0.95rem;
    padding-left: 1.25rem;
}

.notice-modal-body li {
    margin: 0.25rem 0;
}

.notice-modal-body blockquote {
    margin: 0.8rem 0 1rem;
    padding: 0.75rem 0.9rem;
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    background: rgba(255, 159, 107, 0.08);
    color: var(--text-primary);
}

.notice-modal-body code {
    padding: 0.08rem 0.28rem;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.92em;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-tab:hover {
    background: var(--bg-card);
}

.modal-tab.active {
    background: var(--primary);
    color: var(--text-inverse);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

.form-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.verification-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 0.5rem;
    align-items: stretch;
}

.verification-row input {
    min-width: 0;
}

.verification-send-btn {
    min-height: 48px;
    padding: 0 0.75rem;
    border: 1px solid rgba(255, 107, 74, 0.32);
    border-radius: var(--radius-md);
    background: rgba(255, 107, 74, 0.1);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}

.verification-send-btn:hover:not(:disabled) {
    background: rgba(255, 107, 74, 0.16);
    border-color: rgba(255, 159, 107, 0.48);
    color: var(--text-primary);
}

.verification-send-btn:disabled,
.btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

/* 工具卡片内的CTA按钮 - 更现代的样式 */
.tool-info .btn-primary {
    position: relative;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.tool-info .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.tool-info .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.tool-info .btn-primary:hover::before {
    left: 100%;
}

.tool-info .btn-primary:active {
    transform: translateY(0);
}

.tool-info .btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.tool-info .btn-primary:hover svg {
    transform: translateX(4px);
}

/* 用户信息模态框 */
.user-info {
    text-align: center;
    padding: 1rem 0;
}

.user-info .user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-inverse);
    margin: 0 auto 1rem;
}

.user-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.user-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-role {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.75rem;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.user-role.role-vip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.user-role.role-admin {
    background: var(--accent);
    color: #000;
}

.quota-info {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

.quota-info h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.quota-item {
    margin-bottom: 0.75rem;
}

.quota-label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.quota-bar {
    height: 6px;
    background: var(--bg-primary);
    border-radius: 3px;
    overflow: hidden;
}

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

.quota-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-align: right;
}

/* 创作模态框 */
.create-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.create-options {
    margin: 0.5rem 0;
}

.create-result {
    text-align: center;
}

.create-result h4 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.result-content {
    margin-bottom: 1.5rem;
}

.result-content img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.result-content pre {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    text-align: left;
    font-size: 0.875rem;
    max-height: 300px;
}

.result-content video {
    max-width: 100%;
    border-radius: var(--radius-md);
}

.result-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
}

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

/* ========================================
   Toast 提示
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s var(--ease-spring), opacity 0.3s;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

.toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
}

.toast-success {
    border-color: var(--accent);
}

.toast-success .toast-icon {
    color: var(--accent);
}

.toast-error {
    border-color: #FF6B6B;
}

.toast-error .toast-icon {
    color: #FF6B6B;
}

.toast-warning {
    border-color: #FFB84D;
}

.toast-warning .toast-icon {
    color: #FFB84D;
}

.toast-info {
    border-color: var(--accent-secondary);
}

.toast-info .toast-icon {
    color: var(--accent-secondary);
}

.tool-toast-stack {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    z-index: 10000;
    display: grid;
    gap: 0.6rem;
    width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
    transform: translateX(-50%);
}

.tool-toast-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 159, 107, 0.24);
    border-radius: 999px;
    background: rgba(16, 16, 24, 0.92);
    color: var(--text-primary);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.tool-toast-pill.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.tool-toast-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 18px rgba(255, 107, 74, 0.6);
}

/* ========================================
   统一工具页面样式 (PPT/图片/视频)
   ======================================== */
.tool-page {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tool-header {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.tool-nav {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(12, 12, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.tool-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    padding: 0.6rem 1.18rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.25s var(--ease-out);
    white-space: nowrap;
}

.tool-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.tool-nav-link.active {
    background: var(--gradient-primary);
    color: var(--text-inverse);
    box-shadow: 0 4px 18px rgba(255, 107, 74, 0.28);
}

.tool-nav-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.tool-nav-link.is-disabled:hover {
    background: transparent;
    color: var(--text-secondary);
}

.tool-nav-link.active.is-disabled {
    opacity: 0.78;
}

.tool-back-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

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

.tool-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 0;
    overflow: hidden;
}

/* 右侧双栏布局 */
.right-panels {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    overflow: hidden;
}

/* 参数配置面板 - 左侧 */
.params-panel {
    background: var(--bg-primary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.5rem;
    gap: 1.25rem;
}

.params-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.params-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.params-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
    min-height: 0;
}

.params-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.params-section.prompt-section {
    flex: 0 0 auto;
    min-height: 0;
}

.prompt-textarea {
    min-height: 120px;
    height: auto;
    resize: none;
}

.params-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* AI对话面板 - 右侧 */
.chat-panel {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 600;
}

.chat-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-input-wrap {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border);
    background: var(--bg-primary);
}

.chat-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-send {
    padding: 0.625rem;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send:hover {
    background: var(--accent-secondary);
}

.chat-input.is-locked,
.assistant-input.is-locked {
    opacity: 0.72;
    cursor: not-allowed;
}

button.chat-send.is-stopping,
button.assistant-send.is-stopping {
    background: #ff6b4a;
    color: #fff;
}

button.chat-send.is-stopping:hover,
button.assistant-send.is-stopping:hover {
    background: #ff7c58;
    opacity: 1;
}

/* 预览面板 - 左侧大区域 */
.preview-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    min-height: 0;
}

/* 预览面板 */
.preview-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

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

.preview-header h2 {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

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

.preview-content {
    flex: 1;
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(30, 30, 45, 0.5) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}

.preview-content.gallery-mode {
    align-items: stretch;
    justify-content: stretch;
}

.preview-content.has-image {
    background: var(--bg-card);
}

.preview-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    transition: opacity 0.4s ease;
}

.preview-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.preview-content:hover .preview-placeholder svg {
    opacity: 0.7;
}

.preview-placeholder p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.preview-placeholder small {
    font-size: 0.75rem;
    opacity: 0.7;
}

.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.preview-loading .btn-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ppt-result-preview {
    width: 100%;
    height: 100%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    color: var(--text-primary);
}

.ppt-result-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ppt-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 107, 74, 0.14);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
}

.ppt-result-progress {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.ppt-result-preview h3 {
    font-size: 1rem;
    line-height: 1.35;
}

.ppt-result-preview p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ppt-result-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ppt-result-summary span {
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.ppt-result-hero {
    flex: 1;
    min-height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.ppt-result-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ppt-result-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.ppt-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.ppt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 画廊视图样式 */
.gallery-container {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    container-type: inline-size;
}

.gallery-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.1rem 0.9rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
}

.gallery-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.gallery-count {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-left: auto;
}

/* 批量选择功能 */
.gallery-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.gallery-actions .gallery-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.75rem;
    width: auto;
    height: auto;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.gallery-actions .gallery-action-btn svg {
    width: 14px;
    height: 14px;
}

.gallery-actions.selection-active .gallery-action-btn:first-child {
    background: rgba(74, 244, 197, 0.15);
    border-color: rgba(74, 244, 197, 0.4);
    color: var(--accent);
}

/* 选中复选框 */
.gallery-item-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
}

.gallery-item-checkbox svg {
    width: 12px;
    height: 12px;
    opacity: 0;
    stroke: #fff;
}

.gallery-item.selected .gallery-item-checkbox,
.gallery-item-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.gallery-item.selected .gallery-item-checkbox svg,
.gallery-item-checkbox.checked svg {
    opacity: 1;
}

/* 选择模式下显示复选框 */
.gallery-actions.selection-active ~ .gallery-grid .gallery-item-checkbox,
.gallery-actions.selection-active + .gallery-grid .gallery-item-checkbox {
    display: flex;
}

/* 或者用 JS 添加的全局选择模式 */
body.selection-mode-active .gallery-item-checkbox {
    display: flex;
}

body.selection-mode-active .gallery-item.selected .gallery-item-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

body.selection-mode-active .gallery-item.selected .gallery-item-checkbox svg {
    opacity: 1;
}

body.selection-mode-active .gallery-item:not(.selected):hover .gallery-item-checkbox {
    border-color: rgba(74, 244, 197, 0.5);
}

/* 选中时的边框效果 */
.gallery-item.selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(74, 244, 197, 0.3), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.gallery-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: auto;
    gap: 0.95rem;
    padding: 1rem 1.1rem 1.1rem;
    overflow-y: auto;
    align-content: start;
    align-items: start;
    min-width: 0;
    min-height: 0;
}

.gallery-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
}

.gallery-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.gallery-empty p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.gallery-empty small {
    font-size: 0.75rem;
    opacity: 0.7;
}

.gallery-item {
    position: relative;
    aspect-ratio: auto;
    min-width: 0;
    min-height: 170px;
    height: clamp(170px, 22vw, 240px);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s ease, border-color 0.22s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
    border-color: rgba(74, 244, 197, 0.18);
}

.gallery-item[draggable="true"] {
    cursor: pointer;
}

.gallery-item[draggable="true"]:active {
    cursor: pointer;
}

.gallery-item-media {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: rgba(10, 10, 18, 0.55);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@container (max-width: 420px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: clamp(190px, 52vw, 260px);
    }
}

.gallery-item-actions {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: flex;
    gap: 0.45rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-item:hover .gallery-item-actions,
.gallery-item:focus-within .gallery-item-actions {
    opacity: 1;
    transform: translateY(0);
}

.gallery-action-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(74, 244, 197, 0.2);
    background: rgba(15, 18, 28, 0.84);
    color: var(--accent);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.gallery-action-btn:hover {
    background: rgba(20, 28, 34, 0.96);
    transform: translateY(-1px);
}

.gallery-action-btn-danger {
    border-color: rgba(255, 107, 107, 0.28);
    background: rgba(40, 14, 18, 0.88);
    color: #ff6b6b;
}

.gallery-action-btn-danger:hover {
    background: rgba(68, 18, 24, 0.96);
    border-color: rgba(255, 107, 107, 0.42);
    color: #ff8d8d;
}

/* 全屏预览样式 */
.preview-fullscreen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.preview-fullscreen-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.preview-back-btn,
.preview-minimize-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-back-btn:hover,
.preview-minimize-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.preview-back-btn svg,
.preview-minimize-btn svg {
    width: 16px;
    height: 16px;
}

.preview-fullscreen-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.preview-fullscreen-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.preview-fullscreen-info {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-prompt-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.preview-prompt-text {
    flex: 1;
    display: block;
    max-height: 4.8rem;
    overflow: hidden;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
}

.preview-prompt-text.is-expanded {
    max-height: min(36vh, 340px);
    overflow: auto;
    white-space: pre-wrap;
    padding-right: 0.35rem;
}

.copy-prompt-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-prompt-btn:hover {
    color: var(--text-secondary);
    background: var(--bg-hover);
}

.copy-prompt-btn.copied {
    color: var(--success);
    border-color: var(--success);
}

.show-more-btn {
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    color: var(--accent);
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.show-more-btn:hover {
    background: rgba(74, 244, 197, 0.1);
}

/* 生成中动画样式 */
.generating-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.generating-indicator.error {
    color: var(--primary);
}

.generating-indicator.error svg {
    opacity: 0.7;
}

.generating-indicator p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.generating-indicator small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.generating-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.gen-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: gen-spin 1.5s linear infinite;
}

.gen-ring:nth-child(2) {
    inset: 8px;
    border-top-color: var(--accent-secondary);
    animation-delay: -0.5s;
    animation-direction: reverse;
}

.gen-ring:nth-child(3) {
    inset: 16px;
    border-top-color: var(--primary);
    animation-delay: -1s;
}

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

.generating-minimize {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generating-minimize:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.generating-minimize svg {
    width: 16px;
    height: 16px;
}

.preview-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* 编辑器面板 - 隐藏（功能移到AI助手内） */
.editor-panel {
    display: none;
}

.editor-header {
    margin-bottom: 1.5rem;
}

.editor-header h1 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.editor-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-inverse);
}

.editor-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.tool-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.tool-input:focus {
    outline: none;
    border-color: var(--accent);
}

.tool-input::placeholder {
    color: var(--text-muted);
}

.tool-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

.tool-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.tool-select:focus {
    outline: none;
    border-color: var(--accent);
}

.tool-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.tool-option-card {
    padding: 0.625rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.tool-option-card:hover {
    border-color: var(--border-hover);
}

.tool-option-card.selected {
    border-color: var(--accent);
    background: rgba(74, 244, 197, 0.1);
}

.tool-option-card input {
    display: none;
}

.tool-option-card span {
    font-size: 0.8125rem;
}

/* 统一按钮 */
.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.tool-btn-primary {
    background: var(--gradient-primary);
    color: var(--text-inverse);
}

.tool-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.tool-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.tool-btn-outline:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

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

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 参数配置通用样式 */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.setting-group-half {
    flex: 1;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.setting-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.setting-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.setting-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.setting-input:focus {
    outline: none;
    border-color: var(--accent);
}

.setting-select {
    width: 100%;
    min-height: 44px;
    padding: 0 2.75rem 0 1rem;
    background-color: rgba(255, 255, 255, 0.045);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23ffffffb3' d='M7 9.5 2.8 5.3l.9-.9L7 7.7l3.3-3.3.9.9L7 9.5Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.setting-select:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.065);
    box-shadow: 0 0 0 3px rgba(74, 244, 197, 0.1);
}

.form-select::-ms-expand,
.tool-select::-ms-expand,
.setting-select::-ms-expand {
    display: none;
}

.form-select option,
.tool-select option,
.setting-select option {
    background: #12121a;
    color: var(--text-primary);
}

.setting-row {
    display: flex;
    gap: 1rem;
}

.setting-row .setting-group {
    flex: 1;
}

.setting-group-half .setting-label {
    margin-bottom: 0.25rem;
}

/* 上传区域 */
.image-upload-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.image-upload-zone:hover {
    border-color: var(--accent);
}

.image-upload-zone.is-drop-target {
    border-color: var(--accent);
    background: rgba(74, 244, 197, 0.06);
    box-shadow: inset 0 0 0 1px rgba(74, 244, 197, 0.16);
}

.image-upload-zone.has-reference {
    border-style: solid;
    border-color: rgba(74, 244, 197, 0.24);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.upload-placeholder:hover {
    color: var(--text-secondary);
}

.upload-placeholder svg {
    opacity: 0.6;
}

.upload-placeholder span {
    font-size: 0.8125rem;
}

.upload-placeholder small {
    font-size: 0.6875rem;
    opacity: 0.7;
}

.upload-preview {
    position: relative;
    padding: 0.5rem;
    background: var(--bg-card);
}

.upload-preview img {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.upload-preview-meta {
    display: grid;
    gap: 0.2rem;
    margin-top: 0.5rem;
}

.upload-preview-meta span {
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-word;
}

.upload-preview-meta small {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.upload-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.upload-remove:hover {
    background: var(--primary);
}

/* 生成按钮包装 - 固定在底部 */
.generate-btn-wrap {
    padding: 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 生成按钮 */
.generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease-spring);
    box-shadow: 0 4px 15px rgba(255, 107, 74, 0.3);
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 74, 0.4);
}

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

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

/* AI对话消息 */
.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    width: fit-content;
    max-width: min(82%, 720px);
    box-sizing: border-box;
    padding: 1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

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

.message-ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.message-user {
    align-self: flex-end;
    background: rgba(74, 244, 197, 0.09);
    border: 1px solid rgba(74, 244, 197, 0.22);
}

.message-ai.message-agent,
.message-ai.message-welcome {
    width: auto;
    max-width: min(96%, 900px);
}

.message-header {
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.message-content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.assistant-overview {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.assistant-trace {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.assistant-trace-item {
    padding: 0.625rem 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.assistant-trace-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.assistant-trace-detail {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.assistant-section {
    margin-top: 0.75rem;
    padding: 0.875rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.assistant-section-primary {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(74, 244, 197, 0.18);
}

.assistant-section-title,
.assistant-mini-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.assistant-section-pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.875rem;
    line-height: 1.75;
    color: var(--text-primary);
    font-family: inherit;
}

.assistant-section-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.45rem;
    color: var(--text-primary);
    font-size: 0.84rem;
}

.assistant-section-list li {
    line-height: 1.6;
}

.assistant-suggestion-wrap,
.assistant-source-wrap,
.assistant-image-wrap {
    margin-top: 0.75rem;
}

.assistant-section-actions {
    margin-top: 0.875rem;
}

.assistant-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    padding: 0.625rem 0.9rem;
    border: 1px solid rgba(74, 244, 197, 0.22);
    border-radius: 10px;
    background: var(--accent);
    color: var(--text-inverse);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.assistant-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(74, 244, 197, 0.18);
}

.assistant-apply-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.assistant-source-list {
    display: grid;
    gap: 0.5rem;
}

.assistant-source-item {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
}

.assistant-source-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.assistant-source-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.assistant-source-snippet {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.assistant-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.assistant-image-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.025);
}

.assistant-image-card.is-reference-selected {
    border-color: rgba(74, 244, 197, 0.46);
    background: rgba(74, 244, 197, 0.07);
}

.assistant-image-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.assistant-image-preview {
    display: block;
    position: relative;
    min-height: 120px;
    border-radius: calc(var(--radius-md) - 4px);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.assistant-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 4px);
    background: rgba(255, 255, 255, 0.04);
}

.assistant-image-card.is-image-missing .assistant-image-preview::before {
    content: "参考图暂不可预览";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
    text-align: center;
}

.assistant-image-card span {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.assistant-image-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.assistant-image-use-btn,
.assistant-image-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.45rem 0.65rem;
    border-radius: 9px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.assistant-image-use-btn {
    flex: 1;
    border: 1px solid rgba(74, 244, 197, 0.22);
    background: rgba(74, 244, 197, 0.14);
    color: var(--accent);
}

.assistant-image-use-btn:hover {
    background: rgba(74, 244, 197, 0.2);
    transform: translateY(-1px);
}

.assistant-image-use-btn.is-selected {
    background: rgba(255, 107, 74, 0.16);
    border-color: rgba(255, 107, 74, 0.42);
    color: #ff8f78;
}

.assistant-image-use-btn.is-selected:hover {
    background: rgba(255, 107, 74, 0.24);
    border-color: rgba(255, 107, 74, 0.58);
    color: #ffd3c9;
    transform: none;
}

.assistant-image-link {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.assistant-image-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.suggestion-chip {
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.75rem;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.suggestion-chip:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(74, 244, 197, 0.22);
    transform: translateY(-1px);
}

/* AI消息应用按钮 */
.message-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.625rem;
    padding: 0.375rem 0.75rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.message-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.4);
}

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

.assistant-input-wrap {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
}

.assistant-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-family: inherit;
}

.assistant-input:focus {
    outline: none;
    border-color: var(--accent);
}

.assistant-send {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.assistant-send:hover {
    opacity: 0.9;
}

/* 响应式 */
@media (max-width: 1024px) {
    .tool-main {
        grid-template-columns: 1fr;
    }
    .preview-panel {
        display: none;
    }
    .right-panels {
        grid-template-columns: 1fr;
    }
    .params-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 50vh;
    }
}

@media (max-width: 640px) {
    .tool-page {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
    }
    .tool-header {
        gap: 0.75rem;
        flex-wrap: wrap;
        padding: 0.78rem;
        align-items: flex-start;
    }
    .tool-nav {
        order: 3;
        width: 100%;
        margin: 0;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        padding: 0.35rem;
        border-radius: 14px;
    }
    .tool-nav::-webkit-scrollbar {
        display: none;
    }
    .tool-nav-link {
        font-size: 0.8125rem;
        min-width: auto;
        padding: 0.45rem 0.75rem;
    }
    .tool-main {
        min-height: auto;
        overflow: visible;
    }
    .tool-header .user-dropdown {
        margin-left: auto;
    }
    .tool-header .logo {
        margin-right: auto;
    }
    .tool-back-btn {
        display: none;
    }
    .tool-options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .editor-panel {
        padding: 1rem;
    }
}

/* 按钮加载状态 */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   响应式调整
   ======================================== */
@media (max-width: 768px) {
    .modal {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .notice-modal {
        padding: 1.55rem;
    }

    .notice-modal-title {
        font-size: 1.35rem;
    }

    .notice-modal-body {
        font-size: 0.92rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        transform: translateY(120%);
    }

    .toast.show {
        transform: translateY(0);
    }
}
