/* Wonckami 主站 / 下载站 / 攻略页 —— 参照 lzjd.qq.com 的版式，原创实现，无第三方依赖 */
:root {
    --bg: #171717;
    --fg: #fff;
    --dim: #8d8d8d;
    --line: #2a2a2a;
    --gold: #f3a000;
    --red: #ef3830;
    --hot: #ff3a0c;
    --hdr-h: 86px;
}

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

html, body {
    background: var(--bg);
    color: var(--fg);
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
img { border: 0; display: block; }

/* ---------------------------------------------------------------- 顶栏 */
.hdr {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--hdr-h);
    background: rgba(23, 23, 23, .94);
    backdrop-filter: blur(6px);
    z-index: 60;
    display: flex;
    align-items: center;
    padding: 0 22px;
}

.hdr__brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
}

.hdr__logo {
    width: 62px;
    height: 62px;
    flex: 0 0 auto;
    background: url(img/icon-180.png) no-repeat center / contain;
    border-radius: 14px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 6px 18px rgba(0, 0, 0, .5);
}

.hdr__title {
    margin-left: 12px;
    line-height: 1.25;
}

.hdr__name { display: block; }

.hdr__title b {
    display: block;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .8);
}

.hdr__title span {
    font-size: 12px;
    color: var(--dim);
}

.hdr__title em,
.hdr__badge {
    font-style: normal;
    background: var(--red);
    color: #000;
    border-radius: 5px;
    padding: 1px 5px;
    font-size: 11px;
    margin-left: 6px;
    vertical-align: 1px;
    /* 后台入口：连点 5 次。不做成链接，所以不显示手型，也不参与选择/双击缩放 */
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.hdr__nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 46px;
    white-space: nowrap;
}

.hdr__nav a {
    font-size: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: color .18s;
}

.hdr__nav a i {
    width: 22px;
    height: 22px;
    background: url(img/star.png) no-repeat center / contain;
    opacity: .8;
    transition: opacity .18s, transform .18s;
}

.hdr__nav a:hover { color: var(--gold); }
.hdr__nav a:hover i {
    background-image: url(img/star_on.png);
    opacity: 1;
    transform: rotate(-18deg) scale(1.08);
}

.hdr__right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hdr__dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, #ff8a1f, #f3520a);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(243, 82, 10, .38);
    transition: transform .15s, box-shadow .15s;
}

.hdr__dl:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(243, 82, 10, .5); }

/* ---------------------------------------------------------------- 主视觉 */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: #10101a url(img/bg202504.jpg) no-repeat center / cover;
}

/* 叠加的龙珠粒子层，跟随鼠标轻微位移，制造视差 */
.hero__balls {
    position: absolute;
    inset: 0;
    background: url(img/kv_1.png) no-repeat center / 1633px auto;
    opacity: .95;
    pointer-events: none;
    will-change: transform;
    transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.hero__vig {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 42%, transparent 46%, rgba(0, 0, 0, .55) 100%);
    pointer-events: none;
}

/* 右下角斜切三角下载区：整张 corner.png + 两个多边形热区 */
.corner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 353px;
    height: 352px;
    z-index: 30;
}

.corner img { width: 100%; height: 100%; }

.corner area { cursor: pointer; }

/* ---------------------------------------------------------------- 后台入口 */
.admin-link {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 40;
    font-size: 12px;
    letter-spacing: .5px;
    color: rgba(255, 255, 255, .62);
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .42);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(4px);
    transition: color .18s, border-color .18s, background .18s;
}

.admin-link:hover { color: var(--gold); border-color: rgba(243, 160, 0, .55); background: rgba(0, 0, 0, .62); }

/* ---------------------------------------------------------------- 内页通用 */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: calc(var(--hdr-h) + 46px) 22px 80px;
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.page-sub {
    color: var(--dim);
    font-size: 14px;
    margin-bottom: 34px;
}

