:root {
  --card: rgba(255, 255, 255, .88);
  --card2: #f3f8ff;
  --line: rgba(56, 139, 253, .16);
  --text: #24324a;
  --muted: #6b7f9e;
  --orange: #ff8a3d;
  --pink: #ff5f76;
  --sky: #38bdf8;
  --blue: #4f8cff;
  --purple: #8b7cf6;
  --gold: #ffb020;
  --green: #2fc98a;
  --red: #ff5f76;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

a { text-decoration: none; color: inherit; }

body {
  background:
    radial-gradient(900px 500px at 88% -8%, rgba(255, 176, 32, .28), transparent 60%),
    radial-gradient(700px 480px at -8% 12%, rgba(56, 189, 248, .25), transparent 55%),
    radial-gradient(800px 600px at 50% 118%, rgba(255, 138, 61, .16), transparent 60%),
    linear-gradient(180deg, #dff3ff 0%, #f5fbff 42%, #fff6e8 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .30;
  z-index: 0;
  pointer-events: none;
  animation: orbFloat 14s ease-in-out infinite alternate;
}

body::before {
  width: 420px;
  height: 420px;
  background: var(--sky);
  top: -90px;
  right: -70px;
}

body::after {
  width: 380px;
  height: 380px;
  background: var(--gold);
  bottom: -110px;
  left: -90px;
  animation-delay: -7s;
}

@keyframes orbFloat {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(30px) scale(1.12); }
}

/* ---------- 顶栏 ---------- */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  background: linear-gradient(90deg, var(--orange), var(--gold), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.link-btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 4px;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--sky), var(--blue), var(--orange));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: heroShine 5s linear infinite;
  transition: transform .15s ease;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.link-btn:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, .35));
}

.desknav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.desknav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  transition: color .15s ease, background .15s ease;
}

.desknav a:hover,
.desknav a.active {
  color: var(--blue);
  background: rgba(79, 140, 255, .10);
}

/* ---------- 底部导航（手机） ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  border-radius: 12px;
  transition: color .15s ease, background .15s ease;
}

.tabbar a span { font-size: 20px; line-height: 1.1; }

.tabbar a.active {
  color: var(--orange);
  background: rgba(255, 138, 61, .10);
}

/* ---------- 主体 ---------- */

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  position: relative;
  z-index: 1;
}

.hero {
  text-align: center;
  padding: 34px 10px 24px;
  animation: fadeUp .45s ease both;
}

.hero h1 {
  font-size: 30px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--orange), var(--gold), var(--sky), var(--blue), var(--orange));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: heroShine 5.5s linear infinite, heroGlow 3.2s ease-in-out infinite alternate;
}

.hero .sub {
  color: var(--muted);
  margin-top: 9px;
  font-size: 14px;
}

.hero .hero-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes heroGlow {
  from { filter: drop-shadow(0 0 4px rgba(255, 176, 32, .20)); }
  to { filter: drop-shadow(0 0 14px rgba(56, 189, 248, .40)); }
}

@keyframes heroShine {
  to { background-position: 300% 0; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(30, 60, 120, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation: fadeUp .4s ease both;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(105deg, transparent 42%, rgba(56, 189, 248, .10) 50%, transparent 58%);
  transform: translateX(-130%);
  transition: transform .75s ease;
  pointer-events: none;
}

.card:hover::after {
  transform: translateX(130%);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, .45);
  box-shadow: 0 14px 32px rgba(56, 189, 248, .16), 0 8px 24px rgba(30, 60, 120, .08);
}

.card h3 { font-size: 16px; margin-bottom: 8px; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pill {
  display: inline-block;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--card2);
  color: var(--muted);
  margin-left: 6px;
  border: 1px solid var(--line);
}

.pill.gold {
  color: #b97c00;
  border-color: rgba(255, 176, 32, .45);
  background: rgba(255, 176, 32, .12);
}

.pill.green {
  color: #0e9f6e;
  border-color: rgba(47, 201, 138, .45);
  background: rgba(47, 201, 138, .12);
}

.pill.blue {
  color: #0f8fd8;
  border-color: rgba(56, 189, 248, .45);
  background: rgba(56, 189, 248, .12);
}

.table-scroll {
  overflow-x: auto;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th { color: var(--muted); font-weight: 500; font-size: 13px; }
tr:hover td { background: rgba(56, 189, 248, .05); }

button, input, textarea, select {
  font-family: inherit;
  font-size: 14px;
}

button {
  background: linear-gradient(135deg, var(--orange), var(--pink));
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 138, 61, .30);
  transition: transform .15s ease, box-shadow .15s ease;
  animation: btnPulse 2.8s ease-in-out infinite;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 138, 61, .45);
}

