:root {
    --bg-dark: #0a0e14;
    --bg-section: #11161d;
    --bg-card: #181e27;
    --text-primary: #e8ecef;
    --text-secondary: #9aa4b2;
    --text-muted: #5f6b7a;
    --primary: #0066cc;
    --primary-light: #3388dd;
    --border: #1e2a38;
    --border-light: #2a3545;
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.3s ease;
    --max-width: min(1400px, 90%);
    --nav-height: clamp(60px, 8vh, 80px);
    --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth; 
    font-size: 16px; 
}
/* 大屏根字体自适应：1920px以上字体适当放大，2560px以上再放大 */
@media (min-width: 1920px) {
    html { font-size: 18px; }
}
@media (min-width: 2560px) {
    html { font-size: 20px; }
}
body {
    font-family: var(--font-sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏 */
.nav {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height);
    background: rgba(10,14,20,0.85); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); z-index: 1000;
    border-bottom: 1px solid var(--border);
}
.nav.scrolled { background: rgba(10,14,20,0.95); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.nav-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.nav-links { display: flex; list-style: none; gap: clamp(1rem, 3vw, 3rem); }
.nav-links a {
    text-decoration: none; color: var(--text-secondary); font-size: 0.9rem;
    font-weight: 500; transition: var(--transition); position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; z-index: 1001; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: var(--transition); }
.nav-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }

/* 全屏轮播 */
.hero-slider {
    margin-top: var(--nav-height);
    width: 100%;
    height: calc(100vh - var(--nav-height));
    position: relative; overflow: hidden; background: #000;
}
.slider-container { width: 100%; height: 100%; position: relative; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 0.8s ease; cursor: pointer;
    pointer-events: none;
}
.slide.active {
    opacity: 1;
    pointer-events: auto;
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-caption {
    position: absolute; 
    bottom: clamp(24px, 8vh, 80px); 
    left: clamp(24px, 5%, 80px);
    color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.slide-caption span { display: block; font-size: clamp(0.7rem, 2vw, 1rem); letter-spacing: 0.06em; margin-bottom: 4px; }
.slide-caption h2 { font-size: clamp(1.5rem, 5vw, 3rem); font-weight: 700; }

.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.4); border: none; color: #fff;
    font-size: clamp(1.5rem, 4vw, 3rem); 
    width: clamp(40px, 5vw, 70px); 
    height: clamp(40px, 5vw, 70px);
    border-radius: 50%;
    cursor: pointer; transition: background var(--transition);
    display: flex; align-items: center; justify-content: center; z-index: 10;
}
.slider-arrow:hover { background: rgba(0,0,0,0.7); }
.slider-arrow.prev { left: clamp(10px, 2vw, 24px); }
.slider-arrow.next { right: clamp(10px, 2vw, 24px); }

.slider-dots {
    position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
.dot {
    width: clamp(8px, 1.5vw, 14px); 
    height: clamp(8px, 1.5vw, 14px);
    border-radius: 50%;
    background: rgba(255,255,255,0.5); cursor: pointer;
    transition: background var(--transition);
}
.dot.active { background: var(--primary-light); }

/* 通用区块 */
.section { 
    padding: clamp(40px, 8vh, 100px) 24px; 
}
.section-alt { background: var(--bg-section); }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 10px; }
.section-tag { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--primary-light); margin-bottom: 8px; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 750; margin-bottom: 12px; }

/* 产品卡片 */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 24px; }
a.product-card {
    text-decoration: none;
    color: inherit;
    display: block;
}
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.product-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.product-image { 
    height: clamp(180px, 25vw, 280px); 
    overflow: hidden; 
}
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info { padding: 20px; }
.product-info h3 { font-size: 1.1rem; margin-bottom: 8px; }
.product-info p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 12px; }
.product-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.product-tags span { font-size: 0.7rem; padding: 4px 10px; border-radius: 50px; background: rgba(0,102,204,0.1); border: 1px solid rgba(0,102,204,0.2); color: var(--primary-light); }

