/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2cbf;
    --accent-color: #00ff88;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #6b6b80;
    --border-color: #2a2a3a;
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    --gradient-2: linear-gradient(135deg, #7b2cbf 0%, #00d4ff 100%);
}

html {
    scroll-behavior: smooth;
}

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

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

/* ===== WebGL 背景 ===== */
#webgl-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 15px;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ===== 首页 Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
}

.hero-content {
    max-width: 900px;
    z-index: 1;
}

.hero-title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: bold;
    margin-bottom: 20px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-description {
    font-size: clamp(14px, 1.5vw, 18px);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.4);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-full {
    width: 100%;
}

.hero-advantages {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}

.advantage-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.advantage-icon {
    font-size: 18px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 14px;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== 通用区块样式 ===== */
section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    text-align: center;
    margin-bottom: 15px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 60px;
}

/* ===== 服务项目 ===== */
.services {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

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

.service-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
}

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

.service-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card > p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-list {
    list-style: none;
}

.service-list li {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.service-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ===== 案例作品 ===== */
.portfolio {
    background: var(--bg-card);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: var(--bg-dark);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

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

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-image {
    font-size: 64px;
    opacity: 0.5;
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.portfolio-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.portfolio-tags span {
    background: var(--bg-card);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    border: 1px solid var(--border-color);
}

/* ===== 关于我们 ===== */
.about {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-dark) 100%);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-intro {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-align: center;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
}

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

.about-skills h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.skills-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.skills-tags span {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.skills-tags span:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== 联系我们 ===== */
.contact {
    background: var(--bg-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 18px;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-detail {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.contact-form-wrapper {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-links {
    display: flex;
    gap: 25px;
}

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

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

/* ===== 悬浮按钮 ===== */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gradient-1);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s;
    z-index: 999;
    font-weight: 600;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        border-bottom: 1px solid var(--border-color);
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-advantages {
        flex-direction: column;
        align-items: center;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .floating-btn span:last-child {
        display: none;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 15px 40px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .contact-form-wrapper {
        padding: 25px;
    }

    .about-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 36px;
    }
}