button.secondary {
  background: var(--card2);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--line);
  animation: none;
}

button.danger {
  background: linear-gradient(135deg, #ff5f76, #e0486a);
  box-shadow: 0 4px 16px rgba(255, 95, 118, .30);
}

button.small {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 10px;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(255, 138, 61, .28); }
  50% { box-shadow: 0 4px 26px rgba(56, 189, 248, .48); }
}

input, textarea, select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  padding: 10px 12px;
  margin: 4px 0 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .15);
}

textarea { min-height: 80px; resize: vertical; }
label { font-size: 13px; color: var(--muted); display: block; margin-top: 6px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 140px; }

.msg {
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0;
  font-size: 14px;
  display: none;
}

.msg.ok {
  display: block;
  background: rgba(47, 201, 138, .12);
  color: #0e9f6e;
  border: 1px solid rgba(47, 201, 138, .35);
}

.msg.err {
  display: block;
  background: rgba(255, 95, 118, .10);
  color: var(--red);
  border: 1px solid rgba(255, 95, 118, .35);
}

.seed {
  background: var(--card2);
  border: 1px dashed rgba(56, 139, 253, .30);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  word-break: break-all;
  color: var(--muted);
  margin-top: 8px;
}

.empty { color: var(--muted); text-align: center; padding: 30px 0; }

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-actions button { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.mini { font-size: 12px; color: var(--muted); }
.edit-card { border: 1px solid var(--sky); }
.hidden { display: none; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  background: var(--card2);
  color: var(--muted);
  box-shadow: none;
  border: 1px solid var(--line);
  animation: none;
}
.tab.active {
  background: linear-gradient(135deg, var(--orange), var(--pink));
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 138, 61, .30);
}

code {
  background: rgba(56, 189, 248, .12);
  color: #0f8fd8;
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 13px;
}

ol { padding-left: 22px; line-height: 2; color: var(--text); }

/* ---------- 特效粒子 ---------- */

.fx-star {
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: twinkle 3.2s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.6); }
  50% { opacity: .95; transform: scale(1.15); }
}

.fx-mote {
  position: fixed;
  bottom: -50px;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: moteUp 11s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 176, 32, .45));
}

@keyframes moteUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  8% { opacity: .55; }
  85% { opacity: .35; }
  100% { transform: translateY(-108vh) rotate(40deg); opacity: 0; }
}

/* 特效开关按钮 */

.fx-toggle {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 40;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  font-size: 18px;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  box-shadow: 0 4px 16px rgba(255, 176, 32, .4);
  animation: none;
}

.fx-off .fx-star,
.fx-off .fx-mote { display: none; }

/* 卡片入场错峰 */

#list .card:nth-child(2),
#ann-list .card:nth-child(2),
#tour-list .card:nth-child(2),
#lot-list .card:nth-child(2) { animation-delay: .06s; }

#list .card:nth-child(3),
#ann-list .card:nth-child(3),
#tour-list .card:nth-child(3),
#lot-list .card:nth-child(3) { animation-delay: .12s; }

#list .card:nth-child(4),
#ann-list .card:nth-child(4),
#tour-list .card:nth-child(4),
#lot-list .card:nth-child(4) { animation-delay: .18s; }

#list .card:nth-child(5),
#ann-list .card:nth-child(5),
#tour-list .card:nth-child(5),
#lot-list .card:nth-child(5) { animation-delay: .24s; }

@media (min-width: 768px) {
  .tabbar { display: none; }
  .fx-toggle { bottom: 22px; }
}

@media (max-width: 767px) {
  .appbar { display: none; }
  .appbar.admin-appbar { display: flex; }
  .desknav { display: none; }
  .wrap { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  .hero h1 { font-size: 24px; }
  .hero { padding: 24px 8px 18px; }
  .card { padding: 14px; }
  th, td { padding: 8px 6px; }
  .item-head { flex-direction: column; }
}
