/* 透明线条和文字背景装饰 */

/* 主背景文字和线条图案 */
body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* 垂直和水平线条 */
        linear-gradient(90deg, rgba(0, 102, 204, 0.06) 1px, transparent 1px),
        linear-gradient(180deg, rgba(0, 102, 204, 0.06) 1px, transparent 1px),
        /* 对角线条 */
        linear-gradient(45deg, rgba(0, 102, 204, 0.04) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(0, 102, 204, 0.04) 1px, transparent 1px);
    background-size: 
        100px 100px,
        100px 100px,
        60px 60px,
        60px 60px;
    background-position:
        0 0,
        0 0,
        0 0,
        0 0;
    pointer-events: none;
    z-index: -2;
    animation: lines-drift 30s ease-in-out infinite;
}

/* 简化的背景文字层 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* 使用CSS生成的文字效果而不是SVG */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 200px,
            rgba(0, 102, 204, 0.02) 200px,
            rgba(0, 102, 204, 0.02) 202px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 150px,
            rgba(0, 102, 204, 0.015) 150px,
            rgba(0, 102, 204, 0.015) 152px
        );
    pointer-events: none;
    z-index: -1;
    animation: text-float 40s linear infinite;
}

/* 线条漂移动画 */
@keyframes lines-drift {
    0%, 100% { 
        background-position: 0 0, 0 0, 0 0, 0 0; 
    }
    50% { 
        background-position: 15px 15px, 15px 15px, 10px 10px, -10px 10px; 
    }
}

/* 文字漂移动画 */
@keyframes text-float {
    0% { 
        background-position: 0 0, 0 0; 
    }
    100% { 
        background-position: 200px 200px, -150px 150px; 
    }
}

/* 为特定区域添加文字装饰 */
.circuit-enhanced {
    position: relative;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

/* 移除hero后第一个section的顶部边框，避免黑边 */
.hero + .circuit-enhanced {
    border-top: none;
}

.circuit-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* 几何图案 */
        linear-gradient(30deg, transparent 48%, rgba(0, 102, 204, 0.03) 48%, rgba(0, 102, 204, 0.03) 52%, transparent 52%),
        linear-gradient(150deg, transparent 48%, rgba(0, 102, 204, 0.03) 48%, rgba(0, 102, 204, 0.03) 52%, transparent 52%),
        /* 点状装饰 */
        radial-gradient(circle at 25% 25%, rgba(0, 102, 204, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(0, 102, 204, 0.08) 1px, transparent 1px);
    background-size: 
        150px 150px,
        150px 150px,
        80px 80px,
        80px 80px;
    background-position:
        0 0,
        75px 75px,
        0 0,
        40px 40px;
    pointer-events: none;
    z-index: -1;
    animation: pattern-shift 25s ease-in-out infinite;
}

/* 添加实际的文字装饰 */
.circuit-enhanced::after {
    content: 'TECHNOLOGY SEMICONDUCTOR POWER MANAGEMENT IC SOLUTION INNOVATION QUALITY';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 12px;
    font-family: Arial, sans-serif;
    color: rgba(0, 102, 204, 0.03);
    line-height: 100px;
    word-spacing: 50px;
    transform: rotate(-15deg);
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    animation: text-scroll 50s linear infinite;
}

@keyframes text-scroll {
    0% { transform: rotate(-15deg) translateX(-100%); }
    100% { transform: rotate(-15deg) translateX(100%); }
}

@keyframes pattern-shift {
    0%, 100% { 
        background-position: 0 0, 75px 75px, 0 0, 40px 40px; 
    }
    50% { 
        background-position: 20px 20px, 95px 95px, 10px 10px, 50px 50px; 
    }
}

/* 页面头部装饰 - 仅针对非index页面 */
.page-header {
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(0, 102, 204, 0.1);
}

.page-header::after {
    content: 'ABOUT PRODUCTS CONTACT SOLUTIONS';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    font-size: 8px;
    font-family: Arial, sans-serif;
    color: rgba(255, 255, 255, 0.08);
    text-align: center;
    transform: translateY(-50%) rotate(-5deg);
    word-spacing: 30px;
    pointer-events: none;
    z-index: 1;
    animation: header-glow 6s ease-in-out infinite;
}

@keyframes header-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Hero区域装饰 */
.hero {
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* 几何线条 */
        linear-gradient(20deg, transparent 49%, rgba(0, 102, 204, 0.03) 49%, rgba(0, 102, 204, 0.03) 51%, transparent 51%),
        linear-gradient(160deg, transparent 49%, rgba(0, 102, 204, 0.03) 49%, rgba(0, 102, 204, 0.03) 51%, transparent 51%),
        /* 大圆点装饰 */
        radial-gradient(circle at 15% 85%, rgba(0, 102, 204, 0.05) 4px, transparent 4px),
        radial-gradient(circle at 85% 15%, rgba(0, 102, 204, 0.05) 4px, transparent 4px);
    background-size: 
        200px 200px,
        200px 200px,
        300px 300px,
        300px 300px;
    background-position:
        0 0,
        0 0,
        0 0,
        150px 150px;
    pointer-events: none;
    z-index: 0;
    animation: hero-move 35s ease-in-out infinite;
}

/* Hero文字装饰 */
.hero::after {
    content: 'POWER SOLUTION TECHNOLOGY SEMICONDUCTOR INNOVATION SYNIX';
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    font-size: 14px;
    font-family: Arial, sans-serif;
    color: rgba(0, 102, 204, 0.04);
    text-align: center;
    transform: rotate(-8deg);
    word-spacing: 40px;
    pointer-events: none;
    z-index: 0;
    animation: hero-text-float 60s linear infinite;
}

@keyframes hero-move {
    0%, 100% { 
        background-position: 0 0, 0 0, 0 0, 150px 150px; 
    }
    50% { 
        background-position: 30px 30px, -30px 30px, 20px 20px, 170px 170px; 
    }
}

@keyframes hero-text-float {
    0% { transform: rotate(-8deg) translateX(-100%); }
    100% { transform: rotate(-8deg) translateX(100%); }
}

/* Footer装饰 */
footer {
    position: relative;
    border-top: 2px solid rgba(0, 102, 204, 0.1);
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 
        50px 50px,
        50px 50px;
    pointer-events: none;
    z-index: 0;
}

footer::after {
    content: 'SYNIX TECHNOLOGY CONTACT SOLUTION QUALITY';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    font-size: 8px;
    font-family: Arial, sans-serif;
    color: rgba(255, 255, 255, 0.04);
    text-align: center;
    transform: translateY(-50%) rotate(3deg);
    word-spacing: 25px;
    pointer-events: none;
    z-index: 0;
}

/* 产品卡片装饰 */
.product-card,
.power-solution-item,
.feature-card {
    position: relative;
    border: 1px solid rgba(0, 102, 204, 0.08) !important;
    overflow: hidden;
}

.product-card::before,
.power-solution-item::before,
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(45deg, transparent 49%, rgba(0, 102, 204, 0.02) 49%, rgba(0, 102, 204, 0.02) 51%, transparent 51%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 204, 0.04) 2px, transparent 2px),
        radial-gradient(circle at 20% 80%, rgba(0, 102, 204, 0.04) 2px, transparent 2px);
    background-size: 40px 40px, 100px 100px, 100px 100px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before,
