:root {
  --pine: #173b42; --lake: #287c88; --deep: #102c34; --paper: #fff8dc;
  --sand: #f0d58b; --wood: #77452d; --ink: #20352f; --muted: #68776d;
  --accent: #7b4aa2; --line: #a9b993;
}
* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: linear-gradient(#91cfcc 0 28%, #d8e9bd 28% 100%); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.lake-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(#72bdca 0, #b8dcce 31%, #5d9e81 31%, #376f64 39%, #6eac9a 40%, #8fc9b2 61%, #d8e9bd 62%); }
.far-hills { position: absolute; left: -3%; right: -3%; top: 17%; height: 24%; opacity: .8; background: linear-gradient(148deg, transparent 0 28%, #548d70 29% 42%, transparent 43%), linear-gradient(210deg, transparent 0 38%, #477d68 39% 58%, transparent 59%); }
.water-lines { position: absolute; left: 0; right: 0; top: 39%; height: 22%; opacity: .35; background: repeating-linear-gradient(0deg, transparent 0 11px, rgba(255,255,225,.75) 12px 14px); }
.star { position: absolute; width: 6px; height: 6px; background: #fffbd2; box-shadow: 0 0 11px #fff; transform: rotate(45deg); }
.star-one { left: 13%; top: 9%; } .star-two { right: 17%; top: 16%; } .star-three { left: 68%; top: 6%; }
.hero { display: flex; align-items: center; gap: 15px; width: min(780px, calc(100% - 28px)); margin: auto; padding: 27px 4px 18px; color: #fff; text-shadow: 0 2px 0 rgba(19,50,51,.45); }
.hero img { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(20,53,57,.35)); }
.hero small, .panel header small, .room-error small { font: 800 10px Consolas, monospace; letter-spacing: 1.7px; }
.hero h1 { margin: 2px 0; font-size: clamp(25px, 7vw, 38px); line-height: 1.18; }
.hero p { margin: 0; font-size: 12px; }
main { width: min(780px, calc(100% - 28px)); margin: auto; padding-bottom: 34px; }
.query-card, .panel, .profile, .room-error { background: var(--paper); border: 3px solid var(--deep); border-radius: 13px; box-shadow: 5px 6px 0 rgba(26,64,54,.30); }
.query-card { padding: 17px; margin-bottom: 18px; }
.room-badge { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 9px; margin: -4px -4px 14px; padding: 10px 12px; border: 2px solid #5d776a; border-radius: 8px; background: linear-gradient(100deg, #e7edcf, #f8edc3); }
.room-badge span { color: var(--muted); font-size: 10px; font-weight: 900; }
.room-badge b { justify-self: end; padding: 3px 8px; border-radius: 5px; background: var(--deep); color: #fff4b4; font: 800 12px Consolas, monospace; letter-spacing: .8px; }
.room-badge em { grid-column: 1 / -1; color: #52675c; font-size: 11px; font-style: normal; }
.platform-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 13px; }
.platform { padding: 10px; border: 2px solid #597166; border-radius: 7px; background: #e2e7c7; color: #425c51; font-weight: 900; transition: transform .15s ease, background .15s ease; }
.platform.active { background: var(--accent); border-color: color-mix(in srgb, var(--accent) 65%, #1c2430); box-shadow: inset 0 -3px rgba(0,0,0,.18); color: #fff; }
label span { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
input { width: 100%; padding: 13px 12px; border: 2px solid #78917a; border-radius: 7px; outline: none; background: #fffef2; }
input:focus, select:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--lake) 38%, transparent); outline-offset: 2px; }
.primary { width: 100%; margin-top: 11px; padding: 13px; border: 3px solid #23484b; border-radius: 8px; background: linear-gradient(color-mix(in srgb, var(--lake) 70%, #fff), var(--lake)); box-shadow: inset 0 2px rgba(255,255,255,.25), 0 3px #153b3f; color: #fff; font-weight: 900; }
.primary:active { transform: translateY(2px); box-shadow: inset 0 2px rgba(255,255,255,.2), 0 1px #153b3f; }
.primary:disabled { cursor: wait; filter: saturate(.55); opacity: .75; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.message { display: none; margin-top: 11px; padding: 10px 11px; border: 2px solid #c18d65; border-radius: 7px; background: #f7dfc1; color: #713b2d; font-size: 12px; }
.message.show { display: block; } .message.loading { border-color: #6f9791; background: #dcedd9; color: #315956; }
.profile { padding: 15px; margin-bottom: 18px; }
.player-head { display: flex; align-items: center; gap: 12px; padding: 5px 2px 15px; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 56px; height: 56px; border: 3px solid color-mix(in srgb, var(--accent) 55%, #192934); border-radius: 10px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 62%, #fff), var(--accent)); color: #fff; font-size: 23px; font-weight: 900; }
.player-name { min-width: 0; flex: 1; } .player-head small { color: var(--lake); font-weight: 900; }
.player-head h2 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-head p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.player-head > strong { padding: 7px 9px; border: 2px solid #6c4b28; border-radius: 6px; background: var(--sand); color: #654018; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.stats article { min-width: 0; padding: 10px 5px; text-align: center; border: 2px solid #96a985; border-radius: 7px; background: #edf0d1; }
.stats small, .stats em { display: block; color: var(--muted); font-size: 9px; font-style: normal; }
.stats b { display: inline-block; max-width: 100%; margin: 2px 0; overflow: hidden; color: var(--deep); font-size: 17px; text-overflow: ellipsis; }
.rank-strip { display: flex; justify-content: space-around; gap: 8px; margin: 12px 0 2px; padding: 9px; border-radius: 7px; background: #294f4e; color: #e9f3d6; font-size: 11px; }
.rank-strip b { color: #ffe291; }
.panel { margin-top: 14px; padding: 14px; }
.panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 2px dashed #aaba96; }
.panel header small { color: var(--lake); } .panel h3 { margin: 0; } .panel header > strong { color: var(--accent); }
select { max-width: 116px; padding: 7px; border: 2px solid #78917a; border-radius: 6px; background: #fffef2; color: var(--ink); }
.fish-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.fish-card { position: relative; min-width: 0; padding: 7px 4px; text-align: center; border: 2px solid #9aab87; border-radius: 7px; background: #eef1d4; }
.fish-card img { width: 58px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.fish-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.fish-card em { position: absolute; right: 3px; top: 3px; padding: 1px 4px; border-radius: 4px; background: #315e57; color: #fff; font: normal 9px Consolas, monospace; }
.rarity-rare { background: #d9eef0; } .rarity-epic { background: #eadcf2; } .rarity-legendary { background: #fff0bb; } .rarity-mythic { border-color: #9b5180; background: #f6d8eb; }
.catch-list, .ranking-list { display: grid; gap: 7px; margin-top: 11px; }
.catch-row, .rank-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 9px; padding: 8px; border: 2px solid #a5b491; border-radius: 7px; background: #f0f1d7; }
.catch-row img { width: 42px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.catch-row b, .rank-row b { font-size: 12px; } .catch-row small, .rank-row small { display: block; color: var(--muted); font-size: 9px; }
.rank-row > strong { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: #315e57; color: #fff; }
.rank-row:nth-child(1) > strong { background: #d29a32; } .rank-row:nth-child(2) > strong { background: #7e9296; } .rank-row:nth-child(3) > strong { background: #a86d45; }
.empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.room-error { width: min(440px, calc(100% - 30px)); margin: 12vh auto; padding: 30px 22px; text-align: center; }
.room-error img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(25,55,53,.25)); }
.room-error small { display: block; color: var(--lake); } .room-error h1 { margin: 7px 0; } .room-error p { margin: 0; color: var(--muted); }
footer { padding: 0 18px 28px; text-align: center; color: #49665a; font-size: 10px; }
@media (max-width: 520px) {
  .hero { padding-top: 18px; } .hero img { width: 64px; height: 64px; }
  .stats { grid-template-columns: repeat(2, 1fr); } .fish-grid { grid-template-columns: repeat(3, 1fr); }
  .query-card, .profile, .panel, .room-error { border-width: 2px; box-shadow: 3px 4px 0 rgba(26,64,54,.25); }
  .rank-strip { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .profile:not(.hidden) { animation: rise .35s ease both; }
  .star { animation: glow 2.4s ease-in-out infinite alternate; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  @keyframes glow { to { opacity: .35; transform: rotate(45deg) scale(.6); } }
}
