/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00c6ff;
    --secondary: #0072ff;
    --accent: #6a11cb;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #28a745;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: var(--light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.3);
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 114, 255, 0.4);
}

.btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn.secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    color: var(--dark);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 600px;
    margin: 20px auto 0;
}

/* 加载动画 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark), #16213e);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.dot {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 5px;
    animation: bounce 1.5s infinite ease-in-out;
}

.dot:nth-child(2) {
    animation-delay: 0.1s;
}

.dot:nth-child(3) {
    animation-delay: 0.2s;
}

.dot:nth-child(4) {
    animation-delay: 0.3s;
}

.dot:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

#loading p {
    color: white;
    font-size: 18px;
    font-weight: 500;
}

/* 导航栏 */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

#navbar.scrolled {
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    color: white;
    font-family: 'Orbitron', sans-serif;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 英雄区域 */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark), #16213e);
}

.hero-content {
    text-align: center;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

.cta-buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 1.1s;
}

.cta-buttons .btn {
    margin: 0 10px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-down a {
    color: white;
    font-size: 24px;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 服务区域 */
#services {
    padding: 100px 0;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    z-index: -1;
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 114, 255, 0.2);
}

.service-card:hover * {
    color: white;
}

.service-card .icon {
    font-size: 50px;
    margin-bottom: 20px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.service-card p {
    color: var(--gray);
    transition: all 0.3s ease;
}

/* 关于我们 */
#about {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa, #e4edf9);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    color: var(--dark);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--gray);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
}

.stat-item p {
    color: var(--gray);
    margin: 0;
}

.about-image {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    perspective: 1000px;
}

.tech-item {
    background: white;
    border-radius: 10px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    transform-style: preserve-3d;
}

.tech-item:hover {
    transform: rotateY(10deg) rotateX(10deg) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 114, 255, 0.2);
}

.tech-item i {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary);
}

.tech-item span {
    font-weight: 600;
    color: var(--dark);
}

/* 案例展示 */
#portfolio {
    padding: 100px 0;
    background: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 114, 255, 0.2);
}

.portfolio-img {
    height: 250px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 25px;
    background: white;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.portfolio-info p {
    color: var(--gray);
}

/* 联系我们 */
#contact {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--dark), #16213e);
    color: white;
}

#contact .section-header h2,
#contact .section-header p {
    color: white;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-family: 'Orbitron', sans-serif;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary);
    margin-right: 20px;
    min-width: 30px;
}

.contact-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-item p {
    color: #ccc;
}

.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-family: 'Orbitron', sans-serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px var(--primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 页脚 */
footer {
    background: var(--dark);
    color: white;
    padding: 70px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo h2 {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-logo p {
    color: #ccc;
    margin-bottom: 20px;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* 动画 */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.animate-text {
    opacity: 0;
    transform: translateY(30px);
}

.animate-text.delay-1 {
    animation-delay: 0.3s;
}

.animate-text.delay-2 {
    animation-delay: 0.6s;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--dark);
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: all 0.4s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .cta-buttons .btn {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    #backToTop {
        right: 15px;
        bottom: 15px;
    }
}