/* 继承并整合参考样式 */
:root {
    /* 核心色彩 - 深空科技风 */
    --bg-deep: #050510;
    --bg-card: rgba(20, 20, 35, 0.7);
    --bg-header: rgba(10, 10, 25, 0.95);

    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);

    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.5);

    --highlight: #8b5cf6;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);

    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 60px;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(165, 180, 252, 0.3);
    letter-spacing: 1px;
}

h2 {
    font-size: 1.5rem;
    color: var(--accent);
    margin: 0 0 12px 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* 导航 */
.top-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.nav-btn {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover,
.nav-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* 表格公用样式 */
.pricing-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.pricing-table {
    width: 100%;
    min-width: 1450px;
    /* 增加最小宽度以适配 7 列 */
    border-collapse: separate;
    border-spacing: 0;
}

.pricing-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-header);
    padding: 30px 15px;
    /* 稍微缩小左右间距 */
    text-align: center;
    border-bottom: 1px solid var(--border);
    min-width: 180px;
    /* 确保非首列有足够的最小宽度 */
}

.pricing-table thead th:first-child {
    left: 0;
    z-index: 30;
    text-align: left;
    width: 260px;
    /* 稍微缩小首列宽度给其他列腾空间 */
    min-width: 260px;
    border-right: 1px solid var(--border);
}

.pricing-table tbody td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    text-align: center;
}

.pricing-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #0d0d18;
    border-right: 1px solid var(--border);
    color: var(--text-main);
    text-align: left;
}

/* 报价页特定样式 */
.plan-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.computing-power {
    display: inline-block;
    font-size: 1.15rem;
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.1);
    padding: 4px 18px;
    border-radius: 20px;
    margin-bottom: 12px;
    white-space: nowrap;
}

.device-license {
    display: inline-block;
    font-size: 0.8rem;
    color: rgb(92, 246, 238);
    border: 1px solid rgba(92, 246, 238, 0.3);
    background: rgba(92, 246, 238, 0.1);
    padding: 2px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    opacity: 0.9;
    white-space: nowrap;
}

.plan-price {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.col-highlight .plan-name {
    color: var(--highlight);
}

.mark-check {
    color: var(--success);
    font-weight: 600;
}

.mark-cross {
    color: #475569;
}

.group-header td {
    background: rgba(16, 185, 129, 0.15) !important;
    font-weight: 800 !important;
    color: var(--success) !important;
    /* 强制使用绿色 */
    letter-spacing: 1.5px;
    text-align: left !important;
    padding: 15px 20px !important;
    font-size: 1.05rem !important;
    border-left: 4px solid var(--success) !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

/* 功能表页特定样式 */
.product-table th:first-child,
.product-table td:first-child {
    width: 20% !important;
    min-width: 150px;
}

.product-table td:nth-child(2) {
    text-align: left;
    color: var(--text-main);
    line-height: 1.8;
    padding: 24px;
}

.category-cell {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.feature-group {
    margin-bottom: 20px;
}

.feature-title {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    padding-bottom: 4px;
    width: fit-content;
}

.feature-item {
    margin-bottom: 10px;
    padding-left: 18px;
    position: relative;
}

.feature-item::before {
    content: '▹';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: block;
}

/* 脚注 */
footer {
    margin-top: 60px;
}

.notes {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 16px;
}

.notes h3 {
    color: var(--text-main);
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.notes h3::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--accent);
    margin-right: 12px;
}

.notes ol {
    padding-left: 24px;
    color: var(--text-muted);
}

.footer-disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
}

.scroll-hint {
    display: none;
    position: fixed;
    bottom: 180px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

@keyframes hintHide {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
        visibility: hidden;
    }
}

@media (max-width: 768px) {
    .scroll-hint {
        display: block;
        animation: hintHide 60s forwards;
    }

    /* 核心修复：不要 unset min-width，否则列会太窄。设定一个让 7 列都舒服展示的宽度 */
    .pricing-table {
        min-width: 1400px !important;
    }

    /* 增加首列宽度，防止“功能模块 / 版本”文字换行 */
    .pricing-table thead th:first-child,
    .pricing-table tbody td:first-child {
        width: 140px !important;
        min-width: 140px !important;
        font-size: 0.95rem !important;
    }

    /* 强制标签不换行 */
    .computing-power,
    .device-license {
        white-space: nowrap !important;
        width: auto !important;
        display: inline-block !important;
    }

    .scroll-hint {
        display: block;
    }

    /* 功能表移动端适配 (保持之前的块状展示逻辑) */
    .product-table,
    .product-table tbody,
    .product-table tr,
    .product-table td {
        display: block !important;
        width: 100% !important;
        min-width: unset !important;
        box-sizing: border-box;
    }

    /* 核心修复：强制覆盖基础表格样式中的 140px 宽度限制 */
    .product-table tbody td:first-child,
    .product-table thead th:first-child {
        width: 100% !important;
        min-width: 100% !important;
        background: rgba(99, 102, 241, 0.2) !important;
        white-space: nowrap !important;
        padding: 15px 20px !important;
        font-size: 1.1rem !important;
        border-right: none !important;
        display: block !important;
    }

    .product-table thead {
        display: none;
    }

    .category-cell {
        text-align: left !important;
        background: rgba(99, 102, 241, 0.2) !important;
        white-space: nowrap !important;
        padding: 15px 20px !important;
        font-size: 1.1rem !important;
    }
}