@import url("https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;500;600;700&display=swap");

:root {
  --ink: #06110d;
  --ink-soft: #0b1d17;
  --jade: #86e6b0;
  --jade-bright: #c2f8d7;
  --gold: #e5c77f;
  --paper: #eef8f0;
  --muted: #8ba69a;
  --line: rgba(166, 230, 190, .17);
  --glass: rgba(8, 25, 19, .72);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 50% 35%, rgba(38, 101, 72, .2), transparent 34%),
    linear-gradient(145deg, #030a08 0%, #071511 44%, #020806 100%);
  font-family: "Microsoft YaHei", "微软雅黑", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 20;
}

button, input { font: inherit; }
button { color: inherit; }

.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; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient::after {
  content: ""; position: absolute; inset: auto -10% -16vh; height: 43vh;
  background: linear-gradient(to top, rgba(5, 16, 12, .98) 18%, transparent),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 180Q120 80 250 160T520 120T780 170T1030 100T1200 150V260H0Z' fill='%230b2119'/%3E%3Cpath d='M0 220Q190 105 390 200T790 155T1200 205V260H0Z' fill='%23061711'/%3E%3C/svg%3E") center bottom/cover no-repeat;
  opacity: .95;
}

.moon {
  position: absolute; left: 50%; top: 12%; width: 34rem; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; opacity: .27; filter: blur(1px);
  background: radial-gradient(circle, rgba(159, 235, 188, .34) 0 1%, rgba(93, 181, 129, .1) 32%, transparent 68%);
  animation: breathe 7s ease-in-out infinite;
}

