:root {
    --bg-color: #f5f7fa; /* 柔和的灰白背景 */
    --card-bg: #ffffff;
    --primary-color: #0066cc; /* 经典的科技蓝 */
    --primary-hover: #0052a3;
    --accent-color: #ff6b00; /* 活力橙作为点缀 */
    --text-main: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e8e8e8;
    --nav-height: 70px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-base: 4px;
    --radius-lg: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 优化中文字体显示，符合国人阅读习惯 */
    font-family: "PingFang SC", "Microsoft YaHei", "Heiti SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container for centered content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

body {
    background-color: var(--bg-color);
    /* Tech-inspired background: subtle honeycomb + ambient glow */
    background-image: 
        radial-gradient(circle at 80% 10%, rgba(0, 102, 204, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 20% 90%, rgba(255, 107, 0, 0.04) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%23000000' fill-opacity='0.03' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L10.98 40v6.34h2v-7.5l-13-7.5v2.31zm15.98 6.5V49h2v-7.5l12.98-7.5v-2.3l-10.98 6.34zM29.98 15l-10.98-6.34L29.98 2.3V0h-2v7.5l13 7.5v-2.31z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 100% 100%, 100% 100%, auto;
    background-attachment: fixed;
    
    color: var(--text-main);
    line-height: 1.75;
    overflow-x: hidden;
    font-size: 15px;
}

/* Header & Navigation - 更大气、稳重 */
header {
    background: rgba(255, 255, 255, 0.98);
    height: var(--nav-height);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 calc((100% - 1200px) / 2 + 20px); /* 限制内容宽度并居中 */
    transition: all 0.3s ease;
}

@media (max-width: 1240px) {
    header {
        padding: 0 20px;
    }
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

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

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

/* 底部线条动画 */
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* Hero Accordion */
.hero {
    height: 600px;
    position: relative;
    margin-top: var(--nav-height);
    overflow: hidden;
}

.accordion-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.accordion-item {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: flex 0.5s ease;
    transform: skewX(-25deg);
    border-right: 1px solid rgba(255,255,255,0.1);
    /* Fix edges due to skew */
    margin-left: -20px; 
    margin-right: -20px;
}

.accordion-item:first-child {
    margin-left: -50px; /* Push first item left to cover gap */
}

.accordion-item:last-child {
    margin-right: -50px; /* Push last item right to cover gap */
}

.accordion-item:hover {
    flex: 3;
    cursor: pointer;
}

/* Background Un-skew */
.accordion-bg {
    position: absolute;
    top: 0;
    left: -20%; /* Start wider to cover skew area */
    width: 140%; /* Wider than 100% to cover skew */
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: skewX(25deg);
    transform-origin: center;
    filter: brightness(0.8);
    transition: filter 0.5s ease;
}

.accordion-item:hover .accordion-bg {
    filter: brightness(1);
}

/* Content Un-skew */
.accordion-content {
    position: absolute;
    bottom: 100px;
    left: 0;
    width: 100%;
    text-align: center;
    transform: skewX(25deg); /* Un-skew text */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
    color: #fff;
    padding: 0 20px;
    pointer-events: none; /* Let clicks pass through to link if needed, but link is inside */
}

/* Make links clickable */
.accordion-content a {
    pointer-events: auto;
}

.accordion-item:hover .accordion-content {
    opacity: 1;
    transform: skewX(25deg) translateY(0);
}

.accordion-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.accordion-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}


/* 通用按钮样式优化 */
.btn {
    display: inline-block;
    padding: 12px 36px;
    background: var(--primary-color);
    border: none;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    border-radius: var(--radius-base);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
    color: #fff;
}

/* 幻灯片里的按钮特殊处理 */
.slide-content .btn {
    background: transparent;
    border: 1px solid #fff;
    box-shadow: none;
}

.slide-content .btn:hover {
    background: #fff;
    color: var(--primary-color);
}

/* Section Styles */
.section {
    padding: 80px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 60px;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Product Grid - 卡片式布局优化 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    /* 去掉默认阴影，hover时再显示，更清爽 */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.product-img {
    width: 100%;
    height: 240px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
    overflow: hidden;
}

/* 图片 Hover 放大效果 */
.product-img div {
    transition: transform 0.5s ease;
}
.product-card:hover .product-img div {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    text-align: center; /* 居中对齐更符合展示类 */
}

.product-category {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 3rem; /* 保持高度一致 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 产品卡片里的小按钮 */
.product-info .btn {
    padding: 8px 24px;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    box-shadow: none;
}

.product-info .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    transform: none;
}

/* Drivers Table - 表格优化 */
.table-container {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    text-align: left;
    padding: 16px 24px;
    background-color: #f9fafb;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid #eee;
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

tr:hover td {
    background-color: #f5f9ff; /* 鼠标悬停淡蓝色 */
}

.download-btn {
    color: var(--primary-color);
    text-decoration: none;
    padding: 6px 16px;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-base);
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-block;
}

.download-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

/* News Grid - 新闻列表优化 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.news-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.news-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
    line-height: 1.5;
    font-weight: 600;
    transition: color 0.3s;
}

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

.news-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

.news-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    align-self: flex-start;
    position: relative;
}

/* News Card Image Styles */
.news-card-img-link {
    display: block;
    height: 200px;
    overflow: hidden;
    background: #333;
    position: relative;
}

.news-card-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img {
    transform: scale(1.05);
}

.news-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    background: #f0f2f5;
}

.active-cat {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Tutorials Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-wrapper iframe, .video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer - 简约风格 */
footer {
    background: #fff;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.qr-code-section {
    margin-top: 20px;
    text-align: center;
}

.qr-img {
    width: 120px;
    height: 120px;
    background-color: #f0f0f0;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    padding: 5px;
}

.qr-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-main);
    margin: 0 20px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

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

footer p {
    color: var(--text-light);
    font-size: 0.9rem;
}


/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--text-light);
}

/* Advanced Tabs */
.tabs-container {
    margin-top: 50px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #f9fafb;
}

.tab-item {
    padding: 20px 40px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s;
    border-right: 1px solid var(--border-color);
}

.tab-item:hover {
    color: var(--primary-color);
    background: #fff;
}

.tab-item.active {
    color: var(--primary-color);
    background: #fff;
    border-top: 3px solid var(--primary-color);
    margin-top: -1px; /* Cover top border */
}

.tab-content {
    padding: 40px;
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

/* Product Gallery Thumbnails */
.product-gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumb-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-base);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    opacity: 0.7;
}

