:root {
    --bg-deep: #04060d;
    --accent: #00e5ff;
    --accent-2: #7c4dff;
    --accent-3: #00ffa3;
    --text: #eaf4ff;
    --muted: #93a5c4;
    --line: rgba(120, 170, 255, .14);
    --card-bg: rgba(13, 21, 42, .55);
    --glow: rgba(0, 229, 255, .55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 背景：网格 + 光晕 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 229, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, .05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 30%, transparent 78%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 500px at 15% -5%, rgba(0, 229, 255, .12), transparent 60%),
        radial-gradient(900px 500px at 85% 0%, rgba(124, 77, 255, .14), transparent 60%),
        radial-gradient(700px 600px at 50% 115%, rgba(0, 255, 163, .06), transparent 60%);
}

.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: clamp(70px, 10vw, 120px) 20px clamp(46px, 6vw, 60px);
}

.site-title {
    font-family: 'Orbitron', 'Noto Sans SC', sans-serif;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    font-weight: 700;
    letter-spacing: .06em;
    background: linear-gradient(110deg, #00e5ff 10%, #7c4dff 45%, #00ffa3 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, .28));
    animation: titleFlow 6s linear infinite;
}

@keyframes titleFlow {
    to { background-position: 200% center; }
}

.site-subtitle {
    margin-top: clamp(12px, 2vw, 18px);
    font-size: clamp(.95rem, 2vw, 1.3rem);
    letter-spacing: .55em;
    text-indent: .55em;
    text-transform: uppercase;
    color: var(--muted);
    position: relative;
    display: inline-block;
}

.site-subtitle::before,
.site-subtitle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: clamp(30px, 5vw, 60px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .7));
}

.site-subtitle::before {
    right: calc(100% + 22px);
}

.site-subtitle::after {
    left: calc(100% + 22px);
    background: linear-gradient(90deg, rgba(0, 229, 255, .7), transparent);
}

/* ---------- 系统状态（PC：左上角框） ---------- */
.status-panel {
    position: absolute;
    top: clamp(18px, 4vw, 28px);
    left: clamp(14px, 3vw, 26px);
    z-index: 5;
    min-width: 236px;
    padding: 14px 18px 15px;
    border-radius: 14px;
    background: rgba(10, 16, 32, .72);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    text-align: left;
    font-size: .88rem;
    letter-spacing: .04em;
}

.status-label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: .58rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 9px;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: none;
    animation: stPulse 1.6s ease-out infinite;
}

