/* ============================================================
   AIVE — 精选AI工具导航与服务平台
   深蓝主题 · v4.0 重构版
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

/* ============ CSS Variables ============ */
:root {
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --accent: #06B6D4;
    --accent-light: #22D3EE;
    --gradient-1: linear-gradient(135deg, #3B82F6 0%, #06B6D4 50%, #0EA5E9 100%);
    --gradient-2: linear-gradient(135deg, #06B6D4 0%, #22D3EE 50%, #67E8F9 100%);
    --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #0F172A 30%, #1E293B 60%, #0F172A 100%);
    --gradient-card: linear-gradient(135deg, rgba(59,130,246,0.04) 0%, rgba(6,182,212,0.06) 100%);
    --bg: #0F172A;
    --bg-secondary: #1E293B;
    --card-bg: #1E293B;
    --glass-bg: rgba(15,23,42,0.8);
    --glass-border: rgba(59,130,246,0.15);
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --border-light: #1E293B;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 4px 24px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.4);
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Reset ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 20% 80%, rgba(59,130,246,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6,182,212,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ============ 导航栏 ============ */
#main-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(15,23,42,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

#main-header.scrolled {
    background: #0F172A;
    border-bottom-color: var(--glass-border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-menu > li > a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--primary);
}

.nav-dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: rgba(59,130,246,0.1);
    color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 6px 14px;
    transition: all var(--transition);
}

.nav-search:focus-within {
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.nav-search svg { color: var(--text-muted); flex-shrink: 0; }

.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 14px;
    width: 140px;
    font-family: inherit;
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition);
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

/* Mobile toggle */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============ Hero 全屏 ============ */
.hero-fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: #070B14;
    padding: 100px 24px 80px;
}

/* CSS 粒子效果 */
.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59,130,246,0.4);
    border-radius: 50%;
    animation: float-particle linear infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-duration: 12s; animation-delay: 0s; width: 3px; height: 3px; }
.particle:nth-child(2) { left: 25%; top: 60%; animation-duration: 15s; animation-delay: -2s; width: 5px; height: 5px; background: rgba(6,182,212,0.3); }
.particle:nth-child(3) { left: 40%; top: 30%; animation-duration: 10s; animation-delay: -4s; }
.particle:nth-child(4) { left: 55%; top: 70%; animation-duration: 18s; animation-delay: -1s; width: 6px; height: 6px; background: rgba(59,130,246,0.2); }
.particle:nth-child(5) { left: 70%; top: 15%; animation-duration: 14s; animation-delay: -3s; }
.particle:nth-child(6) { left: 85%; top: 45%; animation-duration: 11s; animation-delay: -5s; width: 5px; height: 5px; background: rgba(6,182,212,0.25); }
.particle:nth-child(7) { left: 15%; top: 80%; animation-duration: 16s; animation-delay: -6s; }
.particle:nth-child(8) { left: 50%; top: 10%; animation-duration: 13s; animation-delay: -2s; width: 3px; height: 3px; }
.particle:nth-child(9) { left: 75%; top: 85%; animation-duration: 17s; animation-delay: -4s; background: rgba(14,165,233,0.3); }
.particle:nth-child(10) { left: 30%; top: 50%; animation-duration: 20s; animation-delay: -7s; width: 2px; height: 2px; }
.particle:nth-child(11) { left: 60%; top: 40%; animation-duration: 14s; animation-delay: -3s; background: rgba(59,130,246,0.15); width: 8px; height: 8px; }
.particle:nth-child(12) { left: 90%; top: 30%; animation-duration: 12s; animation-delay: -1s; }

@keyframes float-particle {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

/* 网格背景 */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    color: white;
}

.hero-title-accent {
    background: linear-gradient(135deg, #3B82F6 0%, #06B6D4 50%, #22D3EE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 14px 36px;
    background: transparent;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    border: 1.5px solid rgba(255,255,255,0.25);
    transition: all var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59,130,246,0.08);
    transform: translateY(-2px);
}

