/* Flying Strings Youth Ensemble — 简洁白底风格 clean white theme */
:root {
  --ink: #1a1a1a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --accent: #b91c1c;   /* 中国红 chinese red */
  --accent-dark: #991b1b;
  --gold: #b45309;
  --ok: #15803d;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 Header */
.topbar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav a, .nav button {
  padding: 8px 14px; border-radius: 8px; color: var(--ink); font-size: 14px;
  border: 1px solid transparent; background: none; cursor: pointer; font-family: inherit;
}
.nav a:hover, .nav button:hover { background: var(--bg-soft); text-decoration: none; }
.nav a.active { border-color: var(--line); background: var(--bg-soft); font-weight: 600; }

/* 英雄区 Hero */
.hero { text-align: center; padding: 64px 20px 40px; }
.hero h1 { font-size: 34px; margin: 0 0 8px; }
.hero h1 .en { display: block; font-size: 20px; color: var(--muted); font-weight: 400; margin-top: 6px; }
.hero p.sub { color: var(--muted); margin: 0 0 28px; }

/* 入口卡片 Entry cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; padding-bottom: 60px; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  background: var(--bg); box-shadow: var(--shadow); transition: transform .12s ease;
  display: block; color: var(--ink);
}
a.card:hover { transform: translateY(-2px); text-decoration: none; }
.card h2 { margin: 0 0 6px; font-size: 20px; }
.card h2 .en { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }
.card p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.card .go { color: var(--accent); font-weight: 600; font-size: 14px; }

/* 汇总卡 Summary */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 24px 0; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg-soft); text-align: center; }
.stat .num { font-size: 30px; font-weight: 700; color: var(--accent); }
.stat .lbl { font-size: 13px; color: var(--muted); }

/* 表单 Forms */
form.block { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--bg); margin: 16px 0; }
form.block h3, .panel h3 { margin-top: 0; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field label .en { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit;
}
.field textarea { min-height: 80px; resize: vertical; }
.field input[type="file"] { padding: 8px; }
.field .hint { font-size: 12px; color: var(--muted); }
.checkrow { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.checkrow input { width: 16px; height: 16px; }

/* 按钮 Buttons */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 600;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn.danger:hover { background: var(--accent); color: #fff; }
.btnrow { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* 表格 Tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.tbl th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }
.tbl th .en { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.tbl tr:hover td { background: #fafafa; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 面板 Panel */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0; background: var(--bg); }
.panel > h2 { margin: 0 0 4px; font-size: 20px; }
.panel > h2 .en { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 8px; }

/* 活动条目 Event item */
.event { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; display: flex; gap: 16px; }
.event img.poster { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; background: var(--bg-soft); flex-shrink: 0; }
.event .meta { font-size: 13px; color: var(--muted); }
.event .ops { margin-left: auto; display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }
.badge { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 20px; background: #fef3c7; color: var(--gold); border: 1px solid #fcd34d; }
.badge.open { background: #dcfce7; color: var(--ok); border-color: #86efac; }

/* 标签页 Tabs */
.tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--line); margin: 20px 0; }
.tabs button {
  border: none; background: none; padding: 10px 18px; font-size: 15px; cursor: pointer;
  font-family: inherit; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* 提示条 Banner / Toast */
.banner {
  border: 1px solid #fcd34d; background: #fffbeb; color: #92400e;
  border-radius: 8px; padding: 10px 16px; font-size: 13px; margin: 12px 0;
}
#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #1f2937; color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 14px; display: none; z-index: 99; box-shadow: var(--shadow);
}
.err { color: var(--accent); font-size: 13px; min-height: 20px; }
.ok-msg { color: var(--ok); font-size: 13px; }

/* 登录页 Login */
.loginbox { max-width: 420px; margin: 60px auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.loginbox h2 { text-align: center; margin-top: 0; }
.loginbox h2 .en { display: block; font-size: 14px; color: var(--muted); font-weight: 400; }

footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 20px; text-align: center; color: var(--muted); font-size: 12px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 26px; }
  .event { flex-direction: column; }
  .event .ops { margin-left: 0; }
  .tbl { font-size: 12px; }
}
