/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* CSS变量定义 */
:root {
    --primary-color: #00d4ff;
    --secondary-color: #0066ff;
    --accent-color: #ff00ff;
    --dark-bg: #0a0a0a;
    --light-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --gradient-1: linear-gradient(135deg, #00d4ff 0%, #0066ff 50%, #ff00ff 100%);
    --gradient-2: linear-gradient(45deg, #00d4ff, #0066ff);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.5);
    --shadow-glow-hover: 0 0 30px rgba(0, 212, 255, 0.8);
}

/* 基础字体和动画 */
body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 科技字体 */
.font-tech {
    font-family: 'Orbitron', monospace;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

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

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

.nav-logo i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

.nav-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
    font-family: 'Orbitron', monospace;
}

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

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

.nav-link:hover {
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.9);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(255, 0, 255, 0.9);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

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

/* 英雄区域 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
}

/* 粒子背景 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent);
    background-size: 200px 200px;
    animation: particleFloat 20s linear infinite;
    opacity: 0.3;
}

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

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

/* 故障效果 */
.glitch {
    position: relative;
    color: var(--primary-color);
    text-shadow: 
        0 0 10px rgba(0, 212, 255, 0.8),
        0 0 20px rgba(0, 212, 255, 0.6),
        0 0 30px rgba(0, 212, 255, 0.4);
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--accent-color);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--secondary-color);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-5px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(5px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-3px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(3px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(5px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-5px); }
    60% { clip-path: inset(30% 0 40% 0); transform: translate(3px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(-3px); }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

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

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-48%);
    z-index: 2;
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    position: relative;
    animation: bounce 2s infinite;
}

.scroll-wheel {
    width: 6px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 3px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

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

@keyframes scrollWheel {
    0% { opacity: 1; top: 10px; }
    100% { opacity: 0; top: 30px; }
}

/* 通用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 区块标题 */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* 通用区块样式 */
section {
    padding: 6rem 0;
    position: relative;
}

/* 服务区域 */
.services {
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--light-bg) 50%, var(--dark-bg) 100%);
}

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

.service-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.service-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
}

.service-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    text-align: left;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

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

/* 作品集区域 */
.portfolio {
    background: var(--dark-bg);
}

.portfolio-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 2px solid rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

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

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--light-bg);
    height: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 0, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="none" stroke="rgba(0,212,255,0.2)" stroke-width="0.5" x="10" y="10" width="80" height="80"/><rect fill="none" stroke="rgba(255,0,255,0.2)" stroke-width="0.5" x="20" y="20" width="60" height="60"/></svg>');
    background-size: 50px 50px;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    text-align: center;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}

.portfolio-content h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.portfolio-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-tags span {
    padding: 0.3rem 0.8rem;
    background: var(--gradient-1);
    border-radius: 15px;
    font-size: 0.8rem;
    color: white;
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

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

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

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.2);
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.tech-stack {
    margin-top: 2rem;
}

.tech-stack h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tech-icons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tech-icons i {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-icons i:hover {
    color: var(--primary-color);
    transform: scale(1.2) rotate(10deg);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-showcase {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.main-icon {
    font-size: 5rem;
    color: var(--primary-color);
    z-index: 3;
    animation: pulse 2s infinite;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
}

.code-lines {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.code-line {
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    margin: 8px 0;
    border-radius: 2px;
    opacity: 0.8;
    animation: codeGlow 3s infinite;
}

.code-line:nth-child(1) { animation-delay: 0s; width: 100px; }
.code-line:nth-child(2) { animation-delay: 0.5s; width: 140px; }
.code-line:nth-child(3) { animation-delay: 1s; width: 80px; }
.code-line:nth-child(4) { animation-delay: 1.5s; width: 120px; }
.code-line:nth-child(5) { animation-delay: 2s; width: 100px; }

@keyframes codeGlow {
    0%, 100% { 
        opacity: 0.3; 
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
    }
    50% { 
        opacity: 1; 
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
    }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.element {
    position: absolute;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
    animation: float 4s ease-in-out infinite;
    z-index: 1;
}

.element.html {
    top: 20%;
    right: 20%;
    color: #e34c26;
    border-color: rgba(227, 76, 38, 0.5);
    animation-delay: 0s;
}

.element.js {
    top: 60%;
    right: 25%;
    color: #f7df1e;
    border-color: rgba(247, 223, 30, 0.5);
    animation-delay: 1.3s;
}

.element.css {
    top: 40%;
    right: 15%;
    color: #1572b6;
    border-color: rgba(21, 114, 182, 0.5);
    animation-delay: 2.6s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) rotate(2deg); 
    }
    50% { 
        transform: translateY(-5px) rotate(-1deg); 
    }
    75% { 
        transform: translateY(-15px) rotate(1deg); 
    }
}

/* 技术展示背景动画 */
.tech-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
    animation: bgPulse 5s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tech-showcase {
        height: 300px;
    }
    
    .main-icon {
        font-size: 3.5rem;
    }
    
    .code-lines {
        left: 10px;
    }
    
    .code-line {
        width: 80px;
    }
    
    .code-line:nth-child(1) { width: 60px; }
    .code-line:nth-child(2) { width: 100px; }
    .code-line:nth-child(3) { width: 50px; }
    .code-line:nth-child(4) { width: 80px; }
    .code-line:nth-child(5) { width: 70px; }
    
    .element {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }
    
    .element.html {
        top: 15%;
        right: 10%;
    }
    
    .element.js {
        top: 55%;
        right: 15%;
    }
    
    .element.css {
        top: 35%;
        right: 5%;
    }
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 0, 255, 0.2));
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
}

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

