:root {
  --gold-1: #fff6cf;
  --gold-2: #ffe78c;
  --gold-3: #ffd256;
  --gold-4: #f5ad31;
  --gold-5: #d98520;
  --gold-6: #9f5b19;
  --cream: #fff9e8;
  --ink: #11141b;
  --panel: rgba(23, 26, 35, 0.88);
  --panel-strong: rgba(13, 16, 24, 0.96);
  --line: rgba(255, 211, 93, 0.22);
  --muted: #a9adbb;
  --text: #f7f3ea;
  --danger: #ff7d68;
  --success: #65d6a6;
}

html, body {
  min-height: 100%;
  background: #0b0e14;
}

body.golden-ui-active {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

body.golden-ui-active::before,
body.golden-ui-active::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .14;
  pointer-events: none;
  z-index: 0;
}
body.golden-ui-active::before { top: -16vw; right: -12vw; background: #ffd04d; }
body.golden-ui-active::after { bottom: -18vw; left: -14vw; background: #c66d16; }

#golden-root {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 214, 102, .10), transparent 34%),
    linear-gradient(180deg, #10141d 0%, #0c1018 46%, #090c12 100%);
}

.g-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.g-topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(10, 13, 19, .76);
  border-bottom: 1px solid rgba(255, 217, 111, .10);
}
.g-topbar-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.g-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.g-logo {
  width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center;
  color: #241406; font-size: 21px; font-weight: 900;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3) 45%, var(--gold-5));
  box-shadow: 0 8px 28px rgba(244, 174, 47, .28), inset 0 1px 0 rgba(255,255,255,.65);
}
.g-brand-title { font-weight: 900; letter-spacing: .02em; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-brand-title span { background: linear-gradient(90deg, #ffd15b, #fff0a8, #e59a2b); -webkit-background-clip: text; color: transparent; }
.g-top-actions { display: flex; align-items: center; gap: 8px; }

.g-btn {
  border: 0; border-radius: 14px; padding: 11px 17px; font-weight: 800; cursor: pointer;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.g-btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.g-btn:active { transform: translateY(0) scale(.985); }
.g-btn-primary {
  color: #2a1906;
  background: linear-gradient(105deg, #f1a626 0%, #ffd85d 42%, #fff0a5 70%, #e79424 100%);
  box-shadow: 0 12px 34px rgba(229, 151, 30, .28), inset 0 1px 0 rgba(255,255,255,.65);
}
.g-btn-soft { color: #ffeaa0; background: rgba(255, 213, 92, .09); border: 1px solid rgba(255, 219, 116, .20); }
.g-btn-ghost { color: #d7d9e1; background: transparent; border: 1px solid rgba(255,255,255,.10); }
.g-btn-danger { color: #ffd8d1; background: rgba(255, 94, 71, .12); border: 1px solid rgba(255, 123, 104, .24); }
.g-btn-sm { padding: 8px 12px; border-radius: 11px; font-size: 13px; }
.g-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.g-announcement-wrap { padding-top: 26px; }
.g-announcement {
  position: relative; overflow: hidden; min-height: 126px; padding: 25px 68px 26px 28px;
  border: 1px solid var(--line); border-radius: 26px;
  background: linear-gradient(110deg, rgba(255, 218, 101, .09), rgba(22, 26, 36, .92) 35%, rgba(13, 17, 26, .94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 20px 55px rgba(0,0,0,.22);
}
.g-announcement::after {
  content: ""; position: absolute; inset: -80% -30% auto auto; width: 280px; height: 280px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 211, 78, .17), transparent 68%);
}
.g-announcement-kicker { color: #ffe184; font-size: 12px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.g-announcement h3 { margin: 8px 0 8px; font-size: clamp(18px, 3vw, 25px); line-height: 1.35; }
.g-announcement p { margin: 0; color: #d4d5dc; line-height: 1.75; font-size: 14px; max-width: 900px; white-space: pre-line; }
.g-announcement-dots { position: absolute; left: 28px; bottom: 12px; display: flex; gap: 7px; }
.g-announcement-dot { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.24); border: 0; padding: 0; }
.g-announcement-dot.active { width: 25px; background: linear-gradient(90deg, #f4ae2e, #ffe372); }
.g-help-badge { position: absolute; right: 21px; top: 20px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,225,135,.22); color: #ffe28b; background: rgba(255,211,80,.07); font-weight: 900; }

.g-hero { text-align: center; padding: 58px 0 34px; }
.g-hero-mark {
  width: 118px; height: 118px; margin: 0 auto 23px; border-radius: 31px; display: grid; place-items: center; position: relative;
  background: linear-gradient(155deg, #1d2330, #090c13);
  border: 1px solid rgba(255,219,108,.18);
  box-shadow: 0 0 0 14px rgba(255,212,81,.025), 0 0 60px rgba(255,191,52,.20), inset 0 1px 0 rgba(255,255,255,.07);
}
.g-hero-mark::before { content: "✦"; font-size: 68px; line-height: 1; background: linear-gradient(145deg, #fff5c4, #ffd24f 40%, #ef9525 72%, #fff0a6); -webkit-background-clip: text; color: transparent; filter: drop-shadow(0 4px 14px rgba(255,188,42,.25)); }
.g-hero h1 { margin: 0; font-size: clamp(36px, 7vw, 61px); line-height: 1.08; letter-spacing: .04em; font-weight: 950; background: linear-gradient(92deg, #f3a32a, #ffe66f 35%, #fff1ac 55%, #d88b24 82%, #ffd86e); -webkit-background-clip: text; color: transparent; }
.g-hero-subtitle { margin: 13px auto 0; max-width: 760px; color: #b9bdc8; font-size: 15px; line-height: 1.8; letter-spacing: .08em; }
.g-hero-points { margin-top: 19px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px 20px; color: #f1c963; font-size: 13px; font-weight: 800; }
.g-hero-points span:not(:last-child)::after { content: "·"; margin-left: 20px; color: rgba(255,231,150,.35); }

.g-search-panel {
  padding: 24px; border-radius: 28px; border: 1px solid rgba(255,214,92,.18);
  background: linear-gradient(135deg, rgba(35, 31, 30, .88), rgba(16, 19, 27, .96) 40%, rgba(10, 13, 20, .98));
  box-shadow: 0 24px 70px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.045);
}
.g-tabs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 1px 15px; scrollbar-width: none; }
.g-tabs::-webkit-scrollbar { display: none; }
.g-tab {
  flex: 0 0 auto; min-width: 116px; padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.11);
  color: #c4c7d1; background: rgba(255,255,255,.035); font-weight: 900; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: all .2s ease;
}
.g-tab::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #f1a62b; box-shadow: 0 0 14px rgba(242,171,50,.6); }
.g-tab[data-key="qimao"]::before { background: #f459bd; }
.g-tab[data-key="fanqie"]::before { background: #31d5aa; }
.g-tab[data-key="lanzou"]::before { background: #71b7ff; }
.g-tab.active { color: #291703; border-color: transparent; background: linear-gradient(105deg, #f2a82b, #ffdc65 50%, #fff1aa); box-shadow: 0 9px 25px rgba(238,168,38,.24); }
.g-tab.active::before { background: #f05f51; box-shadow: none; }
.g-search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.g-input-wrap { position: relative; }
.g-input-wrap::before { content: "书"; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #e6cf86; font-size: 22px; }
.g-input {
  width: 100%; height: 62px; box-sizing: border-box; border-radius: 18px; border: 1px solid rgba(255,220,120,.16); outline: 0;
  color: #fff7de; background: rgba(6, 9, 15, .78); padding: 0 20px 0 55px; font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.g-input:focus { border-color: rgba(255,215,92,.55); box-shadow: 0 0 0 4px rgba(255,199,55,.08); }
.g-input::placeholder { color: #6f7482; }
.g-search-btn { min-width: 170px; font-size: 17px; }
.g-search-meta { margin: 14px 4px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #8d919e; font-size: 12px; }
.g-search-meta strong { color: #f2ca61; }

.g-main { padding-bottom: 58px; }
.g-section-head { margin: 30px 1px 14px; display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.g-section-head h2 { margin: 0; font-size: 20px; }
.g-section-head p { margin: 6px 0 0; color: #9095a2; font-size: 13px; }
.g-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.g-card {
  position: relative; display: grid; grid-template-columns: 86px 1fr; gap: 14px; padding: 15px; min-width: 0;
  border-radius: 20px; border: 1px solid rgba(255,223,125,.11); background: rgba(18, 22, 30, .82);
  box-shadow: 0 12px 35px rgba(0,0,0,.18); transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.g-card:hover { transform: translateY(-2px); border-color: rgba(255,211,85,.28); background: rgba(23, 27, 35, .94); }
.g-cover { width: 86px; height: 122px; border-radius: 13px; overflow: hidden; background: linear-gradient(145deg, #302614, #10141d); border: 1px solid rgba(255,222,120,.12); display: grid; place-items: center; color: #e9b944; font-size: 28px; }
.g-cover img { width: 100%; height: 100%; object-fit: cover; }
.g-card-body { min-width: 0; display: flex; flex-direction: column; }
.g-card-title { margin: 1px 0 5px; color: #fff9e9; font-size: 16px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-card-author { color: #a9adba; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-card-desc { margin: 9px 0 11px; color: #878c99; font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 37px; }
.g-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.g-source { display: inline-flex; align-items: center; max-width: 55%; padding: 5px 9px; border-radius: 999px; color: #f2cd72; background: rgba(255,207,74,.08); border: 1px solid rgba(255,211,84,.13); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-empty, .g-loading {
  grid-column: 1 / -1; padding: 54px 20px; text-align: center; border: 1px dashed rgba(255,215,105,.17); border-radius: 22px; color: #8e93a0; background: rgba(255,255,255,.018);
}
.g-empty-icon { font-size: 38px; margin-bottom: 11px; }
.g-spinner { width: 30px; height: 30px; border: 3px solid rgba(255,221,113,.17); border-top-color: #ffd45d; border-radius: 50%; animation: gspin .8s linear infinite; margin: 0 auto 13px; }
@keyframes gspin { to { transform: rotate(360deg); } }

.g-footer { border-top: 1px solid rgba(255,226,133,.08); background: rgba(5, 8, 12, .44); padding: 26px 0 36px; }
.g-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.g-disclaimer { margin: 0; max-width: 800px; color: #777d8a; font-size: 11px; line-height: 1.8; white-space: pre-line; }

.g-modal-backdrop {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px;
  background: rgba(0,0,0,.72); backdrop-filter: blur(10px);
}
.g-modal {
  width: min(680px, 100%); max-height: min(88vh, 860px); overflow: auto; border-radius: 26px; padding: 24px;
  background: linear-gradient(150deg, #1c202a, #0d1119 64%); border: 1px solid rgba(255,218,100,.22);
  box-shadow: 0 28px 90px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
}
.g-modal-lg { width: min(980px, 100%); }
.g-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.g-modal-head h3 { margin: 0; font-size: 23px; }
.g-modal-head p { margin: 7px 0 0; color: #9297a4; font-size: 13px; }
.g-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.09); color: #d6d7dc; background: rgba(255,255,255,.04); font-size: 21px; cursor: pointer; }
.g-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.g-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.g-field-full { grid-column: 1 / -1; }
.g-field label { color: #c2c5ce; font-size: 13px; font-weight: 800; }
.g-field input, .g-field select, .g-field textarea {
  width: 100%; box-sizing: border-box; color: #f7f2e7; background: rgba(5,8,13,.62); border: 1px solid rgba(255,218,112,.14); border-radius: 14px; padding: 12px 14px; outline: none;
}
.g-field textarea { min-height: 112px; resize: vertical; line-height: 1.65; }
.g-field input:focus, .g-field select:focus, .g-field textarea:focus { border-color: rgba(255,210,70,.48); box-shadow: 0 0 0 3px rgba(255,194,35,.07); }
.g-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.g-format-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.g-format { padding: 18px; border-radius: 17px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.025); cursor: pointer; }
.g-format.selected { border-color: rgba(255,213,83,.54); background: rgba(255,207,54,.08); box-shadow: 0 0 0 3px rgba(255,196,33,.05); }
.g-format strong { display: block; color: #ffe18a; font-size: 18px; }
.g-format span { display: block; color: #8d929f; font-size: 12px; margin-top: 5px; }

.g-records { display: flex; flex-direction: column; gap: 10px; }
.g-record { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid rgba(255,219,111,.11); border-radius: 16px; background: rgba(255,255,255,.025); }
.g-record h4 { margin: 0; font-size: 14px; color: #f7f0df; }
.g-record p { margin: 6px 0 0; color: #858b98; font-size: 11px; }
.g-status { font-size: 11px; font-weight: 900; padding: 6px 9px; border-radius: 999px; color: #f4d986; background: rgba(255,205,62,.08); border: 1px solid rgba(255,211,76,.13); }
.g-status.completed { color: #8de4ba; background: rgba(61,201,139,.08); border-color: rgba(80,218,158,.15); }
.g-status.failed { color: #ff9e8d; background: rgba(255,96,70,.08); border-color: rgba(255,112,87,.15); }

.g-toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1500; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100% - 36px)); }
.g-toast { padding: 13px 15px; border-radius: 15px; color: #f8f1df; background: rgba(20,24,32,.96); border: 1px solid rgba(255,220,110,.17); box-shadow: 0 16px 45px rgba(0,0,0,.38); font-size: 13px; animation: gtoast .25s ease-out; }
.g-toast.error { border-color: rgba(255,111,89,.32); }
@keyframes gtoast { from { opacity: 0; transform: translateY(9px); } }

/* Admin extension */
#g-admin-launcher { position: fixed; right: 18px; bottom: 18px; z-index: 9999; }
.g-admin-panel { color: var(--text); }
.g-admin-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 17px; }
.g-admin-tab { border: 1px solid rgba(255,220,110,.13); background: rgba(255,255,255,.03); color: #c5c8d1; padding: 9px 12px; border-radius: 11px; cursor: pointer; white-space: nowrap; }
.g-admin-tab.active { color: #241603; background: linear-gradient(105deg, #f5ad2f, #ffe06d); border-color: transparent; font-weight: 900; }
.g-admin-section { display: none; }
.g-admin-section.active { display: block; }
.g-codearea { min-height: 340px !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.g-order-list { display: flex; flex-direction: column; gap: 8px; }
.g-order-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 13px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.07); }
.g-order-actions { display: flex; gap: 6px; }
.g-table-wrap { overflow: auto; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; }
.g-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.g-table th, .g-table td { padding: 10px 11px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; font-size: 12px; vertical-align: top; }
.g-table th { color: #f3cf72; background: rgba(255,214,82,.045); }
.g-table td { color: #c0c3cc; }
.g-popup-copy { white-space: pre-line; line-height: 1.8; color: #d3d4da; }

@media (max-width: 760px) {
  .g-shell { width: min(100% - 20px, 1120px); }
  .g-topbar-inner { min-height: 58px; }
  .g-brand-title { font-size: 15px; }
  .g-top-actions .g-btn span { display: none; }
  .g-top-actions .g-btn { padding: 9px 11px; }
  .g-announcement-wrap { padding-top: 14px; }
  .g-announcement { min-height: 150px; padding: 22px 52px 28px 20px; border-radius: 22px; }
  .g-announcement-dots { left: 20px; }
  .g-hero { padding: 42px 0 27px; }
  .g-hero-mark { width: 96px; height: 96px; border-radius: 26px; }
  .g-hero-mark::before { font-size: 56px; }
  .g-hero-points span:not(:last-child)::after { display: none; }
  .g-search-panel { padding: 15px; border-radius: 23px; }
  .g-search-row { grid-template-columns: 1fr; }
  .g-search-btn { min-width: 0; height: 54px; }
  .g-results { grid-template-columns: 1fr; }
  .g-footer-row { align-items: stretch; flex-direction: column; }
  .g-form-grid { grid-template-columns: 1fr; }
  .g-field-full { grid-column: auto; }
  .g-modal { padding: 19px; border-radius: 22px; }
}