.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.hero-stat { text-align: center; }

.hero-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
}

.hero-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ 品牌墙 ============ */
.brand-wall {
    padding: 48px 0;
    border-bottom: 1px solid var(--border-light);
}

.brand-wall .container {
    text-align: center;
}

.brand-wall-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
    font-weight: 600;
}

.brand-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.brand-item {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--brand-color) 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.brand-item:hover { opacity: 1; }

/* ============ Section 通用 ============ */
.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 60px;
}

/* ============ Features ============ */
.features-section {
    padding: 100px 0;
}

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

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity var(--transition);
}

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

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

.feature-icon {
    font-size: 44px;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.7;
}

.feature-card ul { list-style: none; }

.feature-card li {
    padding: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============ 工具卡片 ============ */
.tools-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 24px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

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

.tool-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.tool-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
}

.tool-card-info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.tool-card-rating {
    font-size: 13px;
    color: #FBBF24;
}

.tool-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

.tool-card-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tool-tag {
    padding: 3px 10px;
    background: rgba(59,130,246,0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.tool-card-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
}

.tool-card-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

/* ============ 工作台 ============ */
.workspace-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 32px 100px;
}

.workspace-section > h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.workspace-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 28px;
    background: var(--card-bg);
    border: 1.5px solid var(--border-light);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.tab:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--bg-secondary);
}

.tab.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Workspace grid */
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.input-panel, .output-panel { padding: 36px; }
.input-panel { border-right: 1px solid var(--border-light); background: rgba(124,58,237,0.008); }

.input-panel h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-desc {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 14px;
}

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

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.platform-btn {
    padding: 10px 8px;
    background: var(--bg);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    color: var(--text-secondary);
}

.platform-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: white;
}

.platform-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* Inputs */
input[type="text"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: all var(--transition);
    background: var(--bg);
    color: var(--text);
}

input[type="text"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
    background: white;
}

textarea { height: 120px; resize: vertical; }
select { cursor: pointer; }

/* Generate button */
.generate-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.generate-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.generate-btn:hover::after { left: 100%; }

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124,58,237,0.25);
}

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

.quick-actions { text-align: center; margin-top: 14px; }

.shortcut {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 12px;
    border-radius: 4px;
}

/* Output panel */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.output-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.output-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 8px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    background: var(--card-bg);
    color: var(--text-secondary);
    font-family: inherit;
}

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

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

.empty-state span { font-size: 56px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* Title results */
.title-item {
    background: var(--bg);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: fadeInUp 0.35s ease both;
    border: 1px solid transparent;
    transition: all var(--transition);
}

.title-item:hover {
    border-color: var(--border);
    background: white;
    box-shadow: var(--shadow-sm);
}

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

.title-item .number {
    font-weight: 800;
    color: var(--primary);
    font-size: 18px;
    min-width: 28px;
    opacity: 0.6;
}

.title-item .text {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

.title-item .copy-btn {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
}

.title-item .copy-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-secondary);
}

/* Result block */
.result-block {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.result-block pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
    max-height: 500px;
    overflow-y: auto;
    color: var(--text);
}

/* History */
.history-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.history-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-history-btn {
    font-size: 12px;
    padding: 4px 12px;
    background: none;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.clear-history-btn:hover {
    border-color: #EF4444;
    color: #EF4444;
    background: #FEF2F2;
}

.history-item {
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius-xs);
    margin-bottom: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    color: var(--text-secondary);
}