.card {
    background: #1d1d1d;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 26px;
    border: 0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(180deg, #ff8a1f, #f3520a);
    color: #fff;
    box-shadow: 0 6px 18px rgba(243, 82, 10, .35);
    transition: transform .15s, box-shadow .15s;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(243, 82, 10, .45); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--ghost {
    background: #262626;
    color: #ddd;
    box-shadow: none;
    border: 1px solid #333;
}
.btn--ghost:hover { background: #2e2e2e; box-shadow: none; }

/* ---------------------------------------------------------------- 下载页 */
/* 下载页整屏垂直居中：内容少的时候不要贴顶堆在页面上半截 */
.wrap--dl {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* 列方向 flex 里 margin:auto 会关掉 stretch，卡片会按最长一行撑宽并溢出屏幕，
       所以这里显式居中 + 给子项 100% 宽 */
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--hdr-h) + 30px);
    padding-bottom: 40px;
}

.dl-box { width: 100%; max-width: 560px; margin: 0 auto; text-align: center; }

.dl-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 18px;
    background: url(img/icon-180.png) no-repeat center / contain;
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 26px rgba(0, 0, 0, .55);
}

.dl-name { font-size: 22px; font-weight: 700; }
.dl-meta { color: var(--dim); font-size: 13px; margin-top: 6px; }

.dl-form { margin-top: 26px; display: flex; gap: 10px; }

.dl-input {
    flex: 1;
    height: 46px;
    background: #141414;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-family: "Consolas", "Menlo", monospace;
    letter-spacing: 1px;
    padding: 0 14px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.dl-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 160, 0, .14); }
