:root {
    --primary-color: #3498db;
    --primary-light: #5dade2;
    --primary-dark: #1a5276;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --mc-color: #4CAF50;
    --build-color: #9C27B0;
    --computer-color: #FF9800;
    --optimize-color: #E91E63;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #777;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --card-radius: 16px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局动画定义 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏样式 */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: var(--transition);
}

.logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.logo h2::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--primary-color);
    opacity: 0.2;
    z-index: -1;
    transition: var(--transition);
}

.logo h2:hover::after {
    height: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.hamburger {
    width: 30px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* 英雄区域样式 */
.hero {
    padding: 180px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: var(--mc-color);
    top: 60%;
    right: 10%;
    animation: float 8s ease-in-out infinite 1s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: var(--build-color);
    bottom: 20%;
    left: 20%;
    animation: float 7s ease-in-out infinite 0.5s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: var(--computer-color);
    top: 30%;
    right: 20%;
    animation: float 9s ease-in-out infinite 1.5s;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 30px;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--secondary-color), #34495e);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-light);
}

.highlight {
    color: var(--accent-color) !important;
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.btn:hover::before {
    width: 100%;
}

.qq-btn {
    background: linear-gradient(135deg, #12b7f5 0%, #0e9bd4 100%);
    box-shadow: 0 5px 15px rgba(18, 183, 245, 0.3);
}

.qq-btn::before {
    background: linear-gradient(135deg, #0e9bd4 0%, #12b7f5 100%);
}

.qq-btn:hover {
    box-shadow: 0 8px 20px rgba(18, 183, 245, 0.4);
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.hero-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.hero-image:hover img {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0.1;
    border-radius: 10px;
    z-index: -1;
}

/* 服务区域样式 */
.services {
    padding: 100px 0;
    background-color: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--secondary-color);
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    padding: 40px 30px;
    border-radius: var(--card-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:nth-child(1)::before,
.service-card:nth-child(2)::before { 
    background: var(--primary-color); 
}
.service-card:nth-child(3)::before { background: var(--mc-color); }
.service-card:nth-child(4)::before { background: var(--build-color); }
.service-card:nth-child(5)::before { background: var(--computer-color); }
.service-card:nth-child(6)::before { background: var(--optimize-color); }

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.service-card.mc:hover {
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.service-card.build:hover {
    box-shadow: 0 10px 30px rgba(156, 39, 176, 0.2);
}

.service-card.computer:hover {
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.2);
}

.service-card.optimize:hover {
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.2);
}

.service-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card.mc .service-icon i {
    color: var(--mc-color);
}

.service-card.build .service-icon i {
    color: var(--build-color);
}

.service-card.computer .service-icon i {
    color: var(--computer-color);
}

.service-card.optimize .service-icon i {
    color: var(--optimize-color);
}

.service-card:hover .service-icon i {
    color: white;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.5rem;
    transition: var(--transition);
}

.service-card:hover h3 {
    color: var(--primary-dark);
}

.service-card p {
    color: var(--text-light);
    transition: var(--transition);
}

.service-card:hover p {
    color: var(--text-color);
}

.service-hover-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: var(--card-radius);
}

.service-hover-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.service-card:hover .service-hover-effect::after {
    transform: translate(-50%, -50%) scale(20);
    opacity: 1;
}

/* 技能区域样式 */
.skills {
    padding: 100px 0;
    background-color: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.skills-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.skill {
    margin-bottom: 35px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.skill-header h3 {
    color: var(--secondary-color);
    font-weight: 600;
}

.skill-percent {
    color: var(--primary-color);
    font-weight: 600;
}

.skill-bar {
    background-color: #e0e0e0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.skill-level {
    height: 100%;
    background: var(--gradient);
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

.skill-level::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.skill-level.mc {
    background: linear-gradient(135deg, var(--mc-color) 0%, #2E7D32 100%);
}

.skill-level.build {
    background: linear-gradient(135deg, var(--build-color) 0%, #6A1B9A 100%);
}

.skill-level.computer {
    background: linear-gradient(135deg, var(--computer-color) 0%, #EF6C00 100%);
}

.skill-level.optimize {
    background: linear-gradient(135deg, var(--optimize-color) 0%, #AD1457 100%);
}

/* 项目区域样式 */
.projects {
    padding: 100px 0;
    background-color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    background: white;
    color: var(--primary-color);
}

.project-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-weight: 600;
}

.project-info p {
    color: var(--text-light);
    margin-top: auto;
    margin-bottom: 15px;
}

/* 友情链接区域样式 */
.friend-links {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.friend-link {
    display: block;
    background-color: white;
    padding: 25px 20px;
    border-radius: var(--card-radius);
    text-decoration: none;
    color: var(--dark-color);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.friend-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.friend-link:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

.friend-link:hover::after {
    left: 100%;
}

/* 联系区域样式 */
.contact {
    padding: 100px 0;
    background-color: white;
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    text-align: center;
    max-width: 650px;
    width: 100%;
    padding: 40px;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    background: white;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.contact-details {
    margin-top: 30px;
}

.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.contact-details i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
}

.social-links a {
    display: inline-block;
    color: white;
    margin-left: 15px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-light);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

/* 动画类 */
.animate-on-scroll {
    opacity: 0;
    transition: var(--transition);
}

.animate-on-scroll.animated {
    opacity: 1;
    animation: fadeInUp 0.6s ease forwards;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .services-grid, .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .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 {
        padding: 150px 0 80px;
    }
    
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    footer .container {
        flex-direction: column;
    }
    
    .social-links {
        margin-top: 20px;
    }
    
    .contact-details p {
        justify-content: center;
    }
    
    .service-card, .project-card {
        padding: 30px 20px;
    }
    
    .contact-info {
        padding: 30px 20px;
    }
    
    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 15px 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon i {
        font-size: 2rem;
    }
}
/* 新增样式 */

/* 加载指示器 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-color);
    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;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(52, 152, 219, 0.2);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* 跳过导航链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* 项目区域增强样式 */
.project-card .project-info {
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.project-card:hover .project-info {
    background: rgba(255, 255, 255, 0.95);
}

/* 增强服务卡片悬停效果 */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
    border-radius: var(--card-radius);
}

.service-card:hover::after {
    opacity: 0.05;
}

/* 响应式图片优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 增强移动端导航 */
@media (max-width: 768px) {
    .nav-links {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .service-card, .project-card {
        margin-bottom: 20px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* 打印样式 */
@media print {
    .back-to-top,
    .menu-toggle,
    .hero-buttons,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .service-card, .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}