/* 专利卡片 */
.patents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 24px; }
.patent-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(16px, 2vw, 24px);
    transition: var(--transition);
    cursor: pointer;
}
.patent-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.patent-text {
    flex: 1;
    min-width: 0;
}
.patent-text .patent-number {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--primary-light);
    background: rgba(0,102,204,0.1);
    padding: 2px 10px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 8px;
}
.patent-text h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
}
.patent-text .patent-type {
    font-size: 0.7rem;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 2px 10px;
    border-radius: 50px;
    display: inline-block;
}
.patent-image {
    width: clamp(90px, 12vw, 160px);
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-section);
}
.patent-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: var(--radius);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: var(--transition);
}
.lightbox-close:hover {
    color: var(--primary-light);
}

/* 关于我们 */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.about-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.feature-item { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }
.feature-item span { color: var(--primary-light); font-weight: 700; }
.about-image { border-radius: var(--radius); overflow: hidden; }
.about-image img { width: 100%; height: auto; display: block; }

/* 联系我们新布局 */
.contact-layout {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(24px, 5vw, 64px);
    margin-top: 20px;
}

.contact-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-qr-group {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 3vw, 32px);
    justify-content: center;
}

.qr-item {
    text-align: center;
    width: clamp(100px, 15vw, 160px);
}

.qr-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 6px;
}

.qr-caption {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    min-width: 70px;
}

.contact-item span:last-child {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* 页脚 */
.footer { text-align: center; padding: 24px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.8rem; }

/* 大类卡片网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 24px;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: block;
}
.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.category-image {
    height: clamp(180px, 25vw, 260px);
    overflow: hidden;
}
.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.category-card:hover .category-image img {
    transform: scale(1.05);
}
.category-info {
    padding: 20px 24px 24px;
}
.category-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}
.category-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: var(--text-primary);
}
.breadcrumb span.sep {
    color: var(--text-muted);
    user-select: none;
}
.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* 产品详情页布局 */
body.product-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.product-page .product-detail {
    flex: 1;
}

/* 锚点滚动偏移 */
#home, #products, #patents, #about, #contact {
    scroll-margin-top: var(--nav-height);
}

/* 响应式断点优化 */
@media (max-width: 768px) {
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 250px; height: 100vh;
        background: var(--bg-card); flex-direction: column; padding: 96px 32px 40px;
        transition: var(--transition); border-left: 1px solid var(--border);
    }
    .nav-links.open { right: 0; }
    .nav-toggle { display: flex; }
    .nav-overlay.active { display: block; }

    .hero-slider { height: 50vh; }
    .slide-caption { left: 24px; bottom: 32px; }
    .slide-caption h2 { font-size: 1.8rem; }

    .about-grid { grid-template-columns: 1fr; }
    .products-grid, .patents-grid { grid-template-columns: 1fr; }

    .patent-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .patent-image {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    .contact-layout {
        flex-direction: column;
        align-items: center;
    }
    .contact-text {
        width: 100%;
    }
    .contact-qr-group {
        margin-top: 32px;
        justify-content: center;
    }
}

/* 游戏本大屏幕：整页等比例放大 1.5 倍 */
@media (min-width: 2560px) {
    body {
        zoom: 1.5;                 /* 标准缩放，保持布局 */
        -moz-transform: scale(1.5); /* Firefox 兼容 */
        -moz-transform-origin: top left;
    }

    /* 避免因缩放导致水平滚动条，确保内容不超出 */
    html {
        overflow-x: hidden;
        width: 100%;
    }

    /* 如果缩放后页面宽度超出视口，可以调整 body 宽度（一般不需要） */
    body {
        width: 100%;
        overflow-x: hidden;
    }
}
/* 产品详情页页脚固定底部 */
body.product-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body.product-page .product-detail, 
body.product-page .category-page{
    flex: 1;
}