/* css/style.css */

/* 全局变量 */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #7209b7;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #fff;
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --border-radius: 10px;
}

/* 暗色模式变量 */
.dark-mode {
    --text-color: #f0f0f0;
    --light-bg: #222;
    --white: #333;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    background-color: #121212;
    color: #f0f0f0;
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background-color: var(--white);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 加载器 */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.dark-mode .loader {
    background: #121212;
}

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

.loader-content i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.loader-bar {
    width: 200px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.dark-mode .loader-bar {
    background: #444;
}

.loader-progress {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    animation: loading 2s ease-in-out forwards;
}

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

/* 导航栏 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.dark-mode nav {
    background: rgba(51, 51, 51, 0.95);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    height: 70px;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(30deg);
}

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 1rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.dark-mode .hero {
    background: linear-gradient(135deg, #222 0%, #333 100%);
}

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

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.dark-mode .hero-title {
    color: #8bb9ff;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.dark-mode .hero-subtitle {
    color: #aaa;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1rem;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

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

.btn-secondary:hover {
    background: rgba(67, 97, 238, 0.1);
    transform: translateY(-3px);
}

.dark-mode .btn-secondary:hover {
    background: rgba(139, 185, 255, 0.2);
}

/* 快速导航栏 */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 3rem auto 0;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.quick-nav-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.quick-nav-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.2);
}

.quick-nav-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.quick-nav-item:hover .quick-nav-icon {
    transform: scale(1.2);
}

.quick-nav-text {
    font-weight: 600;
    font-size: 1rem;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(67, 97, 238, 0.1), rgba(115, 9, 183, 0.1));
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 150px;
    height: 150px;
    bottom: 20%;
    right: 10%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 40%;
    right: 20%;
    animation-delay: 4s;
}

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

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

/* 通用区块样式 */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.dark-mode .section-title {
    color: #8bb9ff;
}

/* 统计数据 */
.stats {
    background: var(--light-bg);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.dark-mode .stat-label {
    color: #aaa;
}

/* 服务展示 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.dark-mode .service-title {
    color: #8bb9ff;
}

.service-desc {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
}

.dark-mode .service-desc {
    color: #aaa;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.service-link:hover {
    gap: 1rem;
}

/* 项目案例 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(45deg, #4361ee, #7209b7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.dark-mode .portfolio-content h3 {
    color: #8bb9ff;
}

.portfolio-content p {
    color: #666;
}

.dark-mode .portfolio-content p {
    color: #aaa;
}

/* 开发流程 */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.process-step {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.process-step:hover {
    transform: translateY(-10px);
}

.step-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.process-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.dark-mode .process-step h3 {
    color: #8bb9ff;
}

.process-step p {
    color: #666;
}

.dark-mode .process-step p {
    color: #aaa;
}

/* 技术栈展示 */
.tech-stack {
    background: var(--light-bg);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.tech-item {
    background: var(--white);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.tech-item i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tech-item span {
    font-weight: 600;
    color: var(--text-color);
}

/* 服务报价 */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.pricing-card.featured:hover {
    transform: translateY(-10px) scale(1.05);
}

.pricing-header {
    margin-bottom: 2rem;
}

.pricing-title {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.dark-mode .pricing-title {
    color: #8bb9ff;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pricing-period {
    color: #666;
    font-size: 0.9rem;
}

.dark-mode .pricing-period {
    color: #aaa;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark-mode .pricing-features li {
    border-bottom-color: #444;
}

.pricing-features li i {
    color: #4CAF50;
}

/* 常见问题 */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
}

.faq-question:hover {
    background: rgba(67, 97, 238, 0.05);
}

.dark-mode .faq-question:hover {
    background: rgba(139, 185, 255, 0.1);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.open {
    padding: 0 1.5rem 1.5rem;
    max-height: 1000px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
}

.dark-mode .faq-answer p {
    color: #aaa;
}

/* 联系方式 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.contact-value {
    color: #666;
}

.dark-mode .contact-value {
    color: #aaa;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
}

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

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* 底部 */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0 2rem;
}

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

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.copyright {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.icp-container {
    margin-top: 1rem;
}

.icp-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.icp-link:hover {
    color: white;
}

/* 动画类 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 移动端响应式 */
@media (max-width: 1024px) {
    .services-grid,
    .tech-grid,
    .portfolio-grid,
    .process-steps,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
        border-radius: 0 0 10px 10px;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .stats-grid,
    .tech-grid,
    .portfolio-grid,
    .process-steps,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-nav {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons a,
    .hero-buttons button {
        width: 100%;
        max-width: 300px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-buttons a,
    .contact-buttons button {
        width: 100%;
        max-width: 300px;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 5rem 1rem 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .service-card,
    .portfolio-card,
    .process-step,
    .pricing-card {
        padding: 1.5rem;
    }
}