/* ===== Tokens ===== */
:root {
    --maxw: 1240px;
    --bg: #f8f9fb;
    --surface: #ffffff;
    --ink: #111827;
    --ink-2: #374151;
    --mute: #6b7280;
    --mute-2: #9ca3af;
    --line: #e8eaee;
    --line-2: #eef0f3;
    /* 主色：teal，克制使用 */
    --accent: #0d9488;
    --accent-d: #0f766e;
    --accent-soft: #f0fdfa;
    --accent-line: #ccfbf1;
    --star: #f59e0b;
    --star-empty: #e5e7eb;
    --ease: .2s cubic-bezier(.4, 0, .2, 1);
}
/* ===== Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    font-size: 16px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}
body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a {
    text-decoration: none;
    color: inherit;
}
/* ===== 背景：全宽自然渐变，无硬边 ===== */
.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
/* 右侧 teal 光晕：跨整个视口宽度，向中心自然淡出，无切割 */
.page-bg::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -15%;
    width: 70%;
    height: 80%;
    background: radial-gradient(ellipse at 70% 30%, rgba(13,148,136,.14) 0%, rgba(13,148,136,.05) 40%, rgba(13,148,136,0) 70%);
}
.page-bg::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(ellipse at 30% 70%, rgba(15,118,110,.06) 0%, rgba(15,118,110,0) 65%);
}
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
    linear-gradient(rgba(17,24,39,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17,24,39,.022) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%);
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 65%);
}
/* ===== Hero ===== */
.hero {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 5rem 0 3.5rem;
    overflow: hidden;
}
/* 右侧背景图：完全在 hero 内部，从左向右渐显、从下向上淡出，自然融入 page-bg */
.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 58%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
    background-image: url("image/BackgroundImage.png");
    background-size: cover;
    background-position: center right;
    /* 双重 mask：左→右渐显 + 上/下双向淡出，取交集，图片自然融入 page-bg */
    -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 55%, transparent 100%),
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.15) 30%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.75) 100%);
    -webkit-mask-composite: source-in;
    mask-image:
    linear-gradient(to bottom, transparent 0%, #000 12%, #000 55%, transparent 100%),
    linear-gradient(to right, transparent 0%, rgba(0,0,0,0.15) 30%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.75) 100%);
    mask-composite: intersect;
}
/* 右上角发散光晕：提亮右上角，增强空气感 */
.hero-visual::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70%;
    height: 80%;
    background: radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.5) 0%, rgba(200,240,235,0.25) 35%, transparent 70%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    width: var(--maxw);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.hero-inner > * {
    max-width: 560px;
}
.hero-badge {
    display: inline-block;
    font-size: .74rem;
    font-weight: 600;
    color: var(--accent-d);
    padding: 6px 16px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    margin-bottom: 1.6rem;
}
.hero-title {
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.025em;
    color: var(--ink);
    margin-bottom: 1.3rem;
}
.hero-title .accent {
    color: var(--accent);
}
.hero-sub {
    font-size: .98rem;
    color: var(--mute);
    line-height: 1.85;
    max-width: 520px;
}
/* ===== Container ===== */
.container {
    position: relative;
    z-index: 1;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}
/* ===== Category Tabs ===== */
.cat-tabs {
    display: flex;
    gap: 2.4rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2.2rem;
    flex-wrap: wrap;
}
.cat-tab {
    position: relative;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: .92rem;
    color: var(--mute);
    padding: .75rem 0 .9rem;
    cursor: pointer;
    transition: color var(--ease);
}
.cat-tab::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--ease);
}
.cat-tab:hover {
    color: var(--ink);
}
.cat-tab.active {
    color: var(--ink);
}
.cat-tab.active::after {
    transform: scaleX(1);
}
/* ===== Panel ===== */
.cat-panel {
    display: none;
}
.cat-panel.active {
    display: block;
    animation: fadeIn .32s ease both;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.panel-head {
    margin-bottom: 1.5rem;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}
.panel-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.01em;
}
.panel-desc {
    font-size: .82rem;
    color: var(--mute);
    margin-top: .15rem;
}
/* ===== Software List：一行一个，匀称布局 ===== */
.soft-grid {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.soft-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    column-gap: 1.5rem;
    row-gap: .5rem;
    align-items: start;
    padding: 1.3rem 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
    overflow: hidden;
}
/* head 仅作语义包裹，不参与网格 */
.soft-card__head {
    display: contents;
}
.soft-name {
    grid-column: 1;
    grid-row: 1;
    font-size: 1.05rem;
    font-weight: normal;
    color: var(--ink);
    letter-spacing: -.01em;
    align-self: center;
}
.soft-go {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: .8rem;
    font-weight: 500;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}
.soft-go i {
    font-style: normal;
    transition: transform var(--ease);
}
.soft-card:hover .soft-go i {
    transform: translateX(3px);
}
.soft-desc {
    grid-column: 1;
    grid-row: 2;
    font-size: .84rem;
    color: var(--mute);
    line-height: 1.65;
    align-self: end;
}
.soft-score {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-2);
}
.stars {
    font-size: .74rem;
    letter-spacing: 1px;
    color: var(--star);
    line-height: 1;
}
.soft-tags {
    display: none;
}
/* hover 顶部细线 */
.soft-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #2dd4bf);
    opacity: 0;
    transition: opacity var(--ease);
}
.soft-card:hover {
    transform: translateY(-1px);
    border-color: var(--accent-line);
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.soft-card:hover .soft-topbar {
    opacity: 1;
}
/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    padding: 0 1.5rem 1.4rem;
}
.footer-inner {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-top: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .7rem 1.5rem;
}
.footer-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--line-2) 35%, var(--line) 50%, var(--line-2) 65%, transparent 100%);
    pointer-events: none;
}
.footer p {
    font-size: .72rem;
    color: #b3b9c2;
}
.footer-links {
    display: flex;
    align-items: center;
    gap: 1.3rem;
}
.footer-links a {
    font-size: .72rem;
    color: #b3b9c2;
    text-decoration: none;
    transition: color .25s ease;
}
.footer-links a:hover {
    color: var(--accent-d);
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero {
        padding: 4.5rem 0 3.5rem;
    }
    .hero-visual {
        display: none;
    }
    .hero-inner {
        padding: 0 1.25rem;
    }
    .hero-inner > * {
        max-width: 100%;
    }
    .cat-tabs {
        gap: 1.4rem;
    }
    .cat-tab {
        font-size: .85rem;
    }
    .container {
        padding: 0 1.25rem 2.5rem;
    }
    .soft-card {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        padding: 1.1rem 1.2rem;
        column-gap: 1rem;
    }
    .soft-name {
        grid-row: 1;
    }
    .soft-go {
        grid-row: 1;
    }
    .soft-desc {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .soft-score {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: start;
    }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