.mist { position: absolute; width: 85vw; height: 10rem; filter: blur(34px); opacity: .13; border-radius: 50%; background: #9ed6bc; animation: drift 18s ease-in-out infinite alternate; }
.mist-one { left: -24vw; top: 38%; }
.mist-two { right: -30vw; top: 63%; animation-delay: -8s; animation-direction: alternate-reverse; }

.bamboo { position: absolute; bottom: -8%; height: 92%; width: 22%; opacity: .18; filter: blur(.2px); }
.bamboo-left { left: -3%; transform: rotate(3deg); }
.bamboo-right { right: -5%; transform: scaleX(-1) rotate(3deg); opacity: .12; }
.bamboo::before, .bamboo::after {
  content: ""; position: absolute; bottom: 0; width: 12px; height: 100%; border-radius: 8px;
  background: repeating-linear-gradient(to bottom, #75b88d 0 80px, #213d30 82px 88px);
  box-shadow: inset 3px 0 4px rgba(200,255,220,.18);
}
.bamboo::before { left: 22%; transform: rotate(-5deg); }
.bamboo::after { left: 64%; height: 88%; transform: rotate(6deg); }
.bamboo i { position: absolute; width: 96px; height: 30px; border-radius: 100% 0 100% 0; background: linear-gradient(10deg, #254c39, #78a98a); transform-origin: 0 50%; }
.bamboo i:nth-child(1) { left: 26%; top: 13%; transform: rotate(-34deg); }
.bamboo i:nth-child(2) { left: 24%; top: 30%; transform: rotate(18deg) scaleX(.8); }
.bamboo i:nth-child(3) { left: 62%; top: 24%; transform: rotate(-35deg) scale(.9); }
.bamboo i:nth-child(4) { left: 64%; top: 52%; transform: rotate(22deg) scale(.7); }

.firefly { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #d7ffad; box-shadow: 0 0 8px 2px rgba(191, 255, 149, .75); animation: floatUp var(--duration) ease-in-out var(--delay) infinite; opacity: 0; }

.topbar { position: relative; z-index: 5; height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 74px); border-bottom: 1px solid rgba(178, 231, 196, .08); }
.mini-brand { display: flex; align-items: center; gap: 12px; color: #dff5e6; font-weight: 600; letter-spacing: .16em; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; filter: drop-shadow(0 0 10px rgba(110, 230, 159, .16)); }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: rgba(9, 28, 21, .52); cursor: pointer; transition: .3s ease; }
.icon-button:hover { border-color: rgba(134, 230, 176, .55); background: rgba(36, 83, 60, .45); transform: rotate(-15deg); }
.icon-button svg { width: 19px; fill: none; stroke: #a9c8b6; stroke-width: 1.5; stroke-linecap: round; }

main { position: relative; z-index: 2; min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 42px 20px 95px; }
.hero { width: min(920px, 100%); text-align: center; animation: reveal .9s cubic-bezier(.2,.8,.2,1) both; }
.seal { width: 42px; height: 42px; margin: 0 auto 15px; display: grid; place-items: center; border: 1px solid rgba(218, 181, 104, .75); color: var(--gold); transform: rotate(45deg); box-shadow: inset 0 0 16px rgba(211, 169, 86, .08), 0 0 26px rgba(211, 169, 86, .07); }
.seal span { font-family: "Ma Shan Zheng", cursive; font-size: 25px; transform: rotate(-45deg); }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 0 10px; color: #7fa390; font-size: 12px; letter-spacing: .38em; }
.eyebrow span { width: 38px; height: 1px; background: linear-gradient(90deg, transparent, #608e76); }
.eyebrow span:last-child { transform: scaleX(-1); }
h1 { margin: 0; font-family: "Ma Shan Zheng", "STKaiti", cursive; font-size: clamp(64px, 9vw, 106px); line-height: 1.14; font-weight: 400; letter-spacing: .09em; color: #e9f4eb; text-shadow: 0 6px 35px rgba(0,0,0,.55); }
h1 span { color: var(--jade-bright); background: linear-gradient(135deg, #e4f9e9 10%, #77d49f 56%, #d7bc75 120%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 7px 20px rgba(71, 174, 118, .18)); }
.subtitle { margin: 8px 0 40px; color: #93ad9f; font-size: clamp(14px, 2vw, 17px); letter-spacing: .32em; }

.search-shell { position: relative; padding: 8px; border: 1px solid rgba(137, 219, 169, .2); border-radius: 22px; background: linear-gradient(135deg, rgba(16, 44, 33, .76), rgba(4, 15, 11, .84)); box-shadow: 0 28px 80px rgba(0,0,0,.4), inset 0 1px rgba(255,255,255,.025); backdrop-filter: blur(24px); }
.search-shell::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(115deg, transparent 18%, rgba(153, 241, 188, .45), transparent 49%); mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; pointer-events: none; opacity: .65; }
.engine-picker { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 52px; padding: 7px 10px 9px; }
.engine-label { color: #5f7d6e; font-size: 12px; letter-spacing: .14em; }
.custom-select { position: relative; z-index: 4; }
.engine-toggle { position: relative; display: flex; align-items: center; gap: 10px; min-width: 154px; height: 40px; overflow: hidden; border: 1px solid rgba(134, 230, 176, .22); border-radius: 11px; padding: 0 11px; color: #d6ecde; background: linear-gradient(135deg, rgba(72, 149, 103, .15), rgba(15, 48, 34, .18)); box-shadow: inset 0 1px rgba(255,255,255,.035), 0 8px 20px rgba(0,0,0,.12); cursor: pointer; transition: border-color .28s, background .28s, box-shadow .28s, transform .28s; }
.engine-toggle::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 15%, rgba(171, 244, 199, .12), transparent 70%); transform: translateX(-110%); transition: transform .6s; }
.engine-toggle:hover { border-color: rgba(134, 230, 176, .48); background: linear-gradient(135deg, rgba(72, 149, 103, .23), rgba(15, 48, 34, .25)); box-shadow: 0 9px 25px rgba(22, 100, 57, .14), inset 0 1px rgba(255,255,255,.06); transform: translateY(-1px); }
.engine-toggle:hover::before { transform: translateX(110%); }
.engine-toggle > span, .engine-toggle > svg { position: relative; z-index: 1; }
.engine-toggle > svg { width: 16px; margin-left: auto; fill: none; stroke: #7db393; stroke-width: 1.8; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.custom-select.open .engine-toggle { border-color: rgba(134, 230, 176, .58); background: rgba(65, 137, 94, .22); box-shadow: 0 0 0 3px rgba(89, 190, 129, .07), 0 12px 30px rgba(0,0,0,.2); }
.custom-select.open .engine-toggle > svg { transform: rotate(180deg); }
.engine-orb { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(173, 241, 199, .38); border-radius: 8px; color: #bff1d1; background: radial-gradient(circle at 30% 20%, rgba(203, 255, 221, .18), rgba(70, 155, 104, .1)); box-shadow: 0 0 13px rgba(106, 218, 149, .1); font-size: 11px; font-weight: 600; }
.engine-menu { position: absolute; top: calc(100% + 9px); left: 0; width: 100%; visibility: hidden; opacity: 0; padding: 6px; border: 1px solid rgba(138, 216, 167, .2); border-radius: 12px; background: rgba(7, 25, 18, .96); box-shadow: 0 18px 46px rgba(0,0,0,.46), inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(24px); transform: translateY(-8px) scale(.96); transform-origin: top; transition: opacity .24s, transform .34s cubic-bezier(.2,.9,.2,1.15), visibility .24s; }
.custom-select.open .engine-menu { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
.engine-option { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 8px; padding: 8px; color: #86a897; background: transparent; text-align: left; cursor: pointer; transition: color .22s, background .22s, transform .22s; }
.engine-option:hover, .engine-option:focus-visible { outline: 0; color: #d9f0e1; background: rgba(103, 198, 141, .1); transform: translateX(2px); }
.engine-option.selected { color: #cdf0da; background: linear-gradient(90deg, rgba(91, 188, 129, .14), transparent); }
.engine-option.selected::after { content: ""; position: absolute; right: 10px; width: 5px; height: 5px; border-radius: 50%; background: #9ce5b7; box-shadow: 0 0 8px #83dca5; }
.engine-option .engine-orb { width: 22px; height: 22px; border-radius: 7px; }

.search-box { display: flex; align-items: center; min-height: 76px; border: 1px solid rgba(170, 230, 194, .13); border-radius: 15px; background: rgba(1, 9, 6, .52); transition: border .3s, box-shadow .3s; }
.search-box:focus-within { border-color: rgba(121, 224, 164, .45); box-shadow: 0 0 0 3px rgba(92, 190, 132, .07), inset 0 0 36px rgba(70, 143, 99, .05); }
.search-icon { flex: 0 0 23px; width: 23px; margin-left: 25px; fill: none; stroke: #78ae8d; stroke-width: 1.5; stroke-linecap: round; }
.search-box input { flex: 1; min-width: 60px; height: 74px; border: 0; outline: 0; padding: 0 18px; color: #eef8f0; background: transparent; font-size: 17px; letter-spacing: .04em; }
.search-box input::placeholder { color: #587265; }
.search-box input::-webkit-search-cancel-button { display: none; }
.clear-button { display: none; border: 0; padding: 10px 14px; color: #6f9180; background: transparent; font-size: 24px; cursor: pointer; }
.clear-button.visible { display: block; }
.search-button { position: relative; align-self: stretch; min-width: 152px; margin: 8px; border: 1px solid rgba(157, 236, 187, .35); border-radius: 11px; overflow: hidden; color: #082016; background: linear-gradient(135deg, #b6edca, #65bd8d); box-shadow: 0 8px 26px rgba(47, 151, 90, .16); font-weight: 600; letter-spacing: .12em; cursor: pointer; transition: .3s ease; }
.search-button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.5) 48%, transparent 75%); transform: translateX(-120%); transition: transform .65s; }
.search-button:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(61, 186, 113, .3); }
.search-button:hover::before { transform: translateX(120%); }
.search-button span { position: relative; z-index: 1; }
.search-button svg { position: relative; z-index: 1; width: 18px; margin-left: 7px; fill: none; stroke: currentColor; stroke-width: 1.8; vertical-align: -4px; transition: transform .25s; }
.search-button:hover svg { transform: translateX(3px); }
.search-foot { display: flex; justify-content: space-between; padding: 12px 14px 6px; color: #536e61; font-size: 11px; }
.search-foot p { margin: 0; }
.search-foot kbd { border: 1px solid rgba(133, 178, 151, .2); border-radius: 4px; padding: 2px 5px; background: rgba(255,255,255,.03); font-size: 10px; }
.engine-status strong { color: #86ae98; font-weight: 500; }

.history-panel { position: fixed; z-index: 30; top: 0; right: 0; width: min(390px, 90vw); height: 100vh; padding: 34px; border-left: 1px solid var(--line); background: rgba(4, 15, 11, .94); box-shadow: -30px 0 80px rgba(0,0,0,.45); backdrop-filter: blur(30px); transform: translateX(105%); transition: transform .48s cubic-bezier(.2,.8,.2,1); }
.history-panel.open { transform: translateX(0); }
.panel-backdrop { position: fixed; z-index: 29; inset: 0; visibility: hidden; opacity: 0; background: rgba(0, 5, 3, .52); backdrop-filter: blur(3px); transition: .35s; }
.panel-backdrop.open { visibility: visible; opacity: 1; }
.history-head { display: flex; justify-content: space-between; align-items: start; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.history-head small { color: #547064; letter-spacing: .25em; }
.history-head h2 { margin: 5px 0 0; font-family: "Ma Shan Zheng", cursive; color: #c9e7d4; font-size: 30px; font-weight: 400; letter-spacing: .12em; }
.close-button { border: 0; color: #739182; background: transparent; font-size: 30px; cursor: pointer; }
.history-list { display: grid; gap: 6px; margin: 22px 0; max-height: calc(100vh - 220px); overflow-y: auto; }
.history-item { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; border-radius: 9px; padding: 12px; text-align: left; color: #a5c2b2; background: transparent; cursor: pointer; transition: .2s; }
.history-item:hover { color: #d9eee0; background: rgba(113, 199, 147, .08); }
.history-item svg { width: 15px; fill: none; stroke: #577365; }
.empty-history { padding: 60px 10px; text-align: center; color: #4f6a5d; line-height: 2; }
.clear-history { width: 100%; border: 1px solid rgba(214, 138, 111, .14); border-radius: 9px; padding: 10px; color: #a77b6c; background: rgba(91, 41, 29, .08); cursor: pointer; }

footer { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; min-height: 76px; margin: 0 clamp(22px,5vw,74px); border-top: 1px solid rgba(162, 219, 184, .07); color: #526f62; font-size: 11px; letter-spacing: .15em; }
footer p, footer span { margin: 0; }
.footer-info { display: flex; align-items: center; gap: 22px; }
.footer-info a { color: inherit; text-decoration: none; transition: color .25s; }
.footer-info a:hover { color: #91bfa4; }

@keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { opacity: .4; transform: translateX(-50%) scale(1.07); } }
@keyframes drift { to { transform: translateX(35vw) scale(1.15); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(0, 40px); } 20%, 70% { opacity: .8; } 50% { transform: translate(22px, -20px); } 100% { opacity: 0; transform: translate(-16px, -90px); } }

@media (max-width: 680px) {
  .topbar { height: 68px; }
  .mini-brand span { font-size: 14px; }
  .brand-mark { width: 36px; }
  main { padding: 34px 13px 70px; min-height: calc(100vh - 130px); }
  .subtitle { margin-bottom: 30px; }
  .search-shell { padding: 6px; border-radius: 17px; }
  .engine-picker { min-height: 48px; padding-block: 5px 7px; }
  .engine-toggle { min-width: 132px; }
  .search-box { min-height: 66px; }
  .search-icon { margin-left: 18px; }
  .search-box input { height: 64px; padding-inline: 12px; font-size: 15px; }
  .search-button { min-width: 58px; width: 58px; margin: 7px; font-size: 0; }
  .search-button svg { width: 21px; margin: 0; }
  .search-foot { justify-content: center; }
  .search-foot p:first-child { display: none; }
  footer { justify-content: center; text-align: center; }
  footer p { display: none; }
  .footer-info { flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
  .bamboo { width: 35%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
