/* 脚本集市 —— 站点样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f2f4f8; color: #232a33; font-size: 15px; line-height: 1.6;
}
a { color: #1c64d9; text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 22px; } h2 { font-size: 19px; margin: 18px 0 10px; } h3 { font-size: 16px; margin: 12px 0 8px; }

/* 头部 */
.site-header { background: #14213d url(/static/logo.jpg?v=3) left center / 100% 100% no-repeat; color: #fff; padding-bottom: 10px; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; flex-wrap: wrap; gap: 10px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-text { font-size: 20px; font-weight: 700; }
.logo-text small { display: block; font-size: 11px; font-weight: 400; color: #9fb0cd; }
.login-area { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.userchip { display: flex; align-items: center; gap: 6px; color: #fff; white-space: nowrap; }
.pts { font-size: 12px; color: #cdd8ec; white-space: nowrap; }
.pts b { color: #fca311; }
.bell { color: #fff; position: relative; font-size: 16px; text-decoration: none; }
.bell i { position: absolute; top: -6px; right: -10px; background: #e63946; color: #fff; font-style: normal; font-size: 10px; border-radius: 8px; padding: 0 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.avatar.sm { width: 24px; height: 24px; }
.av-text { display: inline-flex; align-items: center; justify-content: center; background: #2a9d8f; color: #fff; font-size: 13px; }
.search-bar { padding: 4px 0 10px; }
.search-bar form { display: flex; gap: 8px; }
.search-bar input { flex: 1; border: none; border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav a { color: #dbe4f5; padding: 7px 13px; border-radius: 7px; font-size: 14px; }
.mainnav a:hover { background: #22335c; color: #fff; text-decoration: none; }

@media (max-width: 860px) {
  .header-top { flex-direction: column; align-items: stretch; text-align: center; }
  .logo { justify-content: center; }
  .login-area { justify-content: center; }
}

/* 主体 */
main { min-height: 60vh; padding: 16px; }
.card { background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(20,33,61,.07); }
.card.item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 600; font-size: 15px; color: #1a2433; }
.item-meta { font-size: 12px; color: #7b8794; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 3px; }
.item-side { text-align: right; white-space: nowrap; }
.muted { color: #8b97a5; font-size: 13px; }
.accent { color: #e07b00; }
.err-text { color: #d62828; }
.warn-text { color: #b26a00; }
.up { color: #0a8f4d; } .down { color: #d62828; }
.empty { text-align: center; color: #98a2ae; padding: 26px; }
.pre { white-space: pre-wrap; word-break: break-word; }
.tip { background: #fff8e6; border: 1px solid #f5d98a; font-size: 13px; }

/* 徽章 */
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #eef1f6; color: #5a6673; vertical-align: 1px; }
.badge.plat { background: #e5efff; color: #1c64d9; }
.badge.dev { background: #e8f7f1; color: #0a8f4d; border: 1px solid #9adcbf; }
.badge.admin { background: #e63946; color: #fff; }
.badge.superadmin { background: linear-gradient(135deg, #7b2cbf, #e63946); color: #fff; font-weight: 700; }
.badge.top { background: #fca311; color: #fff; }
.badge.feat { background: #e63946; color: #fff; }
.badge.q { background: #7b2cbf; color: #fff; }
.badge.ok { background: #d9f2e5; color: #0a8f4d; }
.badge.warnb { background: #fff3cd; color: #8a6d00; }
.lv { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; color: #fff; vertical-align: 1px; }
.lv0 { background: #9aa5b1; } .lv1 { background: #6aa9e9; } .lv2 { background: #3d90e0; }
.lv3 { background: #2a9d8f; } .lv4 { background: #1f8a70; } .lv5 { background: #7b2cbf; }
.lv6 { background: #6a2c9c; } .lv7 { background: #d64550; } .lv8 { background: #c9184a; }
.lv9 { background: #e07b00; } .lv10 { background: linear-gradient(90deg,#fca311,#e63946); }
.price { color: #e07b00; font-weight: 700; }
.price.free { color: #0a8f4d; }

/* 按钮 */
.btn { display: inline-block; background: #1c64d9; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.btn:hover { background: #1554b8; text-decoration: none; }
.btn.ghost { background: #eef2f8; color: #1c64d9; }
.btn.ghost:hover { background: #dfe8f5; }
.btn.danger { background: #e63946; }
.btn.danger:hover { background: #c1121f; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn.big { padding: 10px 22px; font-size: 15px; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.inline { display: inline-block; }

/* 表单 */
.form label { display: block; margin: 10px 0 4px; font-size: 13px; color: #444d57; }
.form input[type=text], .form input[type=password], .form input[type=number],
.form input[type=email], .form input:not([type]), .form textarea, .form select,
.filter input, .filter select {
  width: 100%; padding: 9px 12px; border: 1px solid #cfd7e2; border-radius: 8px; font-size: 14px; margin-top: 3px; background: #fff;
}
.form button { margin-top: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.check input { width: auto !important; margin: 0 !important; }
.code-row { display: flex; gap: 8px; }
.code-show { background: #14213d; color: #fca311; font-size: 18px; letter-spacing: 6px; padding: 6px 14px; border-radius: 8px; user-select: all; }
details { position: relative; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
.pop { position: absolute; z-index: 30; min-width: 300px; left: 0; top: 110%; box-shadow: 0 8px 26px rgba(20,33,61,.2); }

/* 首页 */
.hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, #14213d, #1f3a68); color: #fff; }
.hero h1 { font-size: 24px; }
.hero p { color: #b9c6de; margin: 6px 0; }
.hero-btns { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; }
.hero-stats div, .hero-stats a { text-align: center; }
.hero-stats b { display: block; font-size: 22px; color: #fca311; }
.hero-stats span { font-size: 12px; color: #9fb0cd; }
.hero-stats a { text-decoration: none; }
.hero-stats a:hover b { text-decoration: underline; }
.hero-sm .bar { background: #e8edf4; height: 8px; border-radius: 4px; margin: 8px 0; overflow: hidden; }
.bar-in { height: 100%; background: linear-gradient(90deg,#fca311,#e63946); }
.announce .flash { margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; }
.sec-head h2, .sec-head h3 { margin: 0; }
.more { font-size: 13px; }
.gridlinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gridlinks a { padding: 9px; background: #f2f6fc; border-radius: 8px; text-align: center; font-size: 13px; }
.taskline { padding: 7px 4px; border-bottom: 1px dashed #edf0f4; font-size: 14px; }
.taskline.done { color: #0a8f4d; }
.taskline .mini, .mini { font-size: 12px; margin-left: 8px; }

/* 详情页 */
.detail h1 { margin-bottom: 6px; }
.meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: #7b8794; font-size: 13px; }
.content { margin-top: 12px; }
.take { border-left: 3px solid #dfe5ee; }
.take-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prog { border-top: 1px dashed #edf0f4; padding: 6px 0; margin-top: 6px; }
.arb { background: #fdf1f2; border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 13px; }
.item.best { border-left: 3px solid #0a8f4d; }
.item.unread { border-left: 3px solid #1c64d9; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; padding: 4px; }
.tbl th { text-align: left; color: #8b97a5; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid #edf0f4; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid #f3f5f8; }
.ops details { min-width: 130px; position: relative; }
.ops .pop { min-width: 240px; left: auto; right: 0; z-index: 100; }

/* 消息 */
.flashes { margin-bottom: 12px; }
.flash { padding: 10px 14px; border-radius: 9px; margin-bottom: 8px; font-size: 14px; }
.flash.ok { background: #d9f2e5; color: #0a8f4d; }
.flash.warn { background: #fff3cd; color: #8a6d00; }
.flash.err { background: #fde3e5; color: #c1121f; }

/* 其他 */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 6px 14px; background: #fff; border-radius: 8px; font-size: 13px; color: #5a6673; }
.tabs a.on { background: #1c64d9; color: #fff; }
.auth-card { max-width: 420px; margin: 40px auto; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 24px; color: #14213d; }
.stat span { font-size: 12px; color: #8b97a5; }
.stat.link { text-decoration: none; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.stat.link:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(20,33,61,.15); }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-nav a { padding: 7px 14px; border-radius: 8px; font-size: 13px; background: #f2f5fa; color: #444d57; }
.admin-nav a.on { background: #14213d; color: #fff; }
.filter { display: flex; gap: 8px; align-items: center; }
.filter input, .filter select { width: auto; margin: 0; }
.filter input[name=q] { flex: 1; }

/* 底部 */
.site-footer { background: #14213d; color: #8fa0bf; font-size: 12px; padding: 18px 0; margin-top: 30px; }
.site-footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: #cdd8ec; }

@media (max-width: 720px) {
  .grid2 { grid-template-columns: 1fr; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .hero-stats { gap: 14px; }
  .item { flex-direction: column; align-items: flex-start; }
  .item-side { text-align: left; }
}
