/**
 * 灵动积木 - 前台样式
 * 现代化、响应式、美观的前台界面
 */

/* ============================================
   全局样式
   ============================================ */
:root {
    /* 主题色 */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #7c98ff;
    --secondary-color: #764ba2;
    
    /* 中性色 */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 功能色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* ============================================
   导航栏
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand .logo {
    width: 40px;
    height: 40px;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-800);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.navbar-menu a {
    font-weight: 500;
    color: var(--gray-700);
    position: relative;
}

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

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: 2px solid var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    padding: 15px;
    border-bottom: 1px solid var(--gray-200);
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 5px;
}

.user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.dropdown-item {
    display: block;
    padding: 12px 15px;
    color: var(--gray-700);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 5px 0;
}

/* ============================================
   按钮样式
   ============================================ */
.btn-primary,
.btn-outline,
.btn-white,
.btn-outline-white {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

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

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-outline-white {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-large {
    padding: 14px 32px;
    font-size: 18px;
}

/* ============================================
   英雄区域
   ============================================ */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--gray-900);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--gray-600);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

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

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

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

.hero-illustration {
    position: relative;
    height: 400px;
}

.illustration-card {
    position: absolute;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: float 3s ease-in-out infinite;
}

.illustration-card .card-icon {
    font-size: 48px;
}

.illustration-card .card-text {
    font-weight: 600;
    color: var(--gray-700);
}

.illustration-card.card-1 {
    top: 50px;
    left: 50px;
    animation-delay: 0s;
}

.illustration-card.card-2 {
    top: 150px;
    right: 50px;
    animation-delay: 1s;
}

.illustration-card.card-3 {
    bottom: 50px;
    left: 100px;
    animation-delay: 2s;
}

.illustration-card.card-4 {
    top: 20px;
    right: 150px;
    animation-delay: 0.5s;
}

.illustration-card.card-5 {
    bottom: 120px;
    right: 80px;
    animation-delay: 1.5s;
}

.illustration-card.card-6 {
    top: 220px;
    left: 30px;
    animation-delay: 2.5s;
}

.illustration-card.card-7 {
    bottom: 200px;
    left: 200px;
    animation-delay: 3s;
}

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

/* ============================================
   特色功能
   ============================================ */
.features {
    padding: 100px 0;
}

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

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-600);
}

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

.feature-card {
    padding: 40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 15px;
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 20px;
}

.feature-link {
    color: var(--primary-color);
    font-weight: 600;
}

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

/* ============================================
   使用场景
   ============================================ */
.use-cases {
    padding: 100px 0;
    background: var(--gray-50);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.use-case-card {
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.use-case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.use-case-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.use-case-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.use-case-card p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ============================================
   产品优势
   ============================================ */
.advantages {
    padding: 100px 0;
}

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

.advantage-item {
    display: flex;
    gap: 20px;
}

.advantage-number {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.advantage-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.advantage-description {
    color: var(--gray-600);
    line-height: 1.8;
}

/* ============================================
   用户评价
   ============================================ */
.testimonials {
    padding: 100px 0;
    background: var(--gray-50);
}

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

.testimonial-card {
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial-text {
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.author-name {
    font-weight: 600;
    color: var(--gray-900);
}

.author-title {
    font-size: 14px;
    color: var(--gray-500);
}

/* ============================================
   CTA区域
   ============================================ */
.cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    text-align: center;
    color: var(--white);
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
}

.cta-description {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ============================================
   页脚
   ============================================ */
.footer {
    padding: 60px 0 30px;
    background: var(--gray-900);
    color: var(--gray-400);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

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

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

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

.social-links {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-link {
    padding: 8px 16px;
    background: var(--gray-800);
    border-radius: var(--radius-md);
    font-size: 14px;
}

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

.contact-info p {
    margin-bottom: 8px;
}

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

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom a {
    margin: 0 10px;
}

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

/* ============================================
   返回顶部按钮
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   响应式设计
   ============================================ */
@media screen and (max-width: 992px) {
    .features-grid,
    .use-cases-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-illustration {
        display: none;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-actions {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .features-grid,
    .use-cases-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}

