/**
 * =====================================================
 * StellaVita 设备兼容矩阵页面样式
 * =====================================================
 * 引用 root.css 中定义的自定义属性
 * --thm-font, --thm-base, --thm-color, --thm-black, etc.
 */

/* =====================================================
   01. 页面基础样式
   ===================================================== */

.compat-page {
    min-height: 100vh;
    background-color: var(--thm-f6);
}

/* =====================================================
   02. Hero Banner
   ===================================================== */

.compat-hero {
    background-image: var(--StellaVita-bg3);
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    padding: 120px 0 80px;
    position: relative;
}

.compat-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20, 41, 108, 0.85) 0%, rgba(58, 151, 255, 0.75) 100%);
}

.compat-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    max-width: 800px;
    margin: 0 auto;
}

.compat-hero h1 {
    font-family: var(--thm-font);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-white);
}

.compat-hero-subtitle {
    font-family: var(--thm-font);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--thm-base);
}

.compat-hero-desc {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.compat-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.compat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--thm-font);
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.compat-btn-primary {
    background: var(--thm-base);
    color: var(--color-white);
}

.compat-btn-primary:hover {
    background: var(--thm-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(58, 151, 255, 0.4);
}

.compat-btn-secondary {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.compat-btn-secondary:hover {
    background: var(--color-white);
    color: var(--thm-black);
}

.compat-btn-outline {
    background: transparent;
    color: var(--thm-base);
    border-color: var(--thm-base);
}

.compat-btn-outline:hover {
    background: var(--thm-base);
    color: var(--color-white);
}

.compat-btn-lg {
    padding: 18px 48px;
    font-size: 18px;
}

/* =====================================================
   03. 快速导航
   ===================================================== */

.compat-nav {
    background: var(--color-white);
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.compat-nav-wrapper {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.compat-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--thm-f6);
    border-radius: 50px;
    text-decoration: none;
    color: var(--thm-black);
    font-family: var(--thm-font);
    font-weight: 500;
    transition: all 0.3s ease;
}

.compat-nav-item:hover {
    background: var(--thm-base);
    color: var(--color-white);
    transform: translateY(-2px);
}

.compat-nav-item i {
    font-size: 18px;
    color: var(--thm-color);
}

.compat-nav-item:hover i {
    color: var(--color-white);
}

/* =====================================================
   04. 兼容区块通用样式
   ===================================================== */

.compat-section {
    padding: 80px 0;
}

.compat-section-alt {
    background: var(--color-white);
}

.compat-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.compat-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--thm-base);
    color: var(--color-white);
    font-family: var(--thm-font);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 16px;
}

.compat-section-title {
    font-family: var(--thm-font);
    font-size: 36px;
    font-weight: 700;
    color: var(--thm-black);
    margin-bottom: 16px;
}

.compat-section-desc {
    font-size: 16px;
    line-height: 1.8;
    color: var(--thm-gray);
}

/* =====================================================
   05. SDK 品牌卡片
   ===================================================== */

.compat-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.compat-brand-card {
    background: var(--color-white);
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.compat-brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(58, 151, 255, 0.15);
}

.compat-brand-name {
    font-family: var(--thm-font);
    font-size: 20px;
    font-weight: 700;
    color: var(--thm-black);
    margin-bottom: 12px;
}

.compat-brand-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--thm-gray);
}

/* =====================================================
   06. INDI 设备分类
   ===================================================== */

.compat-indi-categories {
    display: grid;
    gap: 32px;
}

.compat-category {
    background: var(--thm-f6);
    padding: 32px;
    border-radius: 16px;
}

.compat-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--thm-font);
    font-size: 20px;
    font-weight: 700;
    color: var(--thm-black);
    margin-bottom: 20px;
}

.compat-category-title i {
    color: var(--thm-base);
    font-size: 24px;
}

.compat-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.compat-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-white);
    color: var(--thm-black);
    font-family: var(--thm-font);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--thm-f3);
}

/* =====================================================
   07. 品牌筛选器
   ===================================================== */

.compat-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.compat-filter-label {
    font-family: var(--thm-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--thm-black);
}

.compat-filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.compat-filter-btn {
    padding: 10px 24px;
    background: var(--thm-f6);
    color: var(--thm-black);
    font-family: var(--thm-font);
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.compat-filter-btn:hover {
    background: var(--thm-base);
    color: var(--color-white);
}

.compat-filter-btn.active {
    background: var(--thm-base);
    color: var(--color-white);
}

/* =====================================================
   08. 兼容表格
   ===================================================== */

.compat-table-wrapper {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.compat-table-scroll {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.compat-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--thm-font);
}

.compat-table thead {
    position: sticky;
    top: 0;
    background: var(--thm-black);
    color: var(--color-white);
    z-index: 10;
}

.compat-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.compat-table tbody tr {
    border-bottom: 1px solid var(--thm-f3);
    transition: background-color 0.2s ease;
}

.compat-table tbody tr:hover {
    background-color: var(--thm-f6);
}

.compat-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--thm-p);
}

.compat-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.compat-status-yes {
    background: #d4edda;
    color: #155724;
}

.compat-status-no {
    background: #f8d7da;
    color: #721c24;
}

.compat-table-footer {
    background: var(--thm-f6);
    padding: 16px 24px;
    border-top: 1px solid var(--thm-f3);
}

