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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    padding-top: 70px; /* 为固定导航栏留出空间 */
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-logo img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

.nav-link i {
    margin-right: 8px;
    font-size: 1.1em;
}

/* 英雄区域样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ff 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: slideInLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: slideInRight 1s ease-out;
}

.hero-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: rotate(0deg) scale(1.05);
}

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

.hero-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.hero-card p {
    color: var(--text-gray);
}

/* 特色区域样式 */
.features {
    padding: 5rem 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* 服务区域样式 */
.services {
    padding: 5rem 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-item {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-item:hover .service-image {
    transform: scale(1.1);
}

.service-content {
    padding: 2rem;
}

.service-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-content p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

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

/* 联系区域样式 */
.contact {
    padding: 5rem 0;
    background: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

/* 页脚样式 */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-light);
}

.footer-section img {
    max-height: 100px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

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

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

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

/* 滚动动画 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式设计 */
@media screen and (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .side-bar {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .feature-card,
    .contact-form {
        padding: 1.5rem;
    }
}

/* 侧边栏样式 */
.side-bar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px 0 0 10px;
}

.side-item {
    position: relative;
    padding: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.side-item:hover {
    background: var(--primary-color);
    color: white;
}

.side-item i {
    font-size: 24px;
    margin-bottom: 5px;
}

.side-item span {
    font-size: 12px;
}

.qr-popup {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    display: none;
    width: 200px;
    text-align: center;
    margin-right: 20px;
}

.qr-popup img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.qr-popup p {
    margin: 0;
    color: var(--text-dark);
    font-size: 14px;
}

.side-item:hover .qr-popup {
    display: block;
}

/* 添加一个小箭头 */
.qr-popup::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 10px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* 下拉菜单样式 */
.nav-dropdown {
    position: relative;
}

.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border: 1px solid var(--border-color);
}

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

.dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dropdown-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-link i {
    margin-right: 0.5rem;
    width: 16px;
}

/* 移动端下拉菜单 */
@media screen and (max-width: 768px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1rem;
        display: none;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-arrow {
        display: none;
    }
}

/* ================================ */
/* 深色模式样式扩展 */
/* ================================ */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --secondary-color: #34d399;
    --accent-color: #fbbf24;
    --text-dark: #f1f5f9;
    --text-gray: #cbd5e1;
    --text-light: #94a3b8;
    --bg-light: #334155;
    --bg-white: #1e293b;
    --border-color: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
}

[data-theme="dark"] body {
    background: #0f172a;
    color: var(--text-dark);
}

/* 导航栏深色模式 */
[data-theme="dark"] .navbar {
    background: rgba(30, 41, 59, 0.95);
    border-color: var(--border-color);
}

[data-theme="dark"] .nav-link {
    color: var(--text-dark);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-white);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-link {
    color: var(--text-dark);
}

[data-theme="dark"] .dropdown-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* 英雄区域深色模式 */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .hero-card {
    background: var(--bg-white);
    color: var(--text-dark);
}

[data-theme="dark"] .hero-card i {
    color: var(--primary-color);
}

/* 特色区域深色模式 */
[data-theme="dark"] .features {
    background: #0f172a;
}

[data-theme="dark"] .feature-card {
    background: var(--bg-white);
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .feature-card h3 {
    color: var(--text-dark);
}

[data-theme="dark"] .feature-card p {
    color: var(--text-gray);
}

/* 服务区域深色模式 */
[data-theme="dark"] .services {
    background: var(--bg-light);
}

[data-theme="dark"] .service-item {
    background: var(--bg-white);
}

[data-theme="dark"] .service-content h3 {
    color: var(--text-dark);
}

[data-theme="dark"] .service-content p {
    color: var(--text-gray);
}

[data-theme="dark"] .service-link {
    color: var(--primary-color);
}

/* 联系区域深色模式 */
[data-theme="dark"] .contact {
    background: #0f172a;
}

[data-theme="dark"] .contact-info h2 {
    color: var(--text-dark);
}

[data-theme="dark"] .contact-info p {
    color: var(--text-gray);
}

[data-theme="dark"] .contact-form {
    background: var(--bg-white);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: var(--text-gray);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

/* 按钮深色模式 */
[data-theme="dark"] .btn-primary {
    background: var(--primary-color);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--primary-dark);
}

[data-theme="dark"] .btn-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 页脚深色模式 */
[data-theme="dark"] .footer {
    background: #020617;
}

[data-theme="dark"] .footer-section h3 {
    color: var(--primary-color);
}

[data-theme="dark"] .footer-section h4 {
    color: var(--text-dark);
}

[data-theme="dark"] .footer-section p {
    color: var(--text-gray);
}

[data-theme="dark"] .footer-section ul li a {
    color: var(--text-gray);
}

[data-theme="dark"] .footer-section ul li a:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .footer-bottom p {
    color: var(--text-gray);
}

[data-theme="dark"] .footer-bottom {
    border-color: #374151;
}

/* 侧边栏深色模式 */
[data-theme="dark"] .side-bar {
    background: var(--bg-white);
}

[data-theme="dark"] .side-item {
    color: var(--text-dark);
}

[data-theme="dark"] .side-item:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .qr-popup {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .qr-popup p {
    color: var(--text-dark);
}

[data-theme="dark"] .qr-popup::after {
    border-left-color: var(--bg-white);
}

/* 移动端菜单深色模式 */
@media screen and (max-width: 768px) {
    [data-theme="dark"] .nav-menu {
        background: var(--bg-white);
        border-color: var(--border-color);
    }
}

/* 滚动条深色模式 */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-light);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* 选中文本深色模式 */
[data-theme="dark"] ::selection {
    background: var(--primary-color);
    color: white;
}