.power-solution-item:hover::before,
.feature-card:hover::before {
    opacity: 1;
    animation: card-glow 2s ease-in-out infinite;
}

/* 产品卡片文字装饰 */
.product-card:hover::after,
.power-solution-item:hover::after,
.feature-card:hover::after {
    content: 'IC POWER CHIP SOLUTION';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 6px;
    font-family: Arial, sans-serif;
    color: rgba(0, 102, 204, 0.03);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-10deg);
    word-spacing: 15px;
    pointer-events: none;
    z-index: 0;
    animation: card-text-fade 3s ease-in-out infinite;
}

@keyframes card-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes card-text-fade {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* 制造商卡片装饰 */
.manufacturer-item {
    position: relative;
    border: 1px solid rgba(0, 102, 204, 0.08) !important;
}

.manufacturer-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 85% 15%, rgba(0, 102, 204, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 15% 85%, rgba(0, 102, 204, 0.05) 2px, transparent 2px);
    background-size: 80px 80px;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manufacturer-item:hover::before {
    opacity: 1;
}

.manufacturer-item:hover::after {
    content: 'MANUFACTURER QUALITY';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    font-size: 5px;
    font-family: Arial, sans-serif;
    color: rgba(0, 102, 204, 0.04);
    word-spacing: 10px;
    pointer-events: none;
    z-index: 0;
}

/* 标题装饰 */
.circuit-enhanced h2 {
    position: relative;
    padding-bottom: 15px;
}

.circuit-enhanced h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 102, 204, 0.6) 50%, 
        transparent 100%);
}

/* 按钮装饰效果 */
.btn {
    position: relative;
    border: 1px solid rgba(0, 102, 204, 0.3) !important;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 102, 204, 0.15) 50%,
        transparent 100%);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

/* 特殊横幅装饰 */
.specialization-banner {
    position: relative;
    overflow: hidden;
}

.specialization-banner::before {
    content: 'SPECIALIZATION EXPERTISE SOLUTION INNOVATION';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    font-size: 6px;
    font-family: Arial, sans-serif;
    color: rgba(0, 102, 204, 0.04);
    text-align: center;
    transform: translateY(-50%) rotate(-3deg);
    word-spacing: 20px;
    pointer-events: none;
    z-index: 1;
    animation: banner-float 8s ease-in-out infinite;
}

@keyframes banner-float {
    0%, 100% { 
        opacity: 0.8; 
        transform: translateY(-50%) rotate(-3deg) translateX(0);
    }
    50% { 
        opacity: 1; 
        transform: translateY(-50%) rotate(-3deg) translateX(10px);
    }
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    body::before {
        background-size: 
            60px 60px,
            60px 60px,
            40px 40px,
            40px 40px;
        animation-duration: 20s;
    }
    
    body::after {
        animation-duration: 30s;
    }
    
    .circuit-enhanced::before {
        background-size: 
            100px 100px,
            100px 100px,
            50px 50px,
            50px 50px;
        animation-duration: 20s;
    }
    
    .circuit-enhanced::after {
        font-size: 8px;
        line-height: 60px;
        word-spacing: 30px;
    }
}

@media screen and (max-width: 480px) {
    body::before {
        background-size: 
            40px 40px,
            40px 40px,
            30px 30px,
            30px 30px;
    }
    
    .hero::after,
    .circuit-enhanced::after {
        display: none; /* 简化移动端显示 */
    }
}

/* 确保内容在装饰之上 */
.container,
main,
section {
    position: relative;
    z-index: 1;
}

/* 性能优化 */
.circuit-enhanced,
.product-card,
.manufacturer-item {
    transform: translateZ(0);
    will-change: transform;
}

/* 减少动画负担 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 