/* ============================================
   光辰通信科技 - 企业展示网站样式
   Optical Communication Enterprise Website
   ============================================ */

/* === CSS 变量 === */
:root {
    --bg-deep: #050816;
    --bg-dark: #0a0a1a;
    --primary-cyan: #00d4ff;
    --primary-blue: #0066ff;
    --accent-purple: #9d4edd;
    --accent-pink: #ff2d95;
    --text-white: #e8e8f0;
    --text-gray: #8892b0;
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.6);
    --glow-blue: 0 0 20px rgba(0, 102, 255, 0.6);
    --glow-purple: 0 0 20px rgba(157, 78, 221, 0.6);
    --card-bg: rgba(15, 20, 40, 0.85);
    --card-border: rgba(0, 212, 255, 0.15);
    --nav-height: 70px;
}

/* === 全局重置 === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-deep);
    color: var(--text-white);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* === 粒子背景 === */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === 光纤光线效果 === */
.fiber-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.fiber-line {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, 
        transparent 0%, 
        rgba(0, 212, 255, 0.3) 20%, 
        rgba(0, 212, 255, 0.6) 50%, 
        rgba(0, 212, 255, 0.3) 80%, 
        transparent 100%);
    animation: fiberPulse 3s ease-in-out infinite;
    filter: blur(1px);
}

.fiber-1 { left: 10%; animation-delay: 0s; }
.fiber-2 { left: 25%; animation-delay: 0.8s; width: 1px; }
.fiber-3 { left: 50%; animation-delay: 1.6s; }
.fiber-4 { left: 75%; animation-delay: 2.4s; width: 1px; }
.fiber-5 { left: 90%; animation-delay: 3.2s; }

@keyframes fiberPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}

/* === 主导航 === */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(5, 8, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(5, 8, 22, 0.95);
    box-shadow: 0 4px 30px rgba(0, 212, 255, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Logo */
.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo-svg {
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    transition: filter 0.3s;
}

.nav-logo:hover .logo-svg {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item:hover {
    color: #fff;
    transform: translateY(-2px);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(157, 78, 221, 0.2));
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.nav-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--accent-purple));
    transition: width 0.4s ease;
    border-radius: 1px;
}

.nav-item:hover .nav-glow,
.nav-item.active .nav-glow {
    width: 60%;
}

.nav-icon {
    font-size: 16px;
    transition: transform 0.3s;
}

.nav-item:hover .nav-icon {
    transform: scale(1.3) rotate(10deg);
}

.nav-label {
    position: relative;
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--primary-cyan);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === 主内容区 === */
.main-content {
    position: relative;
    z-index: 1;
    padding-top: var(--nav-height);
    min-height: calc(100vh - 300px);
}

/* === 英雄区域 === */
.hero-section {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple), var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: titleFloat 3s ease-in-out infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.4));
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === 霓虹按钮 === */
.btn-neon {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 102, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-neon:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6), 0 0 60px rgba(0, 102, 255, 0.3);
}

.btn-neon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: btnShine 3s infinite;
}

@keyframes btnShine {
    0% { left: -50%; }
    100% { left: 150%; }
}

.btn-neon-outline {
    display: inline-block;
    padding: 14px 36px;
    background: transparent;
    color: var(--primary-cyan);
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(0, 212, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-neon-outline:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-3px);
}

/* === 区块标题 === */
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--accent-purple));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* === 特性卡片 === */
.features-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--accent-purple));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    animation: iconBounce 2s ease-in-out infinite;
}

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

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #fff;
}

.feature-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === 产品网格 === */
.products-section,
.news-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.15);
}

.product-card.featured {
    border-color: rgba(157, 78, 221, 0.3);
}

.product-card.featured::after {
    content: '推荐';
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(157, 78, 221, 0.4); }
    50% { box-shadow: 0 0 20px rgba(157, 78, 221, 0.8); }
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(157, 78, 221, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
    overflow: hidden;
}

.product-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.05) 50%, transparent 70%);
    animation: cardShine 4s infinite;
}

@keyframes cardShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.product-info {
    padding: 25px;
}

.product-category {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-cyan);
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 12px;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #fff;
}

.product-info .product-summary {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-features span {
    padding: 4px 10px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-gray);
}

/* === 产品分类筛选 === */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.cat-btn {
    padding: 8px 24px;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--text-gray);
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cat-btn:hover,
.cat-btn.active {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--primary-cyan);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

/* === 新闻列表 === */
.news-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.news-date {
    color: var(--primary-cyan);
    font-size: 13px;
    margin-bottom: 8px;
}

.news-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #fff;
    transition: color 0.3s;
}

.news-card:hover h3 {
    color: var(--primary-cyan);
}

.news-summary {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* === 关于我们 === */
.about-section,
.contact-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: start;
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.9;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

/* === 联系我们 === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    padding: 20px 25px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-gray);
    transition: all 0.3s;
}

.contact-item:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

.contact-item strong {
    color: var(--primary-cyan);
    display: inline-block;
    margin-right: 8px;
}

.contact-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 35px;
}

.contact-form h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: #fff;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    width: 100%;
}

/* === 页脚 === */
.site-footer {
    position: relative;
    z-index: 1;
    background: rgba(5, 8, 22, 0.95);
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    padding: 50px 20px 20px;
    margin-top: 60px;
}

.footer-glow-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-cyan), var(--accent-purple), transparent);
    margin-bottom: 40px;
    animation: glowLine 3s ease-in-out infinite;
}

@keyframes glowLine {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-col h4 {
    color: var(--primary-cyan);
    margin-bottom: 15px;
}

.footer-col p, .footer-col a {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 2;
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-gray);
    font-size: 0.85rem;
}

/* === 动画关键帧 === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* === 响应式 === */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-title { font-size: 1.6rem; }

    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(5, 8, 22, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 30px 30px;
        gap: 10px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(0, 212, 255, 0.1);
    }

    .nav-menu.open { right: 0; }

    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

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

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

/* === 滚动条 === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-cyan), var(--accent-purple));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-cyan);
}

/* === Toast === */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 16px 28px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.5s forwards;
}

.toast-success {
    background: linear-gradient(135deg, rgba(0, 212, 100, 0.9), rgba(0, 180, 80, 0.9));
    box-shadow: 0 4px 20px rgba(0, 212, 100, 0.3);
}

.toast-error {
    background: linear-gradient(135deg, rgba(255, 45, 85, 0.9), rgba(200, 30, 60, 0.9));
    box-shadow: 0 4px 20px rgba(255, 45, 85, 0.3);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}