@keyframes stPulse {
    0%   { box-shadow: 0 0 0 0 var(--glow); }
    75%  { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

.st-online      { --glow: rgba(0, 255, 136, .5); }
.st-connecting  { --glow: rgba(255, 217, 74, .5); }
.st-offline     { --glow: rgba(255, 77, 94, .5); }

.st-online .status-dot     { background: #00ff88; box-shadow: 0 0 8px rgba(0, 255, 136, .9); }
.st-connecting .status-dot { background: #ffd94a; box-shadow: 0 0 8px rgba(255, 217, 74, .9); }
.st-offline .status-dot    { background: #ff4d5e; box-shadow: 0 0 8px rgba(255, 77, 94, .9); }

.st-online .status-text     { color: #00ff88; text-shadow: 0 0 10px rgba(0, 255, 136, .6); }
.st-connecting .status-text { color: #ffd94a; text-shadow: 0 0 10px rgba(255, 217, 74, .6); }
.st-offline .status-text    { color: #ff4d5e; text-shadow: 0 0 10px rgba(255, 77, 94, .6); }

.status-ip {
    margin-top: 8px;
    font-size: .8rem;
    color: var(--muted);
}

.status-ip span {
    color: var(--text);
    font-family: 'Consolas', 'Courier New', monospace;
    letter-spacing: .02em;
}

.status-ip span.dim {
    color: #5c6b85;
}

/* ---------- 卡片 ---------- */
.cards {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: clamp(20px, 4vw, 36px) auto clamp(46px, 7vw, 70px);
    padding: 0 clamp(14px, 2.5vw, 24px);
    display: grid;
    gap: clamp(16px, 2.2vw, 26px);
    grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
}

@media (min-width: 1180px) {
    .cards {
        grid-template-columns: repeat(5, 1fr);
    }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: clamp(172px, 22vw, 215px);
    padding: clamp(20px, 2.4vw, 32px) clamp(18px, 2.2vw, 30px);
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform .35s cubic-bezier(.2, .7, .3, 1.2),
        box-shadow .35s ease, border-color .35s ease, background .35s ease;
}

/* 卡片顶部高光线 */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .65), transparent);
    opacity: .55;
    transition: opacity .35s ease;
}

/* 右下角科技角标装饰 */
.card::after {
    content: "+";
    position: absolute;
    right: 12px;
    bottom: 7px;
    font-size: 16px;
    color: rgba(0, 229, 255, .28);
    transition: color .35s ease, text-shadow .35s ease;
}

.card:hover {
    border-color: rgba(0, 229, 255, .55);
    background: rgba(16, 26, 52, .72);
    box-shadow:
        0 20px 54px -14px rgba(0, 229, 255, .38),
        inset 0 0 26px rgba(0, 229, 255, .06);
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.card-title {
    font-size: clamp(.98rem, 1.6vw, 1.34rem);
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.4;
}

.card-title .tag {
    font-size: clamp(.58rem, .9vw, .72rem);
    font-weight: 500;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 20px;
    vertical-align: middle;
    letter-spacing: .06em;
    white-space: nowrap;
}

.tag-beta {
    color: #ffd76a;
    border: 1px solid rgba(255, 215, 106, .45);
    background: rgba(255, 215, 106, .08);
}

.tag-stable {
    color: var(--accent-3);
    border: 1px solid rgba(0, 255, 163, .45);
    background: rgba(0, 255, 163, .08);
}

/* 动作文字：点击前往 → / 点击下载 → */
.card-action {
    margin-top: 14px;
    font-size: clamp(.9rem, 1.3vw, 1.12rem);
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--accent);
    transition: font-size .3s ease, color .3s ease, text-shadow .3s ease;
}

.action-arrow {
    display: inline-block;
    transition: margin-left .3s ease, transform .3s ease;
}

/* 悬停：字体变大 + 箭头分开并向右滑动（无按钮框） */
.card:hover .card-action {
    font-size: clamp(1.04rem, 1.55vw, 1.34rem);
    color: #ffffff;
    text-shadow: 0 0 14px rgba(0, 229, 255, .85);
}

.card:hover .action-arrow {
    margin-left: .42em;
    transform: translateX(5px);
}

/* ---------- 页脚（始终贴住视口底部） ---------- */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 34px 24px 40px;
    text-align: center;
    background: rgba(5, 8, 18, .6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-info p {
    font-size: clamp(.78rem, 1.2vw, .92rem);
    color: var(--muted);
    letter-spacing: .05em;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: clamp(12px, 2vw, 18px);
    flex-wrap: wrap;
}

.social-icon-link {
    width: clamp(38px, 4.5vw, 46px);
    height: clamp(38px, 4.5vw, 46px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(13, 21, 42, .55);
    color: var(--muted);
    font-size: clamp(.95rem, 1.5vw, 1.15rem);
    text-decoration: none;
    transition: color .3s ease, border-color .3s ease,
        box-shadow .3s ease, transform .3s ease;
}

.social-icon-link:not(.disabled):hover {
    color: var(--accent);
    border-color: rgba(0, 229, 255, .65);
    box-shadow: 0 0 18px rgba(0, 229, 255, .35);
    transform: translateY(-4px);
}

.social-icon-link.disabled {
    opacity: .38;
    cursor: not-allowed;
    filter: grayscale(.6);
}

/* 自定义图片图标 */
.social-icon-link.icon-img img {
    width: 58%;
    height: 58%;
    object-fit: contain;
    border-radius: 50%;
    filter: grayscale(.35);
    transition: filter .3s ease, transform .3s ease;
}

.social-icon-link.icon-img:hover img {
    filter: grayscale(0);
    transform: scale(1.12);
}

/* ---------- 轻提示 ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 42px;
    transform: translate(-50%, 20px);
    z-index: 100;
    padding: 12px 26px;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, .5);
    background: rgba(10, 16, 32, .92);
    color: var(--text);
    font-size: .95rem;
    letter-spacing: .06em;
    box-shadow: 0 8px 30px rgba(0, 229, 255, .25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ---------- 淡入上浮动画 ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 动画前初始隐藏（JS 播放淡入动画） */
.site-title,
.site-subtitle,
.status-panel,
.card,
.card-title,
.card-action,
.site-footer,
.footer-info,
.social-icon-link {
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp .5s ease forwards;
}

.fade-in {
    animation: fadeIn .5s ease forwards;
}

/* 标题需要同时保留流光渐变动画 */
.site-title.fade-in-up {
    animation: fadeInUp .5s ease forwards, titleFlow 6s linear infinite;
}

/* ---------- 手机端 ---------- */
@media (max-width: 760px) {

    /* 状态条：副标题下方一行 */
    .status-panel {
        position: static;
        margin: clamp(16px, 4vw, 22px) auto 0;
        min-width: 0;
        width: fit-content;
        max-width: calc(100% - 20px);
        display: flex;
        align-items: center;
        gap: clamp(8px, 2vw, 12px);
        padding: 8px 15px;
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
        white-space: nowrap;
    }

    .status-label {
        display: none;
    }

    .status-line {
        font-size: .8rem;
    }

    .status-dot {
        width: 8px;
        height: 8px;
    }

    .status-ip {
        margin-top: 0;
        font-size: clamp(.6rem, 3.2vw, .74rem);
    }

    .status-ip + .status-ip::before {
        content: "|";
        margin-right: clamp(8px, 2vw, 12px);
        color: rgba(120, 170, 255, .35);
    }

    .site-subtitle::before,
    .site-subtitle::after {
        display: none;
    }
}

@media (max-width: 479px) {
    .cards {
        grid-template-columns: 1fr;
    }
}