/* YCZNWL 融合网关 - 2025年液态玻璃主题 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 2025年液态玻璃色彩系统 */
    --glass-primary: rgba(6, 182, 212, 0.15);
    --glass-secondary: rgba(59, 130, 246, 0.12);
    --glass-accent: rgba(168, 85, 247, 0.1);
    --glass-surface: rgba(15, 23, 42, 0.8);
    --glass-surface-light: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(148, 163, 184, 0.2);
    --glass-glow: rgba(6, 182, 212, 0.4);
    
    /* 文字颜色 */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: #06b6d4;
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #06b6d4, #3b82f6, #a855f7);
    --gradient-surface: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    
    /* 阴影 */
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 50px rgba(6, 182, 212, 0.3);
    --shadow-deep: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* 全局样式 */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0f172a;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 液态背景动画 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    z-index: -2;
    animation: liquidFlow 20s ease-in-out infinite;
}

@keyframes liquidFlow {
    0%, 100% { 
        background: 
            radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 40% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
            linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    }
    33% { 
        background: 
            radial-gradient(circle at 70% 20%, rgba(6, 182, 212, 0.18) 0%, transparent 50%),
            radial-gradient(circle at 30% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 40%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
            linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    }
    66% { 
        background: 
            radial-gradient(circle at 50% 70%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 90% 30%, rgba(59, 130, 246, 0.18) 0%, transparent 50%),
            radial-gradient(circle at 20% 60%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
            linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    }
}

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

/* 液态玻璃卡片 */
.glass-card {
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glass), var(--shadow-glow);
    border-color: rgba(6, 182, 212, 0.4);
}

/* 液态按钮 */
.liquid-btn {
    position: relative;
    padding: 12px 32px;
    background: var(--gradient-glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.liquid-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.liquid-btn:hover::before {
    left: 0;
}

.liquid-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: transparent;
}

/* 文字渐变 */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 浮动粒子效果 */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(6, 182, 212, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(2n) {
    background: rgba(59, 130, 246, 0.6);
    animation-delay: -2s;
}

.particle:nth-child(3n) {
    background: rgba(168, 85, 247, 0.6);
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) rotate(180deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .glass-card {
        border-radius: 16px;
    }
    
    .liquid-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

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

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0891b2, #2563eb, #9333ea);
}

/* 选择文本样式 */
::selection {
    background: rgba(6, 182, 212, 0.3);
    color: var(--text-primary);
}

/* 焦点样式 */
*:focus {
    outline: 2px solid rgba(6, 182, 212, 0.5);
    outline-offset: 2px;
}

/* 加载动画 */
.loading {
    opacity: 0.7;
    pointer-events: none;
    filter: blur(1px);
}

/* 淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* 延迟动画 */
.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero区域 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    position: relative;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-products {
    position: relative;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.product-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.4s ease;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.product-label {
    color: var(--text-accent);
    font-weight: 500;
    font-size: 0.875rem;
}

/* 产品展示 */
.products {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* 产品展示区域 */
.product-main-section {
    margin-bottom: 4rem;
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
    align-items: center;
}

.product-section {
    margin-bottom: 3rem;
}

.product-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
    align-items: center;
}

.product-card:nth-child(even) .product-visual {
    order: 2;
}

.product-card:nth-child(even) .product-info {
    order: 1;
}

.product-visual {
    position: relative;
    text-align: center;
}

.main-product-image {
    width: 100%;
    height: auto;
    max-width: 400px;
    margin: 0 auto;
    display: block;
    transition: transform 0.4s ease;
}

.main-product-image:hover {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-accent);
}

.product-name {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-subtitle {
    font-size: 1.25rem;
    color: var(--text-accent);
    font-weight: 600;
}

.product-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.product-features {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--glass-surface-light);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--glass-primary);
    transform: translateX(8px);
}

.feature-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.feature-item span {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.875rem;
}

.product-actions {
    margin-top: 2rem;
}

/* 平台支持 */
.platform-support {
    text-align: center;
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.platform-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.platform-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.platform-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.platform-item:hover {
    transform: translateY(-4px);
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    margin-bottom: 0.5rem;
}

.platform-icon.knx {
    background: #4CAF50;
}

.platform-icon.matter {
    background: #6B46C1;
}

.platform-icon.homeassistant {
    background: #18BCF2;
    font-size: 1.5rem;
}

.platform-icon.nodered {
    background: #8F0000;
}

.platform-icon.mqtt {
    background: #FF6B35;
    font-size: 1.5rem;
}

.platform-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* 特性区域 */
.features {
    padding: 6rem 0;
    background: var(--glass-surface);
}

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

.feature-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    border-radius: 16px;
    color: var(--text-accent);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 联系我们 */
.contact {
    padding: 6rem 0;
}

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

.contact-card {
    padding: 2rem;
    text-align: center;
    transition: transform 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
}

.contact-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-primary);
    border-radius: 16px;
    color: var(--text-accent);
}

.contact-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.contact-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 0.5rem;
}

.contact-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 页脚 */
.footer {
    padding: 3rem 0;
    background: var(--glass-surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

.footer-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-info {
    text-align: right;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.powered {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .product-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .product-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .product-card:nth-child(even) .product-visual {
        order: 1;
    }

    .product-card:nth-child(even) .product-info {
        order: 2;
    }

    .hero-title {
        font-size: 3rem;
    }

    .platform-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-info {
        text-align: center;
    }

    .glass-card {
        border-radius: 16px;
    }

    .liquid-btn {
        padding: 10px 24px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .product-main {
        padding: 2rem;
    }

    .detail-card {
        padding: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .connection-grid {
        grid-template-columns: 1fr;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --glass-border: rgba(255, 255, 255, 0.5);
        --text-secondary: #e2e8f0;
        --text-muted: #cbd5e1;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-particles {
        display: none;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .floating-particles,
    .liquid-btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }

    .gradient-text {
        -webkit-text-fill-color: black;
        background: none;
    }
}
