/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    transition: background 0.3s, color 0.3s;
}

body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

a {
    color: #1a73e8;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 1rem 2rem;
    position: relative;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo svg {
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: white;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.header-actions button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.header-actions button:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.breadcrumb {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.5rem 2rem;
    font-size: 0.9rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.breadcrumb a {
    color: white;
}

/* 搜索框 */
.search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

body.dark-mode .search-overlay {
    background: #1e1e1e;
}

.search-overlay.active {
    display: block;
}

.search-overlay form {
    display: flex;
    gap: 0.5rem;
}

.search-overlay input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: transparent;
    color: inherit;
}

body.dark-mode .search-overlay input {
    border-color: #444;
    color: #e0e0e0;
}

.search-overlay button {
    padding: 0.5rem 1rem;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Hero Banner */
.hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1a73e8, #0d47a1, #4a148c);
    color: white;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: white;
    color: #1a73e8;
    border-radius: 30px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
}

.hero-image {
    position: relative;
    z-index: 1;
    animation: fadeInRight 0.8s ease-out 0.3s both;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* 通用section样式 */
section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1a73e8;
    position: relative;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #1a73e8;
    margin-top: 0.5rem;
    border-radius: 2px;
}

body.dark-mode section h2 {
    color: #64b5f6;
}

body.dark-mode section h2::after {
    background: #64b5f6;
}

/* 毛玻璃效果通用类 */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .glass {
    background: rgba(30, 30, 30, 0.7);
}

/* 网格布局 */
.product-grid,
.advantage-grid,
.case-grid,
.article-grid,
.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* 卡片样式 */
.product-card,
.advantage-card,
.case-card,
.recommend-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
}

body.dark-mode .product-card,
body.dark-mode .advantage-card,
body.dark-mode .case-card,
body.dark-mode .recommend-card {
    background: #1e1e1e;
}

.product-card:hover,
.advantage-card:hover,
.case-card:hover,
.recommend-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.product-card svg,
.advantage-card svg {
    margin-bottom: 1rem;
}

/* 动画延迟 */
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.advantage-card:nth-child(2) { animation-delay: 0.1s; }
.advantage-card:nth-child(3) { animation-delay: 0.2s; }
.advantage-card:nth-child(4) { animation-delay: 0.3s; }
.case-card:nth-child(2) { animation-delay: 0.1s; }
.case-card:nth-child(3) { animation-delay: 0.2s; }

/* 新闻列表 */
.news-list article {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    transition: padding-left 0.3s;
}

.news-list article:hover {
    padding-left: 0.5rem;
}

body.dark-mode .news-list article {
    border-color: #333;
}

.news-list time {
    color: #999;
    font-size: 0.9rem;
}

/* FAQ */
.faq-list details {
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    transition: box-shadow 0.3s;
}

.faq-list details:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode .faq-list details {
    background: #1e1e1e;
}

.faq-list summary {
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s;
}

.faq-list summary:hover {
    color: #1a73e8;
}

.faq-list details[open] summary {
    color: #1a73e8;
}

/* HowTo */
.howto-steps li {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    transition: transform 0.2s;
}

.howto-steps li:hover {
    transform: translateX(5px);
}

body.dark-mode .howto-steps li {
    background: #1e1e1e;
}

/* 联系区域 */
.contact-section {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 3rem 2rem;
    border-radius: 16px;
}

body.dark-mode .contact-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.contact-qr {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

.contact-qr div {
    text-align: center;
    transition: transform 0.3s;
}

.contact-qr div:hover {
    transform: scale(1.05);
}

/* EEAT信息 */
.eeat-info {
    background: #f0f4f8;
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem auto;
    max-width: 1200px;
}

body.dark-mode .eeat-info {
    background: #1a1a2e;
}

.eeat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.eeat-grid h4 {
    color: #1a73e8;
    margin-bottom: 0.5rem;
}

body.dark-mode .eeat-grid h4 {
    color: #64b5f6;
}

/* 底部样式 */
footer {
    background: #0d47a1;
    color: white;
    padding: 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: white;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

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

.footer-qr svg {
    transition: transform 0.3s;
}

.footer-qr svg:hover {
    transform: rotate(5deg);
}

.footer-copyright {
    flex-basis: 100%;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.3s, transform 0.3s;
}

#back-to-top:hover {
    background: #0d47a1;
    transform: translateY(-3px);
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.8);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem;
        z-index: 50;
    }

    nav ul.active {
        display: flex;
    }

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

    .hero-banner {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .contact-qr {
        flex-direction: column;
        align-items: center;
    }

    section {
        padding: 2rem 1rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .product-grid,
    .advantage-grid,
    .case-grid,
    .article-grid,
    .recommend-grid {
        grid-template-columns: 1fr;
    }

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

/* 暗色模式下的额外调整 */
body.dark-mode .contact-info p strong {
    color: #64b5f6;
}

body.dark-mode .btn-primary {
    background: #64b5f6;
    color: #121212;
}

body.dark-mode .btn-primary:hover {
    background: #90caf9;
}