:root {
  color-scheme: dark;
  --ink: #0b0d0c;
  --panel: #121513;
  --panel-2: #181c19;
  --paper: #f1f2e9;
  --muted: #8e968d;
  --line: #2a302b;
  --acid: #c8ff3d;
  --red: #ff5c47;
  --blue: #80a9ff;
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .035; z-index: 10; background-image: repeating-linear-gradient(117deg, #fff0 0, #fff0 3px, #fff 4px, #fff0 5px); background-size: 11px 13px; }

.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { color: var(--paper); text-decoration: none; display: flex; gap: 12px; align-items: center; font-weight: 900; letter-spacing: -.03em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--acid); color: var(--ink); font-size: 13px; clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%); }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .14em; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.global-currency { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.global-currency select { width: 112px; padding: 10px 28px 10px 12px; border-radius: 999px; background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; font-size: 11px; font-weight: 800; }
.install-button, .lookup button { background: transparent; color: var(--acid); border: 1px solid #55672d; padding: 10px 15px; border-radius: 999px; }

.hero { padding: 90px 0 64px; position: relative; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: .18em; display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.eyebrow span { width: 7px; height: 7px; background: var(--acid); border-radius: 50%; box-shadow: 0 0 14px var(--acid); }
.hero h1 { font-size: clamp(52px, 9vw, 116px); line-height: .9; letter-spacing: -.075em; margin: 25px 0 30px; max-width: 930px; }
.hero h1 em { color: var(--acid); font-style: normal; }
.hero > p { font-size: clamp(16px, 2vw, 21px); color: #adb4ac; max-width: 620px; line-height: 1.7; }
.hero-note { position: absolute; right: 0; bottom: 68px; width: 220px; border-top: 1px solid #596159; padding-top: 12px; }
.hero-note strong, .hero-note span { display: block; }
.hero-note strong { color: var(--acid); font-size: 12px; margin-bottom: 6px; }
.hero-note span { color: var(--muted); font-size: 12px; line-height: 1.55; }

.calculator { background: var(--panel); border: 1px solid var(--line); border-radius: 30px; padding: clamp(22px, 5vw, 54px); box-shadow: 0 40px 100px #0008; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.step-tag { color: var(--acid); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.panel-heading h2, .lookup h2, .notes h2 { margin: 8px 0 0; font-size: clamp(28px, 5vw, 50px); letter-spacing: -.05em; }
.live-dot { color: #aab1aa; font-size: 12px; }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--acid); border-radius: 50%; margin-right: 7px; }
fieldset { border: 0; padding: 38px 0 0; margin: 0; }
legend, .field > span, .section-title > span { color: #c3c8c1; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
legend b, .field > span b, .section-title b { color: var(--acid); margin-right: 7px; }
.terminal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.terminal-card { display: block; position: relative; }
.terminal-card input { position: absolute; opacity: 0; pointer-events: none; }
.terminal-card-content { min-height: 122px; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; transition: .2s ease; background: #151916; }
.terminal-card strong { font-size: 21px; letter-spacing: -.03em; }
.terminal-card small { color: var(--muted); font-size: 12px; }
.terminal-card-content::after { content: "○"; position: absolute; right: 21px; top: 19px; color: #6c746c; }
.terminal-card input:checked + .terminal-card-content { border-color: var(--acid); background: linear-gradient(135deg, #20271a, #151916 60%); box-shadow: inset 0 0 0 1px #c8ff3d22; }
.terminal-card input:checked + .terminal-card-content::after { content: "●"; color: var(--acid); }
.terminal-card input:focus-visible + .terminal-card-content { outline: 2px solid var(--blue); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.weapon-section { margin-top: 34px; }
.weapon-section-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 13px; }
.weapon-section-head > span { color: #c3c8c1; font-size: 13px; font-weight: 700; }
.weapon-section-head > span b { color: var(--acid); margin-right: 7px; }
.weapon-search { width: min(300px, 48%); position: relative; }
.weapon-search span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; pointer-events: none; }
.weapon-search input { width: 100%; padding: 10px 12px 10px 48px; font-size: 12px; }
.weapon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 430px; overflow: auto; padding: 2px 5px 2px 2px; scrollbar-color: #4b544c transparent; }
.weapon-option { min-width: 0; min-height: 158px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 4px; text-align: left; padding: 10px 13px 13px; border: 1px solid color-mix(in srgb, var(--rarity-color, var(--line)) 45%, var(--line)); border-radius: 14px; color: var(--paper); background: linear-gradient(180deg, color-mix(in srgb, var(--rarity-color, #73808c) 10%, #0f1210), #0f1210 65%); overflow: hidden; transition: border-color .18s, background .18s, transform .18s; }
.weapon-option:hover { border-color: var(--rarity-color, #697069); transform: translateY(-1px); }
.weapon-option[aria-selected="true"] { border-color: var(--acid); background: linear-gradient(145deg, color-mix(in srgb, var(--rarity-color, #73808c) 18%, #20271a), #111411 70%); box-shadow: inset 0 0 0 1px #c8ff3d24; }
.weapon-option[aria-selected="true"]::after { content: "已选择"; position: absolute; top: 9px; right: 9px; padding: 4px 7px; border-radius: 99px; background: var(--acid); color: var(--ink); font-size: 9px; font-weight: 900; }
.weapon-art { position: absolute; inset: 5px 4px 50px; display: grid; place-items: center; padding: 3px; }
.weapon-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 3px; box-sizing: border-box; object-fit: contain; object-position: center; filter: drop-shadow(0 9px 9px #0008); opacity: 0; transition: opacity .2s; }
.weapon-art img.loaded { opacity: 1; }
.weapon-art span { position: absolute; color: #3a423b; font-size: 25px; font-weight: 950; letter-spacing: -.06em; }
.weapon-art img.loaded + span { display: none; }
.weapon-option strong { position: relative; z-index: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.rarity-pill { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 5px; color: #9da59e; font-size: 9px; line-height: 1; }
.rarity-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--rarity-color, #73808c); box-shadow: 0 0 8px color-mix(in srgb, var(--rarity-color, #73808c) 70%, transparent); }
.wear-row { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; margin-top: 18px; }
.selected-weapon { min-height: 95px; display: flex; align-items: center; gap: 15px; padding: 9px 16px 9px 9px; border: 1px solid var(--line); border-radius: 14px; background: #151916; overflow: hidden; }
.selected-weapon-art { width: 135px; height: 75px; position: relative; display: grid; place-items: center; flex: 0 0 auto; }
.selected-weapon-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 2px; box-sizing: border-box; object-fit: contain; object-position: center; opacity: 0; filter: drop-shadow(0 8px 8px #0008); }
.selected-weapon-art img.loaded { opacity: 1; }
.selected-weapon-art span { position: absolute; color: #4a524b; font-size: 19px; font-weight: 900; }
.selected-weapon-art img.loaded + span { display: none; }
.selected-weapon small, .selected-weapon strong { display: block; }
.selected-weapon small { color: var(--acid); font-size: 10px; letter-spacing: .12em; margin-bottom: 6px; }
.selected-weapon strong { font-size: 15px; }
.field-row, .price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; }
.field { display: flex; flex-direction: column; }
select, input { color: var(--paper); background: #0f1210; border: 1px solid var(--line); border-radius: 12px; outline: none; transition: border-color .2s; }
select { width: 100%; padding: 16px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #818981 50%), linear-gradient(135deg, #818981 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus, input:focus { border-color: var(--acid); }
.switch-row { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 15px 17px; display: flex; align-items: center; }
.switch-row span { flex: 1; }
.switch-row strong, .switch-row small { display: block; }
.switch-row small { color: var(--muted); margin-top: 3px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { width: 45px; height: 25px; border-radius: 99px; background: #3b413c; padding: 3px; transition: .2s; }
.switch-row i::after { content: ""; display: block; width: 19px; height: 19px; border-radius: 50%; background: #979e97; transition: .2s; }
.switch-row input:checked + i { background: var(--acid); }
.switch-row input:checked + i::after { transform: translateX(20px); background: var(--ink); }
.price-section { margin-top: 40px; padding-top: 34px; border-top: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; align-items: center; }
.text-button { border: 0; background: transparent; color: var(--acid); font-size: 12px; padding: 6px; }
.money-field > div, .suffix-input { display: flex; align-items: center; position: relative; }
.money-field input { width: 100%; padding: 19px 18px 19px 58px; font-size: 24px; font-weight: 800; }
.money-field i { position: absolute; left: 18px; z-index: 1; color: var(--muted); font-style: normal; }
.price-status { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.price-status.success { color: var(--acid); }
.price-status.error { color: #f5a091; }
.advanced { margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.advanced summary { padding: 17px; color: #c8cec8; font-size: 13px; list-style: none; display: flex; justify-content: space-between; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary span { color: var(--muted); }
.advanced-body { border-top: 1px solid var(--line); padding: 18px; display: grid; grid-template-columns: 1.4fr .6fr; gap: 16px; }
.suffix-input input { width: 100%; padding: 15px 38px 15px 14px; }
.suffix-input i { position: absolute; right: 15px; color: var(--muted); font-style: normal; }
.suffix-input.prefix input { padding-left: 35px; }
.suffix-input.prefix i { left: 14px; right: auto; font-size: 10px; }
.check-row { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; color: #b1b7b1; font-size: 13px; }
.check-row input { accent-color: var(--acid); }
.terminal-cost { grid-column: 1 / -1; }
.calculate-button { width: 100%; margin-top: 24px; padding: 20px 24px; border: 0; border-radius: 14px; background: var(--acid); color: var(--ink); display: flex; justify-content: space-between; font-weight: 900; font-size: 17px; }
.calculate-button:hover { filter: brightness(1.07); }
.calculate-button b { font-size: 22px; }

.result-card { margin-top: 22px; border-radius: 30px; padding: clamp(24px, 5vw, 50px); background: var(--acid); color: var(--ink); transition: .25s; }
.result-card.loss { background: var(--red); }
.result-card.empty { background: #171b18; color: var(--paper); border: 1px solid var(--line); }
.result-topline { display: flex; justify-content: space-between; font-size: 10px; font-weight: 900; letter-spacing: .15em; padding-bottom: 25px; border-bottom: 1px solid #0b0d0c44; }
.result-main { display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: end; padding: 34px 0; }
.verdict-label, .result-number span { font-size: 11px; font-weight: 800; opacity: .65; text-transform: uppercase; }
.result-main h2 { font-size: clamp(32px, 6vw, 65px); line-height: 1; letter-spacing: -.06em; margin: 8px 0 12px; }
.result-main p { margin: 0; max-width: 550px; opacity: .7; }
.result-number { text-align: right; }
.result-number strong { display: block; font-size: clamp(36px, 7vw, 72px); letter-spacing: -.055em; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #0b0d0c44; border-bottom: 1px solid #0b0d0c44; }
.metrics div { padding: 21px 14px; border-right: 1px solid #0b0d0c44; }
.metrics div:first-child { padding-left: 0; }
.metrics div:last-child { border-right: 0; }
.metrics span, .metrics b { display: block; }
.metrics span { font-size: 11px; opacity: .6; margin-bottom: 7px; }
.metrics b { font-size: 19px; }
.formula { font-size: 11px; opacity: .65; margin: 18px 0 0; }

.lookup { margin: 90px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: end; }
.lookup-copy p { color: var(--muted); line-height: 1.7; max-width: 520px; }
.lookup button { margin-top: 8px; }
.market-links { display: grid; gap: 10px; }
.market-links a { color: var(--paper); text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; grid-template-columns: 75px 1fr auto; align-items: center; transition: .2s; }
.market-links a:hover { border-color: var(--acid); transform: translateY(-2px); }
.market-links span { color: var(--acid); font-size: 10px; letter-spacing: .12em; }
.market-links b { font-size: 21px; }
.notes { border-top: 1px solid var(--line); padding: 60px 0 80px; display: grid; grid-template-columns: .6fr 1.4fr; gap: 50px; }
.notes h2 { font-size: 30px; }
.notes p { color: var(--muted); line-height: 1.7; margin: 0 0 18px; }
.notes p b { color: var(--paper); }
footer { border-top: 1px solid var(--line); padding: 25px 0 40px; display: flex; justify-content: space-between; color: #666e67; font-size: 10px; letter-spacing: .12em; }

@media (max-width: 720px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { height: 68px; }
  .global-currency span { display: none; }
  .global-currency select { width: 96px; }
  .hero { padding: 65px 0 45px; }
  .hero-note { display: none; }
  .hero h1 { font-size: clamp(50px, 16vw, 76px); }
  .calculator { border-radius: 22px; }
  .terminal-grid, .field-row, .price-grid, .lookup, .notes, .wear-row { grid-template-columns: 1fr; }
  .field-row, .price-grid { gap: 15px; }
  .weapon-section-head { align-items: flex-start; flex-direction: column; }
  .weapon-search { width: 100%; }
  .weapon-grid { grid-template-columns: repeat(2, 1fr); max-height: 470px; }
  .weapon-option { min-height: 142px; }
  .selected-weapon-art { width: 115px; }
  .advanced-body { grid-template-columns: 1fr; }
  .check-row, .terminal-cost { grid-column: 1; }
  .section-title { align-items: flex-start; gap: 10px; }
  .text-button { text-align: right; max-width: 150px; }
  .result-main { grid-template-columns: 1fr; }
  .result-number { text-align: left; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics div { border-bottom: 1px solid #0b0d0c44; }
  .metrics div:nth-child(2) { border-right: 0; }
  .lookup { gap: 35px; margin: 65px 0; }
  .notes { gap: 15px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