.dl-input::placeholder { color: #5a5a5a; letter-spacing: 0; font-family: inherit; }

.dl-hint { margin-top: 14px; font-size: 12px; color: #6a6a6a; line-height: 1.7; }

.dl-msg {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.dl-msg--err { background: rgba(239, 56, 48, .12); border: 1px solid rgba(239, 56, 48, .4); color: #ff8f88; }
.dl-msg--ok { background: rgba(115, 195, 61, .12); border: 1px solid rgba(115, 195, 61, .4); color: #a8e07c; }
.dl-msg--warn { background: rgba(243, 160, 0, .1); border: 1px solid rgba(243, 160, 0, .35); color: #f0c274; }

.dl-ready { margin-top: 24px; }

/* 下载页主按钮：整块宽度，手指好点 */
.btn--lg {
    display: flex;
    width: 100%;
    height: 56px;
    font-size: 17px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.dl-ready .dl-file { margin-bottom: 0; }

.dl-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #141414;
    border: 1px solid #2b2b2b;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: left;
}

.dl-file b { font-size: 14px; word-break: break-all; }
.dl-file span { color: var(--dim); font-size: 12px; }

.dl-quota { margin-top: 16px; font-size: 12px; color: #6a6a6a; }

/* ---------------------------------------------------------------- 攻略 */
.guide-list { display: grid; gap: 14px; }

.guide-item {
    display: block;
    background: #1d1d1d;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px 22px;
    transition: border-color .18s, transform .18s, background .18s;
}

.guide-item:hover { border-color: #3a3a3a; background: #212121; transform: translateX(3px); }
.guide-item h3 { font-size: 17px; margin-bottom: 8px; }
.guide-item p { color: #9a9a9a; font-size: 13px; line-height: 1.7; }
.guide-item time { display: block; margin-top: 10px; color: #5f5f5f; font-size: 12px; }

.article { line-height: 1.95; font-size: 15px; color: #d8d8d8; }
.article h1, .article h2, .article h3 { color: #fff; margin: 30px 0 12px; line-height: 1.4; }
.article h1 { font-size: 26px; }
.article h2 { font-size: 21px; border-left: 4px solid var(--gold); padding-left: 10px; }
.article h3 { font-size: 17px; color: var(--gold); }
.article p { margin: 12px 0; }
.article ul, .article ol { margin: 12px 0 12px 26px; }
.article li { margin: 6px 0; }
.article code {
    background: #262626; border-radius: 4px; padding: 1px 6px;
    font-family: Consolas, Menlo, monospace; font-size: 13px; color: #ffd27f;
}
.article pre {
    background: #121212; border: 1px solid #2a2a2a; border-radius: 10px;
    padding: 14px 16px; overflow: auto; margin: 14px 0;
}
.article pre code { background: none; padding: 0; color: #cfcfcf; }
.article blockquote {
    border-left: 3px solid #3a3a3a; margin: 14px 0; padding: 2px 0 2px 14px; color: #909090;
}
.article img { max-width: 100%; border-radius: 10px; margin: 16px 0; }
.article a { color: var(--gold); border-bottom: 1px solid rgba(243, 160, 0, .35); }
.article hr { border: 0; border-top: 1px solid #2a2a2a; margin: 26px 0; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.article th, .article td { border: 1px solid #2c2c2c; padding: 9px 12px; text-align: left; }
.article th { background: #202020; }

.back-link { display: inline-block; margin-bottom: 20px; color: var(--dim); font-size: 13px; }
.back-link:hover { color: var(--gold); }

/* ---------------------------------------------------------------- 编辑器 */
.ed-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ed-toolbar .grow { flex: 1; }

.ed-field { margin-bottom: 16px; }
.ed-label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 7px; }

.ed-input, .ed-area {
    width: 100%;
    background: #131313;
    border: 1px solid #333;
    border-radius: 9px;
    color: #e8e8e8;
    font-size: 14px;
    font-family: inherit;
    padding: 11px 13px;
    outline: none;
    transition: border-color .18s;
}

.ed-input:focus, .ed-area:focus { border-color: var(--gold); }
.ed-area { min-height: 420px; resize: vertical; line-height: 1.75; font-family: Consolas, Menlo, monospace; }
.ed-area--sm { min-height: 80px; font-family: inherit; }

.ed-list { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 22px; }
.ed-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid #232323; font-size: 14px;
}
.ed-row b { flex: 1; font-weight: 400; }
.ed-row time { color: #5f5f5f; font-size: 12px; }
.ed-row a, .ed-row button {
    font-size: 12px; background: none; border: 0; color: var(--dim);
    cursor: pointer; font-family: inherit; padding: 4px 8px; border-radius: 6px;
}
.ed-row a:hover { color: var(--gold); }
.ed-row button:hover { color: #ff7b72; background: rgba(239, 56, 48, .1); }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
    .hdr__nav { gap: 28px; }
    .hdr__nav a { font-size: 15px; }
    .corner { width: 260px; height: 259px; }
}

@media (max-width: 880px) {
    :root { --hdr-h: 64px; }
    .hdr { padding: 0 14px; }
    .hdr__logo { width: 44px; height: 44px; border-radius: 10px; }
    .hdr__title b { font-size: 16px; }
    .hdr__title span, .hdr__title em { display: none; }
    .hdr__nav { position: static; transform: none; margin-left: auto; gap: 18px; }
    .hdr__nav a i { display: none; }
    .hdr__nav a { font-size: 13px; }
    .hdr__dl { display: none; }
    .hero { min-height: 520px; height: 78vh; }
    .corner { width: 176px; height: 175px; }
    .wrap { padding-top: calc(var(--hdr-h) + 28px); }
    .dl-form { flex-direction: column; }
    .btn { width: 100%; }
}

@media (max-width: 560px) {
    /* 窄屏只留 logo + 三项菜单：标题会让顶栏挤爆，进而把整页撑宽 */
    .hdr__title { display: none; }
    .hdr__nav { gap: 14px; margin-left: 6px; }
    .hdr__nav a { font-size: 13px; white-space: nowrap; }
    .hdr { padding: 0 12px; }
    .page-title { font-size: 23px; }
    .corner { width: 132px; height: 132px; }
    .wrap { padding-left: 16px; padding-right: 16px; }
    .dl-box, .dl-form, .dl-msg, .dl-hint { max-width: 100%; }
}