/* 联系我们区域 */
.contact {
    background: var(--light-bg);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
    width: 100%;
}

.contact-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-text h3 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-text {
    flex: 1;
    min-width: 0;
}

.contact-text p {
    color: var(--text-secondary);
}

.qr-code {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0 0;
    transition: all 0.3s ease;
    background: white;
    display: block;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.4);
    border-color: var(--primary-color);
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    /* 确保图片完全填充，不留边距 */
    border: none;
    margin: 0;
    padding: 0;
    /* 强制图片覆盖整个容器 */
    position: absolute;
    top: 0;
    left: 0;
}

.qr-code:hover img {
    transform: scale(1.05);
}

.qr-placeholder {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(0, 212, 255, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.qr-placeholder p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
}

/* 表单样式 */
.contact-form {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 15px;
    padding: 2.5rem;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

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

/* 联系表单样式：将标签移至输入框左侧 */
.contact-form .form-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    min-width: 80px;
    text-align: left;
    white-space: nowrap;
}

/* 为textarea的form-group添加特殊样式，移除flex布局 */
.contact-form .form-group:nth-child(3) {
    display: block;
}

/* 响应式设计：在移动端设备上，将form-group改为垂直布局 */
@media (max-width: 768px) {
    .contact-form .form-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-label {
        min-width: auto;
        font-size: 0.9rem;
    }
    
    .form-group textarea {
        margin-left: 0;
    }
}

/* 优化只有三个字段的表单布局 */
.contact-form .form-group:first-child {
    margin-top: 0;
}

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

/* 确保表单字段布局正确 */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 10, 10, 0.8);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* 针对只有三个字段的表单优化 */
.form-group textarea {
    min-height: 120px;
    resize: vertical;
    margin-left: 0; /* 移除左侧边距，因为标签在输入框上方 */
    width: 100%; /* 让textarea宽度与输入框一致，与对话框两侧对齐 */
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

/* 联系表单按钮样式 */
.contact-form button {
    width: auto;
    margin: 0 auto;
    display: block;
    padding: 1rem 2rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-message.success {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    color: #00ff00;
}

.form-message.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4444;
}

/* 页脚 */
.footer {
    background: var(--dark-bg);
    border-top: 1px solid rgba(0, 212, 255, 0.3);
    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,
.footer-section h4 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p,
.footer-section li {
    color: var(--text-secondary);
    line-height: 1.8;
}

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

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

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

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

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

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient-1);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.2);
    color: var(--text-secondary);
}

/* 响应式设计 */
/* iPhone 15 Pro Max 优化 */
@media (max-width: 430px) {
    /* 导航栏优化 */
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-logo {
        font-size: 1.3rem;
        gap: 0.3rem;
    }
    
    .nav-logo i {
        font-size: 1.8rem;
    }
    
    /* 英雄区域优化 */
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-buttons {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* 技术展示优化 */
    .tech-showcase {
        height: 280px;
    }
    
    .main-icon {
        font-size: 3rem;
    }
    
    .element {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* 服务卡片优化 */
    .service-card {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }
    
    .service-icon {
        margin-bottom: 1rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
    
    /* 作品集优化 */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .portfolio-item {
        height: 250px;
    }
    
    .portfolio-content h3 {
        font-size: 1.2rem;
    }
    
    .portfolio-tags span {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* 联系表单优化 */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    /* 二维码优化 */
    .qr-code {
        width: 100px;
        height: 100px;
    }
    
    /* 统计数据优化 */
    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* 通用平板和手机优化 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(10, 10, 10, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu .nav-link {
        font-size: 1.2rem;
        padding: 1rem 0;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    }
    
    .nav-menu .nav-link:hover {
        transform: scale(1.05);
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

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

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tech-icons {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .qr-placeholder {
        margin: 0.5rem auto 0;
    }
    
    .qr-code {
        margin: 0.5rem 0 0;
        max-width: 100px;
        max-height: 100px;
    }
    
    .qr-code img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* 加载动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 表单提示样式 */
.form-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 5px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.5s ease;
}

.form-hint i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.form-hint span {
    font-weight: 400;
}

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

/* iPhone 15 Pro Max 特殊优化 */
@media screen and (device-width: 430px) and (device-height: 932px) and (-webkit-device-pixel-ratio: 3) {
    /* 安全区域适配 */
    body {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .navbar {
        height: calc(60px + env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
    }
    
    /* 动态岛适配 */
    .hero-title {
        padding-top: calc(env(safe-area-inset-top) + 20px);
    }
    
    /* 底部安全区域 */
    .footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
    
    /* 触摸优化 */
    .btn, .filter-btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }
    
    /* 字体渲染优化 */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    /* 滚动优化 */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* 导航菜单位置调整 */
    .nav-menu {
        top: calc(70px + env(safe-area-inset-top));
    }
}
