:root {
  color-scheme: light;
  --grass: #0f8f4f;
  --grass-dark: #075934;
  --line: #d9efe4;
  --blue: #2367ff;
  --ink: #10231a;
  --muted: #6b7d73;
  --bg: #f3f8f5;
  --card: #ffffff;
  --warn: #ffb020;
  --danger: #dd2c4b;
  --shadow: 0 18px 50px rgba(12, 74, 45, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 0%, rgba(35, 103, 255, .12), transparent 28%),
    linear-gradient(180deg, #edf8f1 0%, #f7fbf8 36%, #ffffff 100%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; }
a { color: inherit; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15,143,79,.16);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0;
  border: 0;
  outline: 0;
  appearance: none;
}
.brand:focus { outline: 0; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 26% 23%, rgba(255,255,255,.72), transparent 16%),
    linear-gradient(135deg, #05784a 0%, var(--grass) 45%, #2367ff 100%);
  box-shadow:
    0 10px 24px rgba(15,143,79,.22),
    inset 0 0 0 1px rgba(255,255,255,.5);
  overflow: hidden;
  position: relative;
}
.brand-mark:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  pointer-events: none;
}
.brand-fish {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 3px 4px rgba(5,57,35,.22));
}
.fish-body,
.fish-tail {
  fill: #fff;
}
.fish-belly {
  fill: #d9fff0;
  opacity: .88;
}
.fish-fin {
  fill: #b9f2dd;
}
.fish-eye {
  fill: var(--grass-dark);
}
.fish-gill {
  fill: none;
  stroke: var(--grass-dark);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: .58;
}
.fish-bubble {
  fill: rgba(255,255,255,.82);
}
.fish-bubble-two {
  opacity: .75;
}
.brand-sub { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  color: var(--ink);
  background: #eef6f2;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--grass), #16b36b); box-shadow: 0 10px 25px rgba(15,143,79,.22); }
.btn-blue { color: #fff; background: linear-gradient(135deg, var(--blue), #35a7ff); box-shadow: 0 10px 25px rgba(35,103,255,.2); }
.btn-ghost { background: #fff; border: 1px solid var(--line); }
.btn-danger { color: #fff; background: var(--danger); }
.btn-link { padding: 0; background: transparent; color: var(--grass-dark); font-weight: 800; }

.page { max-width: 1180px; margin: 0 auto; padding: 28px 20px 54px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}
.hero-main {
  min-height: 260px;
  border-radius: 8px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(5,57,35,.95), rgba(15,143,79,.86)),
    repeating-linear-gradient(90deg, transparent 0 70px, rgba(255,255,255,.08) 70px 72px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-main:after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border: 18px solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.eyebrow { font-size: 13px; font-weight: 900; color: rgba(255,255,255,.72); }
.hero h1 { position: relative; margin: 16px 0 14px; font-size: clamp(36px, 6vw, 70px); line-height: .98; letter-spacing: 0; }
.hero p { position: relative; max-width: 650px; margin: 0; color: rgba(255,255,255,.82); line-height: 1.75; font-weight: 600; }
.hero-side {
  border-radius: 8px;
  background: #fff;
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8fcfa;
}
.stat strong { display: block; font-size: 26px; color: var(--grass-dark); }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  border-radius: 8px;
  box-shadow: 0 12px 35px rgba(12, 74, 45, 0.08);
  margin-bottom: 18px;
}
.field, .select, .textarea {
  width: 100%;
  border: 1px solid #cfe5da;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: 0;
}
.field:focus, .select:focus, .textarea:focus { border-color: var(--grass); box-shadow: 0 0 0 4px rgba(15,143,79,.12); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }

.player-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.player-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 12px 32px rgba(12, 74, 45, 0.08);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.player-card:hover { transform: translateY(-3px); border-color: rgba(15,143,79,.45); box-shadow: var(--shadow); }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--grass), var(--blue));
  font-weight: 900;
  flex: 0 0 auto;
}
.player-name { font-size: 21px; font-weight: 900; margin: 0 0 5px; }
.muted { color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tag { border-radius: 999px; padding: 6px 10px; background: #edf8f2; color: var(--grass-dark); font-size: 12px; font-weight: 900; }
.tag-blue { background: #ecf3ff; color: #174dc7; }
.card-note { color: #40554a; line-height: 1.65; min-height: 52px; }
.empty, .loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 60px 18px;
  border: 1px dashed #c5ded2;
  border-radius: 8px;
  background: rgba(255,255,255,.7);
}

.panel {
  max-width: 820px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  padding: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--grass-dark), var(--grass));
}
.panel-head h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 46px); }
.panel-body { padding: 26px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-section h3 { margin: 0 0 14px; }
label { display: block; font-size: 13px; color: var(--muted); font-weight: 900; margin-bottom: 7px; }
.required { color: var(--danger); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.detail-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-banner {
  padding: 30px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(35,103,255,.84), rgba(15,143,79,.92)),
    repeating-linear-gradient(0deg, transparent 0 44px, rgba(255,255,255,.08) 44px 46px);
}
.detail-banner h2 { margin: 8px 0 10px; font-size: clamp(34px, 5vw, 58px); }
.detail-body { padding: 24px; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info {
  background: #f8fcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.info span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; margin-bottom: 6px; }
.info strong { font-size: 16px; }
.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.contact-list { display: grid; gap: 10px; margin-top: 14px; }
.contact-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #f8fcfa; }
.contact-item span { display: block; font-size: 12px; color: var(--muted); font-weight: 900; margin-bottom: 4px; }

.auth-wrap { max-width: 460px; margin: 0 auto; }
.captcha-row { display: grid; grid-template-columns: 1fr 132px; gap: 10px; align-items: center; }
.captcha-box { min-height: 46px; border: 1px solid var(--line); border-radius: 8px; display: grid; place-items: center; background: #fff; overflow: hidden; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { background: #edf8f2; color: var(--grass-dark); }

.toast {
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%) translateY(-14px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--grass);
  box-shadow: var(--shadow);
  font-weight: 800;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

@media (max-width: 900px) {
  .hero, .detail-layout { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .player-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav { align-items: flex-start; }
  .brand-sub { display: none; }
  .nav-actions { gap: 8px; }
  .btn { padding: 9px 12px; border-radius: 10px; }
  .page { padding: 18px 14px 40px; }
  .hero-main, .hero-side, .panel-body, .panel-head, .detail-banner, .detail-body { padding: 20px; }
  .toolbar, .form-grid, .info-grid, .captcha-row { grid-template-columns: 1fr; }
  .player-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