.history-item:hover {
    background: white;
    border-left-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.history-item .history-label {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
    margin-right: 8px;
}

.history-item .history-time {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
}

/* Material library */
.material-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.material-sidebar {
    padding: 28px 20px;
    border-right: 1px solid var(--border-light);
    background: rgba(124,58,237,0.01);
}

.material-sidebar h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.material-sidebar h3:first-child { margin-top: 0; }

.category-list, .scene-list { display: flex; flex-direction: column; gap: 4px; }

.category-btn, .scene-btn {
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 500;
}

.category-btn:hover, .scene-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.category-btn.active, .scene-btn.active {
    background: var(--gradient-1);
    color: white;
    font-weight: 600;
}

.material-content { padding: 28px 32px; }

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

.material-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.material-actions { display: flex; gap: 10px; }

.search-input {
    width: 220px !important;
    padding: 8px 14px !important;
    font-size: 14px !important;
}

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

.material-card {
    background: var(--bg);
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.material-card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    background: white;
}

.material-card .material-text {
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 14px;
    font-weight: 500;
}

.material-card .material-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.material-card .copy-btn {
    padding: 5px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition);
    font-family: inherit;
}

.material-card .copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Hotspot */
.hotspot-container {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

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

.hotspot-header h3 { font-size: 20px; font-weight: 700; }
.hotspot-actions { display: flex; gap: 10px; }

.hotspot-grid {
    padding: 28px 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.hotspot-item {
    padding: 18px 20px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.hotspot-item:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: white;
}

.hotspot-item .hotspot-rank {
    display: inline-block;
    padding: 2px 10px;
    background: var(--gradient-2);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}

.hotspot-item .hotspot-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
}

.hotspot-item .hotspot-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.hotspot-item .hotspot-heat { color: var(--accent); font-weight: 600; }

/* Writing */
.writing-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.writing-sidebar {
    padding: 28px 20px;
    border-right: 1px solid var(--border-light);
    background: rgba(124,58,237,0.01);
}

.writing-sidebar h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tool-list { display: flex; flex-direction: column; gap: 4px; }

.tool-btn {
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition);
    color: var(--text-secondary);
    font-family: inherit;
    font-weight: 500;
}

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

.tool-btn.active {
    background: var(--gradient-1);
    color: white;
    font-weight: 600;
}

.writing-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.writing-input { padding: 28px 32px; border-right: 1px solid var(--border-light); }

.writing-input h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.writing-input p { color: var(--text-secondary); margin-bottom: 20px; font-size: 14px; }
.writing-options { margin: 16px 0; }
.writing-output { padding: 28px 32px; }

/* Tag */
.tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(124,58,237,0.06);
    color: var(--primary);
    border-radius: 4px;
    font-size: 11px;
    margin-right: 4px;
    font-weight: 500;
}

/* ============ 教程区 ============ */
.tutorials-section {
    padding: 100px 0;
}

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

.tutorial-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
}

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

.tutorial-card-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.tutorial-card-body {
    padding: 24px;
}

.tutorial-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(59,130,246,0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.tutorial-card-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tutorial-card-body p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tutorial-meta {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============ 页脚 ============ */
footer {
    background: #0F172A;
    border-top: 1px solid var(--border-light);
    padding: 60px 0 32px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.footer-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

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

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

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 0;
    transition: color var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

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

.footer-icp {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-icp a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}

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

.footer-divider { color: var(--border); font-size: 12px; }

.ghs-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.footer-note {
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

/* ============ 回到顶部 + 联系按钮 ============ */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
    align-items: center;
    justify-content: center;
    transition: all .25s;
    text-decoration: none;
}

#back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}

.fixed-contact-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
    color: white;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59,130,246,0.3);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 22px;
}

.fixed-contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(59,130,246,0.4);
}

/* ============ Toast ============ */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
    pointer-events: none;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(16px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(16px); }
}

/* ============ Hotspot detail overlay ============ */
.hotspot-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s;
}

.hotspot-detail {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 36px;
    position: relative;
    animation: slideUp .3s ease;
}

.detail-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    color: var(--text);
}

.detail-close:hover { background: #FEE2E2; color: #EF4444; }

.detail-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.detail-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.detail-body p { font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 28px; }
.detail-actions { display: flex; gap: 12px; }
.detail-actions .generate-btn { flex: 1; }

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

.upgrade-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s;
}

