:root{
  --bg-url: url("bg.jpg"); /* ✅ 你把背景图命名为 background.jpg 放同目录即可 */
  --fg: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --line: rgba(255,255,255,0.14);
  --card: rgba(0,0,0,0.35);
  --card2: rgba(0,0,0,0.22);
  --shadow: 0 18px 60px rgba(0,0,0,0.45);
  --radius: 18px;
  --radius2: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--fg);
  overflow-x: hidden;
}

.bg{
  position: fixed;
  inset: 0;
  background-image: var(--bg-url);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
}

/* 背景暗化 + 轻微雾面 */
.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 700px at 50% 25%, rgba(0,0,0,0.10), rgba(0,0,0,0.62)),
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.75));
  backdrop-filter: blur(2px);
}

.wrap{
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.panel{
  width: min(1200px, 96vw);
  background: rgba(0,0,0,0.30);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 18px;
}

.panel__header{
  padding: 10px 10px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.panel__title{
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.2px;
}
.panel__sub{
  margin: 8px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

.grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 6px 6px 6px;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
}

.card__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
}
.card__title{
  margin:0;
  font-size: 14px;
  line-height: 1.2;
}
.card__desc{
  margin: 6px 0 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.btn{
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.08);
  color: var(--fg);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover{ background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); }
.btn:active{ transform: translateY(1px); }

.codebox{
  width: 100%;
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: var(--card2);
  color: var(--fg);
  padding: 10px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
  resize: none;
  outline: none;
  overflow: auto;
}

.promo{
  margin-top: 14px;
  padding: 14px 10px 6px 10px;
  border-top: 1px solid var(--line);
}
.promo__title{
  margin: 0 0 10px 0;
  font-size: 16px;
}
.promo__box{
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.26);
  border-radius: var(--radius2);
  padding: 12px 12px;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap; /* ✅ 保留换行 */
}

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--fg);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Skeleton (加载占位) */
.skeleton{
  height: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
}
.skeleton.short{ width: 60%; }

/* 响应式：5列→3列→1列 */
@media (max-width: 1100px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px){
  .grid{ grid-template-columns: 1fr; }
  .panel{ padding: 14px; }
}
