Files
WT-Offline/packages/local-service/src/store/web/styles.css
T
N0VAN0M4LY 98812fa9c2 feat(store): add store and marketplace item views and image sources
Add catalogue filters, item detail views, and purchase and resale
actions. Resolve images from the player's asset pack, public image
URLs, or local game data. Add a utility for creating the optional
local asset pack.

Type checking and JavaScript syntax checks passed. Embedded browser
appearance and in-game behavior still need acceptance.
2026-11-26 07:12:38 +08:00

91 lines
7.7 KiB
CSS

/* Local store page, laid out like the official Gaijin.Net store (implementation notes
section 3; Chromium 100: no :has(), container queries or CSS nesting). Fonts fall back to system fonts. */
:root {
--navy-5: #030c15; --navy-40: #27323f; --navy-60: #2d3a48; --navy-75: #424e5b;
--text: #c0c4c8; --gray-50: #969ca4; --teal: #29b2bc; --teal-hi: #31eeda; --gold: #ffe8aa;
--line: rgba(166, 221, 255, 0.1);
--font: "Fira Sans", "Segoe UI", "Microsoft YaHei", sans-serif; --font-ui: "PT Root UI", var(--font);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--navy-40) linear-gradient(180deg, #1b2530 0%, #27323f 420px); color: var(--text); font: 16px/1.5 var(--font); min-width: 1024px; }
.page { width: 1218px; max-width: calc(100% - 32px); margin: 0 auto; }
.gbar { display: flex; align-items: center; gap: 18px; height: 42px; padding: 0 12px; background: var(--navy-5); font-size: 13px; }
.gbar-logo { width: 22px; height: 22px; border-radius: 4px; background: #d32f2f; color: #fff; font-weight: 700; text-align: center; line-height: 22px; }
.gbar-item { color: var(--text); text-decoration: none; cursor: pointer; }
.gbar-item.active { color: #fff; border-bottom: 2px solid #fff; padding-bottom: 2px; }
.gbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.gbar-money b { color: var(--gold); font-weight: 500; }
.gbar select { height: 28px; border: 1px solid var(--line); border-radius: 3px; background: #0d1823; color: #fff; font: inherit; }
.snav { display: flex; align-items: center; gap: 28px; height: 76px; border-bottom: 1px solid var(--line); font: 18px/27px var(--font-ui); }
.wt-logo { display: flex; align-items: center; gap: 8px; color: #b8bcc1; letter-spacing: 0.12em; font-size: 15px; margin-right: 12px; }
.wt-mark { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #ff4b3a 30%, #b3170c 70%); }
.snav-item { color: var(--text); text-decoration: none; cursor: pointer; transition: color 0.3s; }
.snav-item:hover, .snav-item.active { color: var(--teal-hi); }
.frow { display: flex; align-items: center; gap: 14px; height: 56px; border-bottom: 1px solid var(--line); }
.frow select, .frow input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--text); font: 14px var(--font); }
.frow select option { background: var(--navy-60); }
.frow input { width: 260px; }
.frow .sort { margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 24px 0 40px; }
.pw { position: relative; display: flex; flex-direction: column; height: 344px; background: var(--navy-60); overflow: hidden; cursor: pointer; transition: transform 0.3s; }
.pw:hover { transform: translateY(-3px); }
.pw-poster { position: relative; height: 162px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #33475a, var(--navy-60)); }
.pw-poster img { max-width: 92%; max-height: 92%; object-fit: contain; }
.pw-poster img.cover { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.badge { position: absolute; left: 0; right: 0; top: 0; height: 30px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; color: #fff; font-size: 14px; text-transform: uppercase; background: linear-gradient(90deg, #0050e0, #1a8cff); }
.badge.owned { background: linear-gradient(90deg, #3a8a2a, #6cc04a); }
.pw-desc { flex: 1; padding: 10px 14px 0; min-height: 0; overflow: hidden; }
.pw-game { color: var(--text); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.pw-title { margin: 2px 0 4px; color: #fff; font-size: 18px; line-height: 1.3; max-height: 70px; overflow: hidden; }
.pw-comment { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.pw-comment img { width: 26px; height: 17px; object-fit: contain; }
.pw-contents { margin: 6px 0 0; padding-left: 16px; font-size: 13px; color: var(--gray-50); }
.pw-price { padding: 0 14px 12px; text-align: right; color: var(--gold); font-size: 20px; }
.pw-buy { display: flex; height: 40px; border-top: 1px solid var(--line); }
.pw-buy button { flex: 1; border: none; border-right: 1px solid var(--line); background: transparent; color: var(--gold); font: 16px var(--font-ui); text-transform: uppercase; cursor: pointer; transition: background 0.3s; }
.pw-buy button:last-child { border-right: none; }
.pw-buy button:hover { background: #ffffff0f; }
.pw-buy button:disabled { color: var(--gray-50); cursor: default; background: transparent; }
.empty { grid-column: 1 / -1; color: var(--gray-50); padding: 40px 0; }
.detail { padding: 24px 0 40px; }
.detail h1 { margin: 0 0 20px; color: #fff; font-size: 40px; font-weight: 700; }
.back { color: var(--teal); cursor: pointer; font-size: 15px; display: inline-block; margin-bottom: 12px; }
.detail-cols { display: flex; gap: 24px; align-items: flex-start; }
.detail-left { flex: 1; min-width: 0; }
.media { height: 452px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #3a4d60, #1b2633 75%); }
.media img { max-width: 90%; max-height: 90%; object-fit: contain; }
.media img.cover { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.thumbs { display: flex; gap: 8px; padding: 8px 0; }
.thumbs img { width: 132px; height: 85px; object-fit: contain; background: #1b2633; border: 2px solid transparent; cursor: pointer; }
.thumbs img.active { border-color: #f9ae3d; }
.detail-left h2 { color: #fff; font-size: 32px; font-weight: 300; margin: 24px 0 8px; }
.bonus { margin-top: 24px; padding: 28px 32px; background: linear-gradient(90deg, #5c5030, #e8d08a); color: #3a2a10; }
.bonus h3 { margin: 0 0 8px; font-size: 32px; text-transform: uppercase; }
.detail-right { flex: none; width: 390px; }
.buy-panel { padding: 24px 40px 28px; background: #1f2a36; text-align: center; }
.buy-panel .price { color: #fff; font-size: 26px; margin: 8px 0 16px; }
.btn-main { width: 310px; max-width: 100%; height: 56px; border: none; border-radius: 3px; background: linear-gradient(180deg, #ff7a2f, #d9381e); color: #fff; font: 26px var(--font-ui); text-transform: uppercase; box-shadow: 0 5px 13px rgba(89, 16, 0, 0.65); cursor: pointer; }
.btn-free { width: 310px; max-width: 100%; height: 44px; margin-top: 12px; border: 1px solid var(--gold); border-radius: 3px; background: transparent; color: var(--gold); font: 18px var(--font-ui); cursor: pointer; }
.btn-main:disabled, .btn-free:disabled { filter: grayscale(1); opacity: 0.7; cursor: default; }
.includes { margin-top: 20px; text-align: left; }
.includes h4 { margin: 0 0 8px; color: var(--text); font-size: 17px; font-weight: 400; }
.includes li { list-style: none; display: flex; align-items: center; gap: 8px; color: #fff; padding: 3px 0; }
.includes img { width: 26px; height: 17px; object-fit: contain; }
.rank-chip { padding: 0 6px; border-radius: 2px; background: #f9ae3d; color: #1b1408; font-size: 13px; font-weight: 700; }
.notice { display: none; margin: 16px 0 0; padding: 10px 14px; border: 1px solid var(--line); }
.notice.ok { display: block; color: #98ff87; } .notice.err { display: block; color: #ff9270; }
.redeem { padding: 32px 0 48px; max-width: 760px; }
.redeem-row { display: flex; gap: 12px; }
.redeem-row input { flex: 1; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: #1b2633; color: #fff; font: 16px var(--font); }
.redeem-row .btn-main { width: 180px; height: 44px; font-size: 18px; }
.redeem-help { color: var(--gray-50); padding-left: 18px; }
.foot { padding: 32px 0; border-top: 1px solid var(--line); color: var(--gray-50); font-size: 13px; text-align: center; }