.retention-tip {
    margin-top: 14px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary);
    animation: slideUp .3s ease;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .tutorials-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    /* Nav */
    .nav-menu { display: none; }
    .nav-search { display: none; }
    .nav-mobile-toggle { display: flex; }

    .nav-container {
        padding: 0 16px;
    }

    /* Mobile menu */
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px; left: 0; right: 0;
        background: #0F172A;
        border-bottom: 1px solid var(--border);
        padding: 16px;
        gap: 4px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.open > li > a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }

    .nav-menu.open .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 16px;
    }

    /* Hero */
    .hero-fullscreen { padding: 80px 20px 60px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { flex-direction: column; align-items: center; gap: 12px; }
    .btn-primary, .btn-outline { width: 100%; max-width: 280px; justify-content: center; }
    .hero-stats-row { gap: 32px; }
    .hero-stat-num { font-size: 1.5rem; }

    /* Brand wall */
    .brand-list { gap: 20px; }
    .brand-item { font-size: 15px; }

    /* Sections */
    .container { padding: 0 16px; }
    .section-title { font-size: 1.75rem; }
    .section-desc { font-size: 14px; margin-bottom: 40px; }

    .features-section { padding: 60px 0; }
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .feature-card { padding: 24px 20px; }

    .tools-section { padding: 60px 0; }
    .tools-grid { grid-template-columns: 1fr; gap: 12px; }

    .tutorials-section { padding: 60px 0; }
    .tutorials-grid { grid-template-columns: 1fr; gap: 16px; }
    .tutorial-card-img { height: 140px; }

    /* Workspace */
    .workspace-section { padding: 32px 8px; }
    .workspace-section > h2 { font-size: 26px; }
    .workspace-tabs { gap: 4px; }
    .tab { padding: 10px 14px; font-size: 13px; }

    .workspace-grid, .writing-main { grid-template-columns: 1fr; }
    .input-panel, .output-panel { padding: 20px 16px; }
    .input-panel { border-right: none; border-bottom: 1px solid var(--border-light); }
    .platform-selector { grid-template-columns: repeat(2, 1fr); }
    .platform-btn { padding: 10px 6px; font-size: 12px; }

    .material-container, .writing-container { grid-template-columns: 1fr; }
    .material-sidebar, .writing-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 12px 16px;
    }
    .category-list, .scene-list, .tool-list { flex-direction: row; flex-wrap: nowrap; gap: 4px; }
    .category-btn, .scene-btn, .tool-btn { white-space: nowrap; font-size: 12px; padding: 8px 10px; }
    .material-sidebar h3, .writing-sidebar h3 { display: none; }
    .material-content { padding: 16px; }
    .material-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .material-actions { width: 100%; }
    .search-input { width: 100% !important; }
    .material-grid { grid-template-columns: 1fr; }
    .material-card { padding: 14px 16px; }

    .hotspot-header { flex-direction: column; gap: 12px; align-items: flex-start; padding: 20px 16px; }
    .hotspot-grid { padding: 16px; grid-template-columns: 1fr; }
    .hotspot-item { padding: 14px 16px; }

    .check-container { grid-template-columns: 1fr; }
    .check-input-area, .check-output-area { padding: 20px 16px; }
    .check-input-area { border-right: none; border-bottom: 1px solid var(--border-light); }
    .check-buttons { grid-template-columns: 1fr; }

    .writing-input, .writing-output { padding: 20px 16px; }
    .writing-input { border-right: none; border-bottom: 1px solid var(--border-light); }

    .output-actions { flex-direction: column; }
    .action-btn { width: 100%; text-align: center; }

    .title-item { padding: 12px 14px; gap: 10px; }
    .title-item .number { font-size: 16px; min-width: 22px; }
    .title-item .text { font-size: 14px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-icp { justify-content: center; }

    .hotspot-detail { max-width: 92vw; padding: 24px 20px; }
    .detail-header h2 { font-size: 18px; }
    .detail-actions { flex-direction: column; }
}