/* PCMFlashPro Website Styles */
/* 主色调：橙色#FF8A34、黄色#FFC107、淡黄色#FFF8E1、灰白 */

:root {
    --primary-color: #FF8A34;
    --primary-hover: #FF7820;
    --secondary-color: #FFC107;
    --light-yellow: #FFF8E1;
    --light-gray: #F8F9FA;
    --border-gray: #E5E7EB;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 24px rgba(255, 138, 52, 0.15);
    --gradient-orange: linear-gradient(135deg, #FF8A34 0%, #FFA726 100%);
    --gradient-yellow: linear-gradient(135deg, #FFF8E1 0%, #FFFFFF 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: linear-gradient(to bottom, #FFFFFF 0%, var(--light-gray) 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-container {
    max-width: 70%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.logo img {
    height: 48px;
    width: auto;
}

.logo-text {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
}

/* 右侧固定导航栏 */
nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background: var(--white);
    border-radius: 16px;
    padding: 20px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 138, 52, 0.15);
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
    padding: 0;
    align-items: flex-start;
}

nav li {
    display: flex;
    align-items: center;
    width: 100%;
}

nav a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 16px;
    display: block;
    border-radius: 8px;
    width: 100%;
    text-align: center;
}

nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-orange);
    transition: height 0.3s ease;
    border-radius: 0 2px 2px 0;
}

nav a:hover::before,
nav a.active::before {
    height: 100%;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    background: rgba(255, 248, 225, 0.5);
}

/* Container */
.container {
    max-width: 70%;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Hero Section */
.hero {
    background: var(--gradient-yellow);
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 138, 52, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero h1 {
    font-size: 56px;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.btn-primary {
    display: inline-block;
    padding: 16px 48px;
    background: var(--gradient-orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(255, 138, 52, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 138, 52, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 36px;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.6);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-orange);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before {
    height: 100%;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(255, 138, 52, 0.2);
}

.card h3 {
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 14px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Features Section */
.features {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 40px;
    color: var(--text-primary);
    margin-bottom: 56px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-orange);
    border-radius: 2px;
}

.feature-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.feature-card .feature-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-orange);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-family: 'Segoe MDL2 Assets', sans-serif;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 138, 52, 0.3);
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Notice Board - Fixed Left Side */
.notice-board-left {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    max-height: 500px;
    z-index: 999;
    overflow: hidden;
    padding: 16px;
}

.notice-scrolling {
    animation: scroll-vertical 25s linear infinite;
}

.notice-scrolling:hover {
    animation-play-state: paused;
}

@keyframes scroll-vertical {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.notice-item-left {
    background: var(--white);
    color: var(--primary-color);
    font-size: 14px;
    line-height: 1.6;
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.notice-item-left:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Brands Section */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.brand-item {
    background: var(--white);
    padding: 18px 24px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-gray);
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.brand-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.5) 0%, var(--white) 100%);
}

/* Table */
.table-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-gray);
}

.table-header {
    padding: 24px;
    border-bottom: 2px solid var(--border-gray);
}

.search-box {
    display: flex;
    gap: 16px;
    max-width: 100%;
}

.search-box input {
    flex: 1;
    padding: 13px 18px;
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 138, 52, 0.1);
}

.btn-search {
    padding: 13px 32px;
    background: var(--gradient-orange);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 138, 52, 0.25);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 52, 0.35);
}

table {
    width: 100%;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

thead {
    background: linear-gradient(to bottom, #FAFBFC, var(--light-gray));
}

th {
    padding: 18px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    border-bottom: 2px solid var(--border-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 表格列宽百分比分配 */
th:nth-child(1) { width: 10%; } /* ECU品牌 */
th:nth-child(2) { width: 10%; } /* ECU型号 */
th:nth-child(3) { width: 12%; } /* ECU零件号 */
th:nth-child(4) { width: 10%; } /* 发动机品牌 */
th:nth-child(5) { width: 10%; } /* 项目号 */
th:nth-child(6) { width: 9%; } /* 连接方式 */
th:nth-child(7) { width: 9%; } /* 通讯方式 */
th:nth-child(8) { width: 10%; } /* 芯片类型 */
th:nth-child(9) { width: 6%; text-align: center; } /* 写入 */
th:nth-child(10) { width: 6%; text-align: center; } /* 读取 */
th:nth-child(11) { width: 6%; text-align: center; } /* 校验 */
th:nth-child(12) { width: 8%; text-align: center; } /* 接线图 */

td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-gray);
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 操作列居中对齐 */
td:nth-child(9),
td:nth-child(10),
td:nth-child(11),
td:nth-child(12) {
    text-align: center;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: linear-gradient(to right, rgba(255, 248, 225, 0.4), transparent);
    transform: scale(1.002);
}

.badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-success {
    background: linear-gradient(135deg, rgba(255, 220, 180, 0.3), rgba(255, 200, 150, 0.4));
    color: var(--primary-color);
    border: 1.5px solid rgba(255, 138, 52, 0.3);
    box-shadow: 0 2px 6px rgba(255, 138, 52, 0.15);
}

.badge-success:hover {
    background: linear-gradient(135deg, rgba(255, 220, 180, 0.5), rgba(255, 200, 150, 0.6));
    border-color: rgba(255, 138, 52, 0.5);
    box-shadow: 0 3px 10px rgba(255, 138, 52, 0.25);
    transform: translateY(-2px);
}

.badge-error {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #C62828;
    border: 1.5px solid #EF9A9A;
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.15);
}

.btn-view {
    padding: 8px 18px;
    background: var(--gradient-orange);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(255, 138, 52, 0.2);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 52, 0.3);
}

.btn-view:disabled {
    background: linear-gradient(135deg, #E0E0E0, #BDBDBD);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-view:disabled:hover {
    transform: none;
}

/* Protocol Section */
.protocol-hero {
    background: var(--gradient-orange);
    color: var(--white);
    padding: 100px 24px 80px;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 56px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 138, 52, 0.25);
}

.protocol-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.protocol-hero h1 {
    font-size: 52px;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.protocol-hero p {
    position: relative;
    z-index: 1;
    font-size: 18px;
    opacity: 0.95;
}

.protocol-card {
    background: var(--white);
    border-left: 4px solid var(--primary-color);
    padding: 32px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.protocol-card h3 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 16px;
}

.protocol-card ul {
    list-style: none;
    margin-top: 24px;
}

.protocol-card li {
    padding: 12px 0;
    padding-left: 32px;
    position: relative;
    color: var(--text-secondary);
    font-size: 16px;
}

.protocol-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: var(--white);
    padding: 48px 24px 24px;
    margin-top: 80px;
}

.footer-content {
    max-width: 70%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.footer-section p,
.footer-section a {
    color: #CCCCCC;
    font-size: 14px;
    line-height: 2;
    text-decoration: none;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #555;
    color: #999;
    font-size: 14px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white);
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 1200px) {
    nav {
        display: none; /* 小屏幕隐藏右侧导航栏 */
    }
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
        gap: 16px;
    }
    
    nav ul {
        gap: 20px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 1000px;
    }
}

