:root {
    color-scheme: dark;
    --gold: #ffb322;
    --gold-bright: #ffcc52;
    --ink: #100617;
    --header-height: 74px;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 300px; scroll-behavior: smooth; }
body { margin: 0; background: #190426; color: white; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid #ffe58a; outline-offset: 4px;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.artwork {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background: radial-gradient(circle at 83% 30%, rgba(136,10,194,.2), transparent 33%),
                radial-gradient(circle at 16% 62%, rgba(255,148,2,.31), transparent 30%),
                linear-gradient(180deg, rgba(19,0,29,.12), rgba(18,0,26,.36)),
                url("assets/mamba-background.webp") center top / cover no-repeat,
                #180020;
}
.artwork::before, .artwork::after { content: ""; position: absolute; pointer-events: none; }
.artwork::before {
    inset: -20% -25%;
    background: repeating-conic-gradient(from 21deg at 30% 63%, transparent 0deg 16deg, rgba(254,191,35,.13) 16.4deg 16.8deg, transparent 17deg 36deg),
                radial-gradient(circle at 51% 45%, transparent 15%, rgba(15,0,36,.38) 71%);
    transform: rotate(-14deg);
    mix-blend-mode: screen;
}
.artwork::after {
    inset: 0;
    background: linear-gradient(110deg, rgba(9,0,23,.3), transparent 20%, transparent 67%, rgba(21,0,40,.25)),
                linear-gradient(180deg, transparent 0%, rgba(19,0,32,.24) 85%, rgba(12,0,23,.6));
}
.artwork-number, .artwork-mb {
    position: absolute; left: 50%; font-weight: 1000; font-style: italic; letter-spacing: -.1em;
    transform: translateX(-50%) rotate(-11deg); opacity: .16; white-space: nowrap;
    font-family: Impact, "Arial Black", sans-serif;
    background: linear-gradient(135deg, #f5b526, #ffa000 42%, #f5e5af 50%, #882fd8 72%, #ffbb43);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 3px 9px 24px rgba(0,0,0,.17);
}
.artwork-number { top: 16%; font-size: min(78vw, 430px); }
.artwork-mb { top: 59%; font-size: min(72vw, 410px); }

.site-wrap { position: relative; min-height: 100vh; }
.site-header {
    background: #fff; color: #222; height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 max(18px, calc((100vw - 740px) / 2));
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.header-brand { min-width: 0; display: flex; align-items: center; gap: 15px; font-size: clamp(19px, 4.7vw, 28px); font-weight: 500; white-space: nowrap; }
.header-brand span { overflow: hidden; text-overflow: ellipsis; }
.shield-icon { width: 29px; height: 34px; flex: 0 0 auto; }
.refresh-btn { flex: none; width: 43px; height: 43px; margin-left: 10px; color: #272727; border: none; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; }
.refresh-btn svg { width: 29px; height: 29px; }
.refresh-btn:hover { background: #f1f1f1; }

.main-content { max-width: 560px; margin: 0 auto; padding: 13px 17px 24px; }
.intro { text-align: center; margin: 0 0 14px; user-select: none; }
.intro-line { font-family: Impact, "Arial Black", sans-serif; display: flex; align-items: center; justify-content: center; gap: 13px; font-size: 16px; letter-spacing: .24em; font-weight: 800; color: #f8c55c; text-shadow: 0 2px 5px #4c1700; }
.intro-line span { width: 36px; height: 1px; background: linear-gradient(90deg, transparent, #ffc63b); }
.intro-line span:last-child { transform: rotate(180deg); }
.intro-subtitle { font-size: 11px; letter-spacing: .25em; color: #ffda8b; opacity: .88; margin-top: 3px; }
.links-list { display: flex; flex-direction: column; gap: 19px; }
.link-card {
    position: relative; display: flex; align-items: center; width: 100%; min-height: 92px;
    padding: 9px 19px 9px 11px; border: 1px solid rgba(255,170,31,.12);
    border-radius: 999px; cursor: pointer; text-align: center; overflow: hidden;
    background: linear-gradient(98deg, rgba(5,3,10,.87), rgba(11,2,15,.78) 64%, rgba(15,1,18,.83));
    box-shadow: 0 7px 19px rgba(4,0,13,.32), inset 0 0 15px rgba(0,0,0,.18);
    color: var(--gold); transition: transform .18s ease, border-color .18s ease, background .18s ease;
    -webkit-tap-highlight-color: transparent;
}
.link-card::before { content:""; position:absolute; inset: 0; border-radius:inherit; background: linear-gradient(103deg, rgba(255,203,64,.08), transparent 35%, rgba(118,18,162,.1)); pointer-events:none; }
.link-card:hover { transform: translateY(-2px); border-color: rgba(255,189,56,.52); background: rgba(8,2,12,.91); }
.link-card:active { transform: scale(.985); }
.link-avatar { display: block; flex: 0 0 auto; width: 72px; height: 72px; object-fit: cover; border-radius: 50%; background: #260d37; box-shadow: 0 0 0 1px rgba(255,202,88,.34), 0 0 14px rgba(245,126,16,.15); }
.link-label { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; font-size: clamp(19px, 4.9vw, 26px); font-weight: 900; line-height: 1.25; letter-spacing: .012em; padding-left: 3px; text-shadow: 0 2px 5px rgba(89,26,0,.5); white-space: nowrap; }
.link-label > span { display: block; }
.link-card--short { min-height: 80px; }
.section-divider { position: relative; height: 32px; display: flex; align-items: center; justify-content: center; margin: 0 17px; }
.section-divider::before { content: ""; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,199,72,.92) 18%, #ffd166 50%, rgba(255,199,72,.92) 82%, transparent); box-shadow: 0 0 9px rgba(255,185,38,.4); }
.section-divider span { position:absolute; width:9px; height:9px; background: #ffc442; transform:rotate(45deg); box-shadow:0 0 9px #ec8d27; }

.page-footer { text-align: center; margin: 38px 8px 12px; padding: 20px 13px 27px; background: rgba(9,0,22,.72); border: 1px solid rgba(255,188,65,.13); border-radius: 22px; backdrop-filter: blur(8px); }
.page-footer p { margin: 0; }
.password-tip { color: #f2d3a2; font-size: 13px; line-height: 1.8; }
.password-tip strong { color: var(--gold-bright); font-size: 17px; }
.legacy-links { margin: 18px auto 0; max-width: 310px; color: #f5c965; font-size: 13px; }
.legacy-links summary { cursor: pointer; list-style-position: inside; user-select: none; }
.legacy-content { display: grid; gap: 8px; margin-top: 12px; }
.legacy-content button { padding: 10px 12px; border: 1px solid #9c6c32; color: #ffda9a; border-radius: 12px; background: #200d29; cursor: pointer; }
.legacy-content button:hover { background: #4a2144; }
.safety-tip { color: #b9acba; font-size: 11px; line-height: 1.7; margin-top: 19px !important; }
.visit-stats { color: #edc97a; font-size: 12px; margin-top: 12px !important; }
.page-footer small { display: block; color: #84648f; font-size: 10px; letter-spacing: .25em; margin-top: 18px; }

.action-dialog { width: min(90vw, 390px); max-height: min(90vh, 600px); padding: 0; color: #fff; background: linear-gradient(150deg, #260d36, #100819); border: 1px solid rgba(255,191,62,.55); border-radius: 22px; box-shadow: 0 16px 70px #000a; }
.action-dialog::backdrop { background: rgba(5,0,13,.78); backdrop-filter: blur(5px); }
.dialog-body { position: relative; text-align: center; padding: 29px 22px 24px; }
.dialog-close { position: absolute; top: 8px; right: 12px; background: transparent; border: none; color: #ecd3ea; font-size: 28px; cursor: pointer; }
.dialog-symbol { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto 14px; background: linear-gradient(140deg, #f4c65a, #6735a0 45%, #f4a522); border-radius: 50%; color: #ffd774; font: 900 24px Impact, sans-serif; text-shadow: 2px 3px #240d49; }
.dialog-body h2 { font-size: 22px; margin: 0 0 12px; color: #ffbd36; }
.dialog-body p { font-size: 14px; color: #e0cfe7; line-height: 1.8; white-space: pre-line; margin: 0 0 18px; overflow-wrap: anywhere; }
.dialog-password { border: 1px dashed rgba(255,192,55,.65); background: rgba(6,0,17,.6); border-radius: 14px; padding: 12px; margin-bottom: 16px; display: flex; gap: 9px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dialog-password span { color: #e5d0cb; font-size: 12px; }
.dialog-password strong { color: #ffc94d; font-size: 23px; letter-spacing: .1em; }
.dialog-password button { background: #49315b; color: white; border: 1px solid #ad7d52; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 12px; }
.dialog-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.dialog-primary, .dialog-secondary { min-width: 112px; text-decoration: none; padding: 11px 15px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 700; }
.dialog-primary { background: linear-gradient(110deg, #ffb329, #f68a13); color: #2b1405; }
.dialog-secondary { background: transparent; color: #f5e1ef; border: 1px solid #745777; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; z-index: 20; padding: 10px 18px; color: #291000; background: #ffce6c; border-radius: 999px; box-shadow: 0 9px 25px #0008; font-size: 13px; transition: opacity .2s ease, transform .2s ease; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
    :root { --header-height: 70px; }
    .main-content { padding: 12px 16px 21px; }
    .link-card { min-height: 81px; padding: 8px 10px 8px 8px; }
    .link-avatar { width: 60px; height: 60px; }
    .links-list { gap: 18px; }
    .link-label { font-size: clamp(16px, 4.55vw, 21px); }
    .link-card--short { min-height: 76px; }
    .section-divider { height: 26px; margin-inline: 10px; }
}
@media (max-width: 359px) {
    .header-brand { gap: 8px; font-size: 18px; }
    .main-content { padding-inline: 10px; }
    .link-card { min-height: 72px; padding-left: 7px; }
    .link-avatar { width: 51px; height: 51px; }
    .link-label { font-size: 15.5px; letter-spacing: -.02em; }
}
@media (min-width: 700px) {
    .main-content { padding-top: 25px; }
    .intro { margin-bottom: 24px; }
    .links-list { gap: 21px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
