/* =========================================================
   网虫传奇 · 韩版传奇视觉扩展
   首页入口卡 / 独立页面版式 / 下载页组件
   颜色沿用主题：墨绿主色 + 米白底，不新增主色调
   ========================================================= */

/* ------------------------------------------------- 首页三个入口卡 */

.feature-item.feature-link {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 0;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 16px;
}

.feature-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1b2420;
}

.feature-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform .7s cubic-bezier(.22, .61, .36, 1), filter .7s;
    filter: saturate(1.02);
}

.feature-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 13, 11, 0) 38%, rgba(9, 13, 11, .62) 100%);
    pointer-events: none;
}

.feature-num {
    position: absolute;
    left: 22px;
    bottom: 18px;
    z-index: 2;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11px;
    letter-spacing: .3em;
    color: rgba(255, 255, 255, .82);
}

.feature-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    padding: 24px 26px 26px;
}

.feature-kicker {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11px;
    letter-spacing: .24em;
    color: var(--primary-dark, #369970);
    text-transform: uppercase;
}

.feature-item.feature-link .feature-title {
    margin: 0;
    font-size: 1.42rem;
    text-align: left;
}

.feature-item.feature-link .feature-title::after {
    content: none;
}

.feature-item.feature-link .feature-description {
    margin: 0;
    text-align: left;
}

.feature-more {
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
    letter-spacing: .08em;
    color: var(--primary-dark, #369970);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.feature-more i { transition: transform .35s; }

.feature-item.feature-link:hover .feature-thumb img { transform: scale(1.06); }
.feature-item.feature-link:hover .feature-more i { transform: translateX(4px); }

[data-theme="dark"] .feature-body { background: #111c2b; }
[data-theme="dark"] .feature-item.feature-link .feature-title { color: #e2e8f0; }

/* ------------------------------------------------- 首页服务器状态条 */

/* 按钮 + 状态条同一列容器：状态条被拉伸到与按钮组等宽 */
.hero-actionbox {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 100%;
    width: auto;
}

/* 手机端：按钮与状态条同为 280px 上限、居中对齐（与主题原本按钮宽度一致） */
@media (max-width: 768px) {
    .hero-actionbox {
        display: flex;
        width: 100%;
    }

    .hero-status {
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    width: 100%;
    margin-top: 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(44, 62, 80, .08);
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 14px 30px -30px rgba(15, 40, 30, .55);
    font-size: 13.5px;
    line-height: 1.5;
    color: #5c6b66;
    backdrop-filter: blur(4px);
}

.hero-status-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-color, #e74c3c);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
    animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .45; transform: scale(.88); }
}

.hero-status-label {
    flex: 0 0 auto;
    color: #66756f;
    letter-spacing: .02em;
}

.hero-status-text {
    flex: 0 0 auto;
    text-align: left;
    color: var(--status-color, #e74c3c);
    font-weight: 600;
    letter-spacing: .02em;
}

@media (prefers-reduced-motion: reduce) {
    .hero-status-dot { animation: none; }
}

[data-theme="dark"] .hero-status {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .12);
    color: #dbe6f2;
}

[data-theme="dark"] .hero-status-label { color: #a9c3d6; }

/* ------------------------------------------------- 独立页面通用版式 */

.legend-page {
    background: #f6faf8;
}

[data-theme="dark"] .legend-page { background: #0b131f; }

.legend-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 420px;
    background-size: cover;
    background-position: center 40%;
    background-color: #111a16;
}

.legend-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 10, .32) 0%, rgba(8, 12, 10, .18) 40%, rgba(8, 12, 10, .82) 100%);
}

.legend-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 130px 24px 46px;
    color: #fff;
}

.legend-eyebrow {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11px;
    letter-spacing: .34em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
    margin: 0 0 14px;
}

.legend-hero h1 {
    margin: 0;
    font-family: 'Noto Serif SC', Georgia, 'Times New Roman', serif;
    font-size: clamp(32px, 4.6vw, 54px);
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.2;
}

.legend-rule {
    width: 54px;
    height: 2px;
    margin: 22px 0 20px;
    background: linear-gradient(90deg, var(--primary-light, #4fc08d), rgba(79, 192, 141, 0));
}

.legend-lead {
    margin: 0;
    max-width: 720px;
    font-size: 15px;
    line-height: 1.95;
    color: rgba(255, 255, 255, .82);
}

.legend-body {
    max-width: 1080px;
    margin: 0 auto;
    padding: 58px 24px 80px;
    color: var(--text-color, #2c3e50);
    font-size: 15.5px;
    line-height: 1.95;
}

[data-theme="dark"] .legend-body { color: #dbe6f2; }

.legend-body h2 {
    position: relative;
    margin: 54px 0 20px;
    font-family: 'Noto Serif SC', Georgia, 'Times New Roman', serif;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: .05em;
}

.legend-body h2::after {
    content: '';
    display: block;
    width: 38px;
    height: 2px;
    margin-top: 12px;
    background: var(--primary-dark, #369970);
}

.legend-body h2:first-child { margin-top: 0; }

.legend-body h3 {
    margin: 26px 0 10px;
    font-size: 1.08rem;
    letter-spacing: .03em;
}

.legend-body p { margin: 0 0 16px; }

.legend-body a { color: var(--primary-dark, #369970); }

.legend-body ul,
.legend-body ol { padding-left: 1.3em; margin: 0 0 18px; }

.legend-body li { margin-bottom: 8px; }

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 26px 0 34px;
}

.legend-card {
    background: #fff;
    border: 1px solid #e5ece9;
    border-radius: 14px;
    padding: 24px 24px 22px;
    box-shadow: 0 18px 40px -34px rgba(15, 40, 30, .55);
    transition: transform .35s, border-color .35s, box-shadow .35s;
}

[data-theme="dark"] .legend-card {
    background: #111c2b;
    border-color: #1e2f43;
}

.legend-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 192, 141, .55);
    box-shadow: 0 26px 48px -34px rgba(15, 40, 30, .7);
}

.legend-card .legend-kicker {
    display: block;
    margin-bottom: 10px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 10.5px;
    letter-spacing: .22em;
    color: var(--primary-dark, #369970);
}

.legend-card h3 { margin: 0 0 8px; font-size: 1.16rem; }

.legend-card p { margin: 0; font-size: 14px; line-height: 1.85; color: #55635f; }

[data-theme="dark"] .legend-card p { color: #9fb0c3; }

.legend-figure {
    margin: 30px 0 34px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5ece9;
    background: #101915;
}

.legend-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.legend-figure figcaption {
    padding: 12px 18px;
    font-size: 12px;
    letter-spacing: .06em;
    color: #93a29d;
    background: #fff;
}

[data-theme="dark"] .legend-figure figcaption { background: #111c2b; color: #7f92a6; }

.legend-quote {
    margin: 30px 0;
    padding: 18px 24px;
    border-left: 3px solid var(--primary-dark, #369970);
    background: rgba(79, 192, 141, .07);
    border-radius: 0 12px 12px 0;
    font-size: 15px;
    color: #35463f;
}

[data-theme="dark"] .legend-quote { background: rgba(79, 192, 141, .1); color: #cfe0d9; }

.legend-table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 34px;
    font-size: 14px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 36px -34px rgba(15, 40, 30, .5);
}

[data-theme="dark"] .legend-table { background: #111c2b; }

.legend-table th,
.legend-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid #eef3f1;
}

[data-theme="dark"] .legend-table th,
[data-theme="dark"] .legend-table td { border-bottom-color: #1e2f43; color: #dbe6f2; }

.legend-table th {
    background: #f2f8f5;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
    color: #3d5148;
}

[data-theme="dark"] .legend-table th { background: #162536; color: #a9c3d6; }

.legend-table tr:last-child td { border-bottom: none; }

/* 下载页 */

.legend-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 26px 0 36px;
}

.legend-download {
    position: relative;
    padding: 26px 26px 24px;
    border-radius: 16px;
    border: 1px solid #e5ece9;
    background: #fff;
    box-shadow: 0 20px 44px -36px rgba(15, 40, 30, .6);
}

[data-theme="dark"] .legend-download { background: #111c2b; border-color: #1e2f43; }

.legend-download.is-main { border-color: rgba(79, 192, 141, .6); }

.legend-download .legend-tag {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: .1em;
    color: #2f7a58;
    background: rgba(79, 192, 141, .13);
}

.legend-download h3 { margin: 0 0 6px; font-size: 1.2rem; }

.legend-download .legend-size {
    margin: 0 0 18px;
    font-size: 12px;
    letter-spacing: .06em;
    color: #8b9a95;
}

.legend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 14px;
    letter-spacing: .06em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-light, #4fc08d), var(--primary-dark, #369970));
    box-shadow: 0 14px 26px -18px rgba(54, 153, 112, .9);
    transition: transform .3s, box-shadow .3s;
}

.legend-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 30px -18px rgba(54, 153, 112, .95); }

/* 覆盖正文链接颜色，保证按钮内文字为白色 */
.legend-body a.legend-btn { color: #fff; text-decoration: none; }

.legend-body a.legend-btn.is-ghost { color: var(--primary-dark, #369970); }

.legend-btn.is-ghost {
    color: var(--primary-dark, #369970);
    background: transparent;
    border: 1px solid rgba(79, 192, 141, .55);
    box-shadow: none;
}

.legend-steps { counter-reset: step; list-style: none; padding-left: 0; }

.legend-steps li {
    position: relative;
    padding: 4px 0 18px 46px;
    margin: 0;
}

.legend-steps li::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11px;
    color: #2f7a58;
    background: rgba(79, 192, 141, .14);
    border: 1px solid rgba(79, 192, 141, .35);
}

.legend-note {
    margin-top: 26px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #fbf7ef;
    border: 1px solid #efe3cc;
    font-size: 13px;
    line-height: 1.85;
    color: #7a6741;
}

[data-theme="dark"] .legend-note { background: rgba(201, 168, 124, .08); border-color: rgba(201, 168, 124, .25); color: #d9c6a1; }

/* 页面底部：其他两个入口 */

.legend-other {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 90px;
}

.legend-other h2 {
    font-family: 'Noto Serif SC', Georgia, serif;
    font-size: 1.1rem;
    letter-spacing: .08em;
    margin: 0 0 18px;
    color: #6b7c76;
}

.legend-other-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.legend-other-card {
    position: relative;
    display: block;
    padding: 26px 24px;
    border-radius: 14px;
    border: 1px solid #e5ece9;
    background: #fff;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .35s, border-color .35s, box-shadow .35s;
}

[data-theme="dark"] .legend-other-card { background: #111c2b; border-color: #1e2f43; }

.legend-other-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 192, 141, .5);
    box-shadow: 0 24px 40px -34px rgba(15, 40, 30, .6);
}

.legend-other-card .legend-kicker {
    display: block;
    font-family: Georgia, serif;
    font-size: 10.5px;
    letter-spacing: .22em;
    color: var(--primary-dark, #369970);
    margin-bottom: 8px;
}

.legend-other-card h3 { margin: 0; font-size: 1.06rem; }

@media (max-width: 680px) {
    .legend-hero { min-height: 300px; }
    .legend-hero-inner { padding: 96px 18px 34px; }
    .legend-body { padding: 40px 18px 56px; font-size: 15px; }
    .legend-other { padding: 0 18px 64px; }
    .legend-grid, .legend-downloads { grid-template-columns: minmax(0, 1fr); }
    .legend-body h2 { margin-top: 40px; }
}