.compat-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    align-items: center;
}

.compat-stat-item {
    font-size: 14px;
    color: var(--thm-gray);
}

.compat-stat-item strong {
    color: var(--thm-base);
    font-weight: 700;
}

.compat-stat-item i {
    color: var(--thm-color);
    margin-right: 6px;
}

/* =====================================================
   09. 说明信息
   ===================================================== */

.compat-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(58, 151, 255, 0.1);
    border-left: 4px solid var(--thm-color);
    border-radius: 8px;
    margin-top: 32px;
}

.compat-note i {
    color: var(--thm-color);
    font-size: 18px;
    flex-shrink: 0;
}

.compat-note span {
    font-size: 14px;
    color: var(--thm-gray);
    line-height: 1.6;
}

/* =====================================================
   10. 兼容说明区块
   ===================================================== */

.compat-info {
    background: var(--thm-f6);
    padding: 60px 0;
}

.compat-info-content {
    max-width: 900px;
    margin: 0 auto;
}

.compat-info-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--thm-font);
    font-size: 28px;
    font-weight: 700;
    color: var(--thm-black);
    margin-bottom: 32px;
}

.compat-info-title i {
    color: var(--thm-base);
}

.compat-info-grid {
    display: grid;
    gap: 32px;
}

.compat-info-item h4 {
    font-family: var(--thm-font);
    font-size: 18px;
    font-weight: 700;
    color: var(--thm-black);
    margin-bottom: 16px;
}

.compat-info-item ul {
    list-style: none;
    padding: 0;
}

.compat-info-item li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--thm-gray);
    line-height: 1.6;
}

.compat-info-item li strong {
    color: var(--thm-black);
    font-weight: 600;
}

.compat-info-item p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--thm-gray);
}

/* =====================================================
   11. CTA 区块
   ===================================================== */

.compat-cta {
    background: var(--thm-line);
    padding: 80px 0;
    text-align: center;
}

.compat-cta-content {
    color: var(--color-white);
    max-width: 700px;
    margin: 0 auto;
}

.compat-cta-content h2 {
    font-family: var(--thm-font);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-white);
}

.compat-cta-content > p {
    font-size: 18px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.compat-cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   12. 响应式设计
   ===================================================== */

@media (max-width: 991px) {
    .compat-hero h1 {
        font-size: 36px;
    }

    .compat-hero-subtitle {
        font-size: 20px;
    }

    .compat-section-title {
        font-size: 28px;
    }

    .compat-brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .compat-hero {
        padding: 80px 0 48px;
    }

    .compat-hero h1 {
        font-size: 28px;
    }

    .compat-hero-subtitle {
        font-size: 18px;
    }

    .compat-hero-desc {
        font-size: 16px;
    }

    .compat-hero-actions {
        flex-direction: column;
    }

    .compat-btn {
        width: 100%;
        justify-content: center;
    }

    .compat-nav-wrapper {
        flex-direction: column;
    }

    .compat-nav-item {
        width: 100%;
        justify-content: center;
    }

    .compat-section {
        padding: 48px 0;
    }

    .compat-section-title {
        font-size: 24px;
    }

    .compat-brands-grid {
        grid-template-columns: 1fr;
    }

    .compat-filter {
        flex-direction: column;
        align-items: flex-start;
    }

    .compat-filter-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .compat-filter-btn {
        flex: 1;
        text-align: center;
        padding: 8px 12px;
        font-size: 13px;
    }

    /* 移动端表格转换为卡片 */
    .compat-table,
    .compat-table tbody,
    .compat-table tr,
    .compat-table td {
        display: block;
        width: 100%;
    }

    .compat-table thead {
        display: none;
    }

    .compat-table tbody tr {
        margin-bottom: 16px;
        border: 1px solid var(--thm-f3);
        border-radius: 12px;
        padding: 16px;
        background: var(--thm-f6);
    }

    .compat-table td {
        padding: 8px 0;
        text-align: left;
        border: none;
        position: relative;
        padding-left: 100px;
    }

    .compat-table td::before {
        position: absolute;
        left: 0;
        top: 8px;
        font-weight: 600;
        color: var(--thm-black);
        font-size: 13px;
    }

    /* 为每列设置对应的标签 */
    .compat-table td:nth-child(1)::before {
        content: '品牌';
    }

    .compat-table td:nth-child(2)::before {
        content: '型号';
    }

    .compat-table td:nth-child(3)::before {
        content: '非B门最长曝光';
    }

    .compat-table td:nth-child(4)::before {
        content: 'B门支持';
    }

    .compat-table td:nth-child(5)::before {
        content: 'B门类型';
    }

    .compat-cta-content h2 {
        font-size: 24px;
    }

    .compat-cta-content > p {
        font-size: 16px;
    }

    .compat-cta-actions {
        flex-direction: column;
    }
}

/* =====================================================
   13. 平滑滚动
   ===================================================== */

html {
    scroll-behavior: smooth;
}

/* =====================================================
   14. 动画效果
   ===================================================== */

.compat-page [data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.compat-page [data-aos].aos-animate {
    opacity: 1;
}

.compat-page [data-aos="fade-up"] {
    transform: translateY(30px);
}

.compat-page [data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}


.compat-table thead{
    background: var(--thm-line);
}

