/* ========================================
   AI Vision Studio - 主样式文件
   主题: 深色 + 紫色调
   ======================================== */

/* CSS 变量 */
:root {
    /* 主色调 - 紫色系 */
    --primary: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;
    --primary-gradient: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    
    /* 辅助色 */
    --secondary: #06B6D4;
    --secondary-light: #67E8F9;
    --accent: #F472B6;
    
    /* 背景色 */
    --bg-primary: #0F0F1A;
    --bg-secondary: #1A1A2E;
    --bg-tertiary: #252542;
    --bg-card: rgba(26, 26, 46, 0.8);
    
    /* 文字色 */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* 边框 */
    --border-color: rgba(139, 92, 246, 0.2);
    --border-light: rgba(255, 255, 255, 0.1);
    
    /* 阴影 */
    --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 32px rgba(139, 92, 246, 0.2);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

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

/* ========================================
   通用组件
   ======================================== */

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

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

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

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

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

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

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, #8B5CF6 0%, #06B6D4 50%, #F472B6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 区块标题 */
.section-header {
    margin-bottom: 48px;
}

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

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

/* ========================================
   导航栏
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 72px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo img {
    width: 36px;
    height: 36px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

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

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width var(--transition-normal);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

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

.language-switch select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
}

.language-switch select:hover {
    border-color: var(--primary);
}

.language-switch select:focus {
    border-color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* ========================================
   Hero 区域
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    gap: 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

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

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

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

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -4s;
}

@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(-30px, -20px) scale(1.02);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 550px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

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

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-features {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.feature-tag i {
    color: var(--primary);
    font-size: 16px;
}

.hero-stats {
    display: none;
}

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

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

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

.hero-visual {
    position: relative;
    flex: 1;
    max-width: 480px;
    height: 450px;
    z-index: 1;
}

.floating-card {
    position: absolute;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: cardFloat 6s ease-in-out infinite;
}

.floating-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-card .label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.card-1 {
    width: 240px;
    height: 180px;
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.card-2 {
    width: 240px;
    height: 180px;
    bottom: 20px;
    right: 20px;
    animation-delay: -3s;
    border: 2px solid var(--primary);
}

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

/* ========================================
   工具标签页
   ======================================== */
.tools-tabs {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.custom-tabs {
    max-width: 1000px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.3);
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.tab-panels {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

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

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

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

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

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card.featured {
    border-color: var(--primary);
}

.tool-card .badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary-gradient);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-icon i {
    font-size: 28px;
    color: var(--primary-light);
}

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

.tool-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* ========================================
   功能展示
   ======================================== */
.features {
    padding: 100px 0;
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 120px;
}

.feature-block.reverse {
    direction: rtl;
}

.feature-block.reverse > * {
    direction: ltr;
}

.feature-content h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
}

.feature-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    margin-bottom: 32px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.feature-list i {
    color: var(--primary);
    font-size: 18px;
}

.feature-visual {
    position: relative;
}

.compare-slider {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.compare-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.after-image {
    width: 50%;
    overflow: hidden;
    border-right: 2px solid white;
}

.compare-slider .label {
    position: absolute;
    bottom: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.before-image .label {
    left: 16px;
}

.after-image .label {
    left: 16px;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    cursor: ew-resize;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle::before {
    content: '↔';
    color: var(--bg-primary);
    font-size: 16px;
    font-weight: bold;
}

/* ========================================
   AI 设计师
   ======================================== */
.ai-designer {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.ai-designer .section-header {
    text-align: center;
}

.ai-designer .subtitle {
    font-size: 20px;
    color: var(--text-secondary);
}

.chat-demo {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-messages {
    padding: 32px;
    min-height: 400px;
}

.message {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.message.user {
    flex-direction: row-reverse;
}

.message .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.message.ai .avatar {
    background: var(--primary-gradient);
}

.message .content {
    background: var(--bg-tertiary);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    max-width: 70%;
}

.message.user .content {
    background: var(--primary-gradient);
}

.message.ai .content {
    border-top-left-radius: 4px;
}

.message.user .content {
    border-top-right-radius: 4px;
}

.result-image {
    margin: 16px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

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

.chat-input {
    display: flex;
    gap: 12px;
    padding: 20px 32px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-light);
}

.chat-input input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.chat-input input:focus {
    border-color: var(--primary);
}

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

/* ========================================
   用户评价
   ======================================== */
.testimonials {
    padding: 100px 0;
}

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

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-normal);
}

.testimonial-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

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

.feature-icon i {
    font-size: 28px;
    color: white;
}

.testimonial-card h3 {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.testimonial-card .stars {
    display: none;
}
    color: #FBBF24;
    margin-bottom: 16px;
}

.stars i {
    margin-right: 4px;
}

.quote {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

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

.author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author .info {
    display: flex;
    flex-direction: column;
}

.author .name {
    font-weight: 600;
}

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

/* ========================================
   CTA 区域
   ======================================== */
.cta {
    padding: 100px 0;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
}

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

.cta-content h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    padding: 80px 0 40px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

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

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
}

.footer-links h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

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

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

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

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

.legal-links {
    display: flex;
    gap: 24px;
}

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

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

/* ========================================
   返回顶部
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1200px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .nav-menu,
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .feature-block {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .feature-block.reverse {
        direction: ltr;
    }
    
    .testimonials-carousel {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .tab-panel .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-actions {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ========================================
   动画效果
   ======================================== */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