.thumb-img:hover, .thumb-img.active {
    border-color: var(--primary-color);
    opacity: 1;
}

/* Sidebar Layout */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sidebar-widget {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.widget-list {
    list-style: none;
}

.widget-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee;
}

.widget-list li:last-child {
    border: none;
}

.widget-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.6s ease, transform 0.6s ease;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.widget-list a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Rich Footer */
.rich-footer {
    background: #1a1a1a; /* 深色背景更显专业 */
    color: #b0b0b0;
    padding: 80px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 600;
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #b0b0b0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid #333;
    text-align: center;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Product Detail Page Styles */
.detail-container {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.product-detail-info .product-title {
    font-size: 2.2rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    margin-bottom: 15px;
}

.product-detail-info .product-desc {
    display: block;
    -webkit-line-clamp: unset;
    min-height: auto;
    margin-bottom: 30px;
}

.product-specs {
    margin-bottom: 40px;
    background: #f9fafb;
    padding: 25px;
    border-radius: var(--radius-lg);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: var(--text-main);
}

.spec-value {
    color: var(--text-secondary);
}

.buy-btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 16px 50px;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.buy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
    .page-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    gap: 10px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-base);
    background: #fff;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Tutorial Card Style */
.tutorial-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.tutorial-card .video-wrapper {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* Only round top corners */
    box-shadow: none; /* Remove shadow from inner wrapper */
}

.tutorial-info {
    padding: 20px;
}

.tutorial-info h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s;
}

.tutorial-card:hover .tutorial-info h3 {
    color: var(--primary-color);
}

/* Play button effect */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 3rem;
    opacity: 0.7;
    transition: all 0.3s;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.tutorial-card:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* View More Link */
.view-more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-base);
    transition: all 0.3s ease;
    display: inline-block;
}

.view-more-link:hover {
    background: rgba(0, 102, 204, 0.1);
    transform: translateX(5px);
}
