/* --- 全局变量与重置 --- */
:root {
    --primary-color: #007BFF;
    --secondary-color: #2C3E50;
    --accent-color: #E74C3C;
    --background-dark: #121212;
    --background-medium: #1E1E1E;
    --background-light: #2D2D2D;
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --border-radius: 8px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 通用标题样式 --- */
.tech-title {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

.tech-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* --- 通用按钮样式 --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    margin: 5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

/* --- 头部 --- */
.tech-header {
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tech-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--accent-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

nav a:hover {
    color: var(--text-primary);
    background: var(--background-light);
}

.mobile-menu-btn {
    display: none;
    background: var(--background-light);
    border: 1px solid var(--primary-color);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--primary-color);
}

/* --- Hero Section --- */
.tech-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tech-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background-dark), var(--secondary-color)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)" /></svg>');
    background-size: cover;
    background-position: center;
    z-index: -1;
    animation: zoomIn 20s infinite alternate;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.tech-hero-content {
    text-align: center;
    z-index: 1;
    max-width: 800px;
}

.tech-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(90deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tech-highlight {
    color: var(--primary-color);
    font-weight: bold;
}

.tech-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tech-hero-buttons {
    margin-bottom: 2rem;
}

.tech-contact-info {
    font-size: 1rem;
    color: var(--text-secondary);
}

.tech-contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

/* --- Sections --- */
.tech-services, .tech-about, .tech-projects, .tech-contact {
    padding: 6rem 0;
}

.tech-services {
    background-color: var(--background-medium);
}

.tech-about {
    background-color: var(--background-dark);
}

.tech-projects {
    background-color: var(--background-medium);
}

.tech-contact {
    background-color: var(--background-dark);
}

/* --- Cards --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
    padding: 0 10px;
}

.tech-service-card, .tech-project-card {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.tech-service-card:hover, .tech-project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

.tech-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.tech-service-card h3, .tech-project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tech-service-card p, .tech-project-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- About Section --- */
.tech-about-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.tech-about-text h2 {
    margin-bottom: 1.5rem;
}

.tech-about-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.tech-about-image {
    position: relative;
    height: 300px;
    background: linear-gradient(45deg, var(--secondary-color), var(--background-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tech-glow-effect {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.3;
    z-index: 0;
}

/* --- 新的科技感内容占位符 --- */
.tech-content-placeholder {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    /* 使用伪元素创建动态网格背景 */
    background: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; /* 网格大小 */
    /* 应用模糊滤镜，使其看起来像一个柔和的底层图案 */
    filter: blur(1px);
}

/* 使用::before伪元素在网格之上创建一个动态的、流动的光效 */
.tech-content-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-color),
        var(--accent-color),
        transparent
    );
    /* 动画让光效旋转，模拟数据流 */
    animation: rotateGradient 8s linear infinite;
    opacity: 0.3;
    z-index: -1;
}

/* 定义旋转动画 */
@keyframes rotateGradient {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 为文字添加一个半透明的背景，使其在复杂背景下依然清晰 */
.tech-content-placeholder > div {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px); /* 轻微的毛玻璃效果 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


/* --- Project Section --- */
.tech-project-image {
    height: 180px;
    background: linear-gradient(45deg, var(--secondary-color), var(--background-light));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.tech-project-card:hover .tech-overlay {
    opacity: 1;
}

.tech-project-content {
    padding: 1.5rem;
}

/* --- Contact Section --- */
#wjx-questionnaire-container {
    background: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

#wjx-questionnaire-container iframe {
    width: 100%;
    min-height: 500px;
    border: none;
}

.tech-contact-info {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.tech-contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

/* --- Footer --- */
.tech-footer {
    background: var(--background-medium);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255,255, 255, 0.1);
}

.tech-footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.tech-footer h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.tech-footer ul {
    list-style: none;
}

.tech-footer li {
    margin-bottom: 0.5rem;
}

.tech-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-footer a:hover {
    color: var(--primary-color);
}

.tech-copyright {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tech-copyright a {
    color: var(--text-secondary);
    text-decoration: none;
}

.tech-copyright a:hover {
    color: var(--primary-color);
}

/* --- 响应式设计 --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: absolute;
        right: 15px;
        top: 1rem;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 250px;
        background: var(--background-medium);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        z-index: 999;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        border: 1px solid rgba(255,255,255,0.1);
    }

    nav.active ul {
        display: flex;
    }

    nav ul a {
        padding: 0.8rem;
        border-radius: var(--border-radius);
        justify-content: flex-start;
    }

    .tech-hero-title {
        font-size: 2.5rem;
    }

    .tech-about-content {
        flex-direction: column;
    }

    .tech-service-card, .tech-project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .tech-hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .tech-service-card, .tech-project-card {
        padding: 1.2rem;
    }
}