/* =========================================
   全局变量与基础设置 (Variables & Base)
========================================= */
:root {
    /* 颜色系统 */
    --bg-color: #050505;
    --bg-glass: rgba(20, 20, 25, 0.6);
    --bg-glass-hover: rgba(30, 30, 40, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    
    /* 渐变与强调色 */
    --accent-1: #8a2be2; /* 蓝紫 */
    --accent-2: #00ffff; /* 青绿 */
    --accent-3: #ff00ff; /* 洋红 */
    --gradient-primary: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --gradient-text: linear-gradient(to right, #00ffff, #8a2be2, #ff00ff);
    
    /* 边框与阴影 */
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px rgba(138, 43, 226, 0.4);
    
    /* 排版 */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   排版与通用组件 (Typography & Utilities)
========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
}

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

/* 渐变文字 */
.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* 玻璃拟物化卡片 */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--border-glass);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-glass);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    background: var(--bg-glass-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* =========================================
   导航栏 (Navbar)
========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    padding: 1rem 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-2);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

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

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

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

.hamburger span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* =========================================
   首屏 (Hero Section)
========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(138,43,226,0.3) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    animation: float 10s ease-in-out infinite alternate;
}

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

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

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

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.visual-card {
    position: relative;
    padding: 1rem;
    border-radius: 2rem;
    width: 100%;
    max-width: 500px;
}

.hero-image {
    width: 100%;
    border-radius: 1.5rem;
    display: block;
}

.floating-badge {
    position: absolute;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: float-badge 4s ease-in-out infinite alternate;
}

.badge-1 {
    top: -20px;
    left: -30px;
}

.badge-2 {
    bottom: -20px;
    right: -30px;
    animation-delay: 1s;
}

@keyframes float-badge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

/* =========================================
   服务项目 (Services Section)
========================================= */
.services {
    padding: 8rem 0;
    position: relative;
}

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

.service-card {
    padding: 2.5rem 2rem;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =========================================
   案例展示 (Portfolio Section)
========================================= */
.portfolio {
    padding: 8rem 0;
    background: rgba(10, 10, 15, 0.5);
}

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

.portfolio-item {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-image {
    width: 100%;
    height: 250px;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: -40px;
    position: relative;
    z-index: 1;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a24, #2a2a35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .placeholder-img {
    transform: scale(1.05);
}

.portfolio-info {
    position: relative;
    z-index: 2;
    margin: 0 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 30, 40, 0.85); /* 覆盖原本的glass-card背景，使其更突出 */
}

.portfolio-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.portfolio-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* =========================================
   客户评价 (Testimonials)
========================================= */
.testimonials {
    padding: 8rem 0;
}

.testimonials-slider {
    display: flex;
    justify-content: center;
}

.testimonial-card {
    max-width: 800px;
    padding: 3rem;
    text-align: center;
}

.quote {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: #e0e0e0;
}

.client-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.client-info h4 {
    margin-bottom: 0;
    font-size: 1rem;
}

.client-info span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* =========================================
   联系我们 (Contact Section)
========================================= */
.contact {
    padding: 8rem 0;
    background: radial-gradient(circle at center, rgba(0,255,255,0.05) 0%, rgba(0,0,0,0) 70%);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
}

.contact-info ul {
    list-style: none;
    margin-top: 2rem;
}

.contact-info li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.8rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-2);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form select {
    appearance: none;
    cursor: pointer;
}

.contact-form select option {
    background: var(--bg-color);
    color: #fff;
}

/* =========================================
   页脚 (Footer)
========================================= */
.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4rem;
}

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

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-links {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* =========================================
   动画与响应式 (Animations & Responsive)
========================================= */
/* 滚动入场动画类 */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* 响应式设计 */
@media screen and (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 4rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .nav-links, .nav-cta {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    /* 移动端菜单激活状态 */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}
