:root {
  --bg: #000;
  --paper: #111;
  --ink: #eee;
  --muted: #9a9a9a;
  --line: #2a2a2a;
  --acc: #e85d4c;
  --dark: #000;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.site {
  background: #000;
  color: #eee;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
body.site.inner {
  background: #f4f1ea;
  color: #1c1916;
}
a { color: #ddd; text-decoration: none; }
a:hover { text-decoration: underline; }
body.inner a { color: #b4532a; }

.head-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.topbar {
  background: #000;
  color: #aaa;
  font-size: 12px;
  border-bottom: 1px solid #222;
}
.topbar .head-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  gap: 12px;
}
.top-links { display: flex; gap: 14px; flex-wrap: wrap; }
.topbar a { color: #ccc; text-decoration: none; }
.topbar a:hover { color: #fff; }

.site-head { background: #0a0a0a; border-bottom: 1px solid #222; }
.head-main {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.logo {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .16em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.logo small {
  font-size: 11px;
  color: var(--acc);
  letter-spacing: .28em;
  font-weight: 600;
}
.search {
  flex: 1;
  display: flex;
  min-width: 220px;
  max-width: 560px;
}
.search input {
  flex: 1;
  border: 1px solid #333;
  border-right: 0;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 4px 0 0 4px;
  background: #111;
  color: #fff;
}
.search button {
  background: var(--acc);
  color: #fff;
  border: 0;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
}
.head-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #888;
  font-size: 12px;
  margin-left: auto;
}
.head-stat b { color: var(--acc); font-size: 20px; }

.page-main { max-width: 1280px; margin: 0 auto; padding: 12px 16px 36px; }
.paper { background: #111; padding: 28px 32px; border: 1px solid #2a2a2a; }
body.inner .paper { background: #fff; border-color: #e4ddd2; }

.slide-mod {
  position: relative;
  width: 100%;
  height: 420px;
  margin: 0 0 12px;
  overflow: hidden;
  background: #111;
  border: 1px solid #2a2a2a;
}
.slide-item {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.slide-item:first-child,
.slide-item.is-on {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
.slide-item.is-on {
  z-index: 2;
}
.slide-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #111;
}
.slide-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide-empty a {
  color: #888;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .4em;
  text-decoration: none;
}
.slide-btn {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  z-index: 3;
  width: 28px;
  height: 48px;
  border: 0;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.slide-prev { left: 0; }
.slide-next { right: 0; }
.slide-btn:hover { background: rgba(0,0,0,.7); }
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
}
.hero-dot.is-on { background: #fff; }

.block { margin: 8px 0 22px; }
.block-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-left: 4px solid var(--acc);
  padding: 0 0 8px 10px;
  margin-bottom: 12px;
}
.block-h h2 { margin: 0; font-size: 18px; color: #fff; }

.grid-6 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cell {
  display: block;
  background: #111;
  border: 1px solid #222;
  color: #eee;
  text-decoration: none;
  overflow: hidden;
}
.cell:hover { text-decoration: none; border-color: #444; }
.cell-pic {
  display: block;
  width: 100%;
  overflow: hidden;
  background: #222 center top / cover no-repeat;
  min-height: 220px;
}
.cell-pic img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 220px;
  max-width: 100%;
  border: 0;
  opacity: 1 !important;
  visibility: visible !important;
}
.shake .cell-pic img {
  animation: wiggle 1.7s ease-in-out infinite;
}
@keyframes wiggle {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-4px) rotate(-1.4deg) scale(1.03); }
  75% { transform: translateX(4px) rotate(1.4deg) scale(1.03); }
}
.cell-tit {
  display: block;
  padding: 6px 8px 8px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ddd;
}

.banner-stack { display: grid; gap: 10px; margin: 8px 0 24px; }
.ad-row {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  overflow: hidden;
  background: #111;
  border: 1px solid #2a2a2a;
  text-decoration: none;
}
.ad-row img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.ad-empty {
  height: 280px;
  border: 1px dashed #444;
  color: #888;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .4em;
}
.ad-empty:hover { color: #fff; border-color: #666; text-decoration: none; }

.go-btn {
  display: inline-block;
  background: var(--acc);
  color: #fff;
  padding: 8px 18px;
  font-weight: 700;
  text-decoration: none;
}
.view .hero { width: 100%; max-height: 70vh; object-fit: contain; background: #111; }

.link-mod {
  background: #0a0a0a;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  padding: 10px 0 12px;
}
.page-main .link-mod {
  margin: 0 0 16px;
  border: 1px solid #222;
}
.link-hd {
  font-size: 13px;
  font-weight: 700;
  color: #bbb;
  margin: 0 0 8px;
  padding: 0 2px;
}
.link-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #222;
  border: 1px solid #222;
}
@media (max-width: 900px) { .link-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .link-grid { grid-template-columns: repeat(2, 1fr); } }
.link-grid a {
  background: #141414;
  color: #cfcfcf;
  text-align: center;
  padding: 10px 8px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-grid a {
  background: #1a1a1a;
  border: 1px solid #333;
}
.nav-grid a:hover {
  background: #242424;
  border-color: #555;
  text-decoration: none;
}
.nav-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #ff2a2a;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000;
}
.link-empty {
  grid-column: 1 / -1;
  color: #888;
  font-size: 13px;
  padding: 10px 8px;
}

.rec-grid a.rec-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  overflow: visible;
  white-space: nowrap;
  text-decoration: none;
  background: #1a1a1a;
  border: 1px solid #333;
}
.rec-grid a.rec-link:hover { text-decoration: none; background: #242424; border-color: #555; }
.rec-tag {
  display: inline-block;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.2;
  padding: 2px 7px;
  border-radius: 3px;
  color: #111 !important;
  background: #ffe14d;
}
.rec-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff36a;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000;
}
@keyframes rec-rainbow {
  0%   { color: #fff36a; }
  25%  { color: #7dff7d; }
  50%  { color: #6af0ff; }
  75%  { color: #ff9e6a; }
  100% { color: #fff36a; }
}
@keyframes rec-flash {
  0%, 42% { color: #fff36a; }
  50%, 92% { color: #6af0ff; }
  100% { color: #fff36a; }
}
.rec-plain .rec-name { color: #fff36a; }
.rec-rec .rec-tag { background: #ffe14d; color: #111 !important; }
.rec-rec .rec-name { animation: rec-rainbow 3.2s ease-in-out infinite; }
.rec-official .rec-tag { background: #ffe14d; color: #111 !important; }
.rec-official .rec-name { animation: rec-rainbow 3.6s ease-in-out infinite; }
.rec-hot .rec-tag { background: #ffb020; color: #111 !important; }
.rec-hot .rec-name { animation: rec-flash 2.2s ease-in-out infinite; }
.rec-new .rec-tag { background: #7dff7d; color: #111 !important; }
.rec-new .rec-name { animation: rec-rainbow 3.4s ease-in-out infinite; }
.rec-vip .rec-tag { background: #ffe14d; color: #111 !important; }
.rec-vip .rec-name { animation: rec-flash 2.4s ease-in-out infinite; }
.rec-rainbow .rec-name { animation: rec-rainbow 3s ease-in-out infinite; }
.rec-blink .rec-name { animation: rec-flash 2s ease-in-out infinite; }
.rec-star .rec-name { animation: rec-rainbow 3.5s ease-in-out infinite; }
.rec-bracket .rec-name { animation: rec-rainbow 3.3s ease-in-out infinite; }

.site-foot {
  background: #000;
  color: #9a9a9a;
  padding: 32px 16px 20px;
  border-top: 1px solid #222;
}
.foot-grid {
  max-width: 1280px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 24px;
}
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h3 { color: #fff; margin: 0 0 10px; font-size: 15px; }
.foot-grid p, .foot-grid a { display: block; margin: 0 0 6px; color: #9a9a9a; font-size: 13px; }
.foot-grid a:hover { color: #fff; }
.copy-line {
  text-align: center;
  border-top: 1px solid #222;
  padding-top: 14px;
  margin: 0;
  font-size: 12px;
  color: #666;
}
.join-line {
  text-align: center;
  padding: 10px 8px 8px;
  background: #0a0a0a;
}
.join-line a {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: #ff2a2a;
  text-decoration: none;
  text-shadow: 0 1px 0 #000, 1px 0 0 #000, -1px 0 0 #000, 0 -1px 0 #000;
  animation: join-flash 2.2s ease-in-out infinite;
}
.join-line a:hover { text-decoration: none; }
@keyframes join-flash {
  0%, 42% { color: #ff2a2a; }
  50%, 92% { color: #ffe14d; }
  100% { color: #ff2a2a; }
}

.ex-card {
  background: #fff;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 0 0 22px;
  max-width: 720px;
  display: grid;
  gap: 12px;
}
.ex-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.ex-k {
  display: inline-block;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 4px;
  min-width: 72px;
  text-align: center;
}
.ex-v { font-size: 16px; font-weight: 700; }
.ex-name { color: #c62828; }
.ex-url { color: #c62828; word-break: break-all; }
.ex-url.is-wait { color: #888; font-weight: 500; }
.ex-copy {
  background: #1e90ff;
  color: #fff;
  border: 0;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.ex-copy:hover { background: #1678d8; }
.ex-copy.is-off { background: #bbb; cursor: not-allowed; }
.inner main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  background: transparent;
}
.admin-wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.admin-side {
  background: #fff;
  border: 1px solid #e4ddd2;
  padding: 14px 12px 18px;
  position: sticky;
  top: 12px;
}
.admin-side-t {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 15px;
  color: #1c1916;
}
.admin-side nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.admin-side a {
  display: block;
  padding: 9px 10px;
  color: #1c1916;
  text-decoration: none;
  border-radius: 6px;
}
.admin-side a.is-on,
.admin-side a:hover {
  background: #f4eee4;
  color: #b4532a;
  text-decoration: none;
}
.admin-main { min-width: 0; color: #1c1916; }
.admin-main h1 { margin-top: 0; }
.admin-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.admin-thumbs li { background: #fff; border: 1px solid #e4ddd2; padding: 8px; }
.admin-thumbs img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.admin-card .form { max-width: none; margin: 8px 0; }
.admin-card .form button { margin-top: 4px; }
.admin-thumbs span { display: block; margin-top: 6px; font-size: 12px; color: #6f675c; }
@media (max-width: 800px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side { position: static; }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
}
h1 { font-size: 26px; margin: 12px 0 14px; }
.lead { color: #9a9a9a; max-width: 720px; }
body.inner .lead, body.inner .muted { color: #6f675c; }
.muted { color: #9a9a9a; }

.form { display: grid; gap: 10px; max-width: 520px; }
.form.wide { max-width: 720px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: #6f675c; }
.form label.check { display: flex; align-items: center; gap: 8px; }
.form textarea { min-height: 110px; resize: vertical; font: inherit; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.form input, .form textarea, .form button, .form select {
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid #e4ddd2;
  background: #fff;
  color: #1c1916;
}
.form button, .inline button {
  background: #b4532a;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}
.stats { line-height: 2; }
.copy code, p code {
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e4ddd2;
  word-break: break-all;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; color: #1c1916; }
th, td { border-bottom: 1px solid #e4ddd2; padding: 8px; text-align: left; vertical-align: top; }
.inline { display: inline; }
.batch-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 12px;
}
.batch-bar button {
  background: #8a2b1c;
  color: #fff;
  border: 0;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
}
.btn-link {
  margin-right: 8px;
  color: #b4532a;
  font-weight: 700;
  text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
.pick {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6f675c;
  margin-bottom: 6px;
}
table .inline { margin-right: 6px; }

html.pop-lock, body.pop-lock {
  overflow: hidden !important;
}
.pop-mask[hidden] { display: none !important; }
.pop-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.82);
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.pop-mask.is-on { display: flex !important; }
.pop-ad {
  position: relative;
  width: min(92vw, 760px);
  max-height: 92vh;
}
.pop-ad img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  background: #000;
  animation: pop-bounce 0.85s ease-in-out infinite;
}
.pop-flash {
  position: absolute;
  left: 50%;
  bottom: 16%;
  z-index: 2;
  color: #ff3b6b;
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 0 #fff, 0 0 10px rgba(0,0,0,.55);
  pointer-events: none;
  white-space: nowrap;
  animation: pop-flash-bounce 0.7s ease-in-out infinite;
}
@keyframes pop-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes pop-flash-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}
.pop-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: #b4532a;
  color: #fff;
  border: 0;
  padding: 10px 22px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
}

@media (min-width: 761px) {
  .grid-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
}
@media (min-width: 1101px) {
  .grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .cell-pic img { min-height: 320px; }
}

@media (max-width: 1100px) {
  .slide-mod { height: 320px; }
  .ad-row, .ad-empty { height: 200px; }
}

@media (max-width: 760px) {
  .topbar .head-inner { min-height: 32px; gap: 8px; }
  .top-links { gap: 10px; }
  .head-main {
    padding: 10px 12px;
    gap: 10px;
  }
  .logo { font-size: 22px; }
  .head-stat { display: none; }
  .search {
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }
  .page-main { padding: 8px 10px 28px; }
  .cell-pic { min-height: 240px; }
  .cell-pic img { min-height: 240px; }
  .shake .cell-pic img { animation: none; }
  .cell-tit { font-size: 12px; padding: 5px 6px 7px; }
  .slide-mod { height: 220px; }
  .slide-item { opacity: 1; }
  .slide-item.is-on { z-index: 2; }
  .ad-row, .ad-empty { height: 150px; }
  .ad-empty { font-size: 15px; letter-spacing: .18em; }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
  .link-grid a { padding: 8px 4px; font-size: 12px; }
  .nav-name { font-size: 16px; }
  .join-line a { font-size: 16px; }
  .foot-grid { grid-template-columns: 1fr; gap: 16px; }
  .paper { padding: 16px; }
  .pop-ad { width: min(94vw, 420px); }
  .pop-flash { font-size: 28px; }
}

@media (max-width: 420px) {
  .cell-pic { min-height: 220px; }
  .cell-pic img { min-height: 220px; }
  .slide-mod { height: 180px; }
}
