/* 全局样式 */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #f9fafb;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 基础样式 */
body {
    background: radial-gradient(ellipse at center, rgba(10, 20, 40, 1) 0%, rgba(5, 10, 25, 1) 70%, rgba(2, 5, 15, 1) 100%);
    color: #a9e0ff;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    letter-spacing: 0.5px;
    overflow-x: hidden;
    position: relative;
}

/* 星空背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(1px 1px at 25% 35%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(1.5px 1.5px at 75% 30%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(2px 2px at 20% 80%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(2.5px 2.5px at 40% 10%, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(1px 1px at 90% 70%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 50%),
        radial-gradient(1.5px 1.5px at 10% 20%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 50%);
    background-size: 550px 550px;
    animation: stars-drift 150s linear infinite;
    opacity: 0.5;
}

@keyframes stars-drift {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 550px 550px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 20, 40, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #00c2ff, #0088ff);
    border-radius: 4px;
    border: 1px solid rgba(0, 150, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #00e5ff, #0099ff);
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 英雄区域样式 */
.hero {
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    background-image: url('Banner.png');
    background-size: cover;
    background-position: center;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(5, 15, 30, 0.7), rgba(10, 20, 40, 0.9));
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 联系区域样式 */
.contact-section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 4rem; /* 显著扩大上下间距 */
    column-gap: 2rem;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 联系卡片样式 */
.contact-card {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 1rem;
    min-height: 300px;
}

.contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card-inner {
    background: rgba(10, 25, 50, 0.7);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.2);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 150, 255, 0.3);
    position: relative;
    overflow: hidden;
    padding: 2rem;
    text-align: center;
    min-height: 320px; /* 统一卡片高度，避免错层重叠感 */
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00c2ff, transparent);
    animation: scanline 3s infinite linear;
}

.card-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0088ff, transparent);
    animation: scanline 3s infinite linear 1.5s;
}

@keyframes scanline {
    0% {
        left: -100%;
        right: auto;
    }
    45% {
        left: 100%;
        right: auto;
    }
    55% {
        left: auto;
        right: -100%;
    }
    100% {
        left: auto;
        right: 100%;
    }
}

.contact-card:hover .card-inner {
    transform: translateY(-6px); /* 减小上移，避免与上一行重叠 */
    box-shadow: 0 15px 30px rgba(0, 150, 255, 0.4);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 50, 100, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
    border: 1px solid rgba(0, 150, 255, 0.3);
    transition: all 0.3s ease;
}

.contact-card:hover .icon-wrapper {
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.5);
    transform: scale(1.1);
}

.contact-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.contact-icon-fa {
    font-size: 2rem;
    color: #00c2ff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

.contact-card p {
    margin-bottom: 1.5rem;
    color: #a9e0ff;
    flex-grow: 1;
}

.contact-btn {
    background: linear-gradient(90deg, #005599, #0088ff);
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 0.75rem 1.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.3);
    outline: none;
    text-align: center;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #0066cc, #00c2ff, #0066cc);
    z-index: -1;
    border-radius: 5px;
    background-size: 400%;
    animation: glowing 20s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.contact-btn:hover::before {
    opacity: 1;
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 150, 255, 0.3);
    color: #ffffff;
}

@keyframes glowing {
    0% { background-position: 0 0; }
    50% { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

/* 页脚样式 */
footer {
    background: rgba(5, 15, 30, 0.8);
    color: #a9e0ff;
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(0, 150, 255, 0.2);
    margin-top: 3rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.5), transparent);
    transform: translateY(-1px);
}

footer a {
    color: #00c2ff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    position: relative;
}

footer a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00c2ff, transparent);
    transition: all 0.3s ease;
}

footer a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
}

footer a:hover::before {
    width: 100%;
}

.footer-links {
    margin-top: 1rem;
}

/* 返回顶部按钮 */
#backToTop {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.5);
    border: 1px solid rgba(0, 150, 255, 0.3);
    transition: transform 0.3s ease, opacity 0.2s ease;
    opacity: 0; /* 默认隐藏 */
    transform: translateY(100px);
    animation: float-btn 3s ease-in-out infinite;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    pointer-events: none; /* 隐藏时不可点 */
}

#backToTop.show {
    opacity: 0.9;
    transform: translateY(0);
    pointer-events: auto;
}

#backToTop:hover {
    opacity: 1;
    transform: translateY(0) scale(1.1);
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.7);
}

@keyframes float-btn {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.contact-card {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    will-change: transform; /* 提升合成层，避免动画期间错位 */
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.3s; }
.contact-card:nth-child(3) { animation-delay: 0.5s; } 

/* 星际科技辉光文字 */
.glow-text {
    color: #ffffff;
    text-shadow: 0 0 10px #00aeff, 0 0 20px #0077ff, 0 0 30px #0055ff;
    animation: pulsate 2s infinite alternate;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
    font-weight: 700;
}

@keyframes pulsate {
    0% {
        text-shadow: 0 0 10px #00aeff, 0 0 20px #0077ff, 0 0 30px #0055ff;
    }
    100% {
        text-shadow: 0 0 20px #00c2ff, 0 0 30px #0088ff, 0 0 40px #0066ff;
    }
}

/* 导航栏样式 */
nav {
    background: rgba(5, 15, 30, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 150, 255, 0.3);
    position: fixed;
    width: 100%;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

nav .logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
    position: relative;
    padding-left: 15px;
    text-decoration: none;
}

nav .logo::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: linear-gradient(to bottom, #00c2ff, #0066cc);
    box-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #a9e0ff;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    position: relative;
    background: transparent;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00c2ff, transparent);
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
}

nav ul li a:hover::before, nav ul li a.active::before {
    width: 80%;
} 

/* 响应式样式 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 3rem;
        column-gap: 1.5rem;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        padding: 0.5rem 1rem;
    }
    
    nav .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li a {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .hero {
        padding-top: 150px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        row-gap: 2.75rem;
        column-gap: 1.25rem;
        align-items: stretch;
    }
    
    .card-inner {
        padding: 1.8rem;
    }
    
    .contact-card {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .card-inner {
        padding: 1.4rem;
        min-height: 260px;
    }
    
    .icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .contact-icon, .contact-icon-fa {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .contact-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    #backToTop {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
    
    /* 显示汉堡菜单按钮 */
    .mobile-menu-btn {
        display: block !important;
    }
    
    /* 隐藏桌面端导航菜单 */
    .desktop-nav {
        display: none !important;
    }
    
    nav .container {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}

/* 汉堡菜单按钮样式 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #00c2ff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: #ffffff;
}

/* 移动端导航菜单样式 */
.mobile-nav {
    background: rgba(5, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 150, 255, 0.3);
    padding: 1rem 0;
}

.mobile-nav ul {
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-nav ul li {
    margin: 0;
}

.mobile-nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #a9e0ff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav ul li a:hover,
.mobile-nav ul li a.active {
    background: rgba(0, 194, 255, 0.1);
    color: #00c2ff;
    border-left: 3px solid #00c2ff;
}

/* 隐藏类 */
.hidden {
    display: none !important;
} 