:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171a21;
  background: #f4f6f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { min-width: 320px; background: #f4f6f9; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

.launcher-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(72, 92, 246, .11), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(255, 91, 31, .10), transparent 32%),
    #f5f7fb;
}

.launcher { width: min(1040px, 100%); }
.launcher-kicker { color: #5263e8; font-size: 11px; font-weight: 800; letter-spacing: 2.2px; }
.launcher h1 { margin: 12px 0 8px; font-size: clamp(32px, 5vw, 52px); letter-spacing: -2px; }
.launcher-lead { margin: 0 0 34px; color: #7b8290; font-size: 14px; }
.launcher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.launch-card, .config-entry {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e4e7ed;
  border-radius: 17px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 44px rgba(29, 38, 61, .06);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.launch-card { min-height: 148px; padding: 22px; flex-wrap: wrap; }
.launch-card:hover, .config-entry:hover { transform: translateY(-3px); border-color: #cdd3df; box-shadow: 0 20px 50px rgba(29,38,61,.11); }
.launch-icon { width: 50px; height: 50px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; color: #fff; background: #191b22; font-size: 18px; font-weight: 800; }
.kuaishou .launch-icon { background: #ff5b1f; }
.qianchuan .launch-icon { background: linear-gradient(145deg, #526dff, #7651dc); }
.launch-card > span:nth-child(2), .config-entry > span:nth-child(2) { min-width: 0; flex: 1; }
.launch-card b, .config-entry b { display: block; font-size: 16px; }
.launch-card small, .config-entry small { display: block; margin-top: 6px; color: #8a909b; font-size: 11px; }
.launch-card i, .config-entry i { width: 100%; color: #747c8b; font-size: 11px; font-style: normal; }
.config-entry { margin-top: 16px; padding: 20px 24px; }
.config-entry > span:first-child { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #5263e8; background: #eef0ff; font-size: 20px; }
.config-entry i { width: auto; color: #5263e8; }

.config-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.config-sidebar { height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; padding: 24px 16px; color: #dce1ed; background: #171b29; }
.config-brand { display: flex; align-items: center; gap: 11px; padding: 3px 8px 26px; color: #fff; font-size: 17px; font-weight: 750; }
.config-brand-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #5a70ff, #7d55dc); }
.config-label { margin: 9px 10px; color: #6f778d; font-size: 10px; letter-spacing: .8px; }
.config-tab { width: 100%; height: 46px; display: flex; align-items: center; gap: 11px; margin-bottom: 5px; padding: 0 13px; border: 0; border-radius: 9px; color: #aeb5c7; background: transparent; cursor: pointer; text-align: left; }
.config-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.config-tab.active { color: #fff; background: linear-gradient(90deg, rgba(92,110,255,.35), rgba(92,110,255,.12)); }
.config-tab-dot { width: 10px; height: 10px; border-radius: 4px; background: #2d3039; }
.config-tab[data-platform="kuaishou"] .config-tab-dot { background: #ff5b1f; }
.config-tab[data-platform="qianchuan"] .config-tab-dot { background: #6074f5; }
.config-sidebar-bottom { margin-top: auto; }
.back-home { display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 9px; color: #9da5b9; font-size: 12px; }
.back-home:hover { color: #fff; background: rgba(255,255,255,.05); }

.config-main { min-width: 0; }
.config-topbar { height: 68px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 0 30px; border-bottom: 1px solid #e5e8ee; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.config-topbar-title { flex: 1; }
.config-topbar-title b { display: block; font-size: 15px; }
.config-topbar-title span { display: block; margin-top: 2px; color: #959ba7; font-size: 10px; }
.preview-link, .config-button { height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid #e1e4ea; border-radius: 7px; color: #596170; background: #fff; cursor: pointer; font-size: 12px; }
.config-button.primary { border-color: #4e63ea; color: #fff; background: #4e63ea; }
.config-button.danger { color: #d44848; }
.config-button:hover, .preview-link:hover { border-color: #aeb7c8; }

.config-content { width: min(1180px, 100%); margin: 0 auto; padding: 28px 30px 60px; }
.config-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.config-heading h1 { margin: 0; font-size: 24px; letter-spacing: -.7px; }
.config-heading p { margin: 6px 0 0; color: #858c99; font-size: 12px; }
.save-state { color: #89909d; font-size: 11px; }
.save-state.saved { color: #1c9a68; }

.config-section { margin-bottom: 16px; overflow: hidden; border: 1px solid #e5e8ee; border-radius: 11px; background: #fff; box-shadow: 0 5px 22px rgba(29,38,61,.035); }
.config-section-head { padding: 16px 19px; border-bottom: 1px solid #edf0f3; }
.config-section-head h2 { margin: 0; font-size: 14px; }
.config-section-head p { margin: 5px 0 0; color: #969ca8; font-size: 10px; }
.config-section-body { padding: 19px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.config-field { min-width: 0; display: grid; gap: 7px; }
.config-field.full { grid-column: 1 / -1; }
.config-field label { color: #636a77; font-size: 11px; font-weight: 600; }
.config-field input, .config-field textarea, .matrix-input { width: 100%; border: 1px solid #dde1e8; border-radius: 7px; outline: 0; color: #252a34; background: #fff; font-size: 12px; transition: border-color .15s, box-shadow .15s; }
.config-field input, .matrix-input { height: 38px; padding: 0 11px; }
.config-field textarea { min-height: 74px; padding: 10px 11px; resize: vertical; line-height: 1.6; }
.config-field input:focus, .config-field textarea:focus, .matrix-input:focus { border-color: #6275ef; box-shadow: 0 0 0 3px rgba(98,117,239,.10); }
.matrix { width: 100%; overflow-x: auto; }
.matrix-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0 9px; }
.matrix-table th { padding: 0 8px 3px; color: #9298a4; font-size: 10px; font-weight: 500; text-align: left; }
.matrix-table td { padding: 0 8px; }
.matrix-index { width: 28px; color: #a1a7b2; font-size: 11px; }
.trend-values { font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.config-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 13px; padding: 10px 12px; border-radius: 7px; color: #81662e; background: #fff8e8; font-size: 10px; line-height: 1.6; }
.config-toast { position: fixed; top: 82px; left: 50%; z-index: 50; padding: 12px 18px; border-radius: 8px; color: #fff; background: rgba(27,31,40,.94); box-shadow: 0 10px 28px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transform: translate(-50%, -8px); transition: .2s; font-size: 12px; }
.config-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .launcher-grid { grid-template-columns: 1fr; }
  .launch-card { min-height: 104px; }
  .config-shell { display: block; }
  .config-sidebar { height: auto; position: static; padding: 14px; }
  .config-brand { padding-bottom: 12px; }
  .config-label { display: none; }
  .config-sidebar nav { display: flex; gap: 6px; overflow-x: auto; }
  .config-tab { flex: 0 0 auto; width: auto; padding: 0 16px; }
  .config-sidebar-bottom { display: none; }
  .config-topbar { padding: 0 16px; }
  .config-content { padding: 20px 16px 50px; }
  .field-grid, .field-grid.three { grid-template-columns: 1fr; }
  .config-field.full { grid-column: auto; }
}

@media (max-width: 560px) {
  .launcher-page { padding: 32px 16px; }
  .config-topbar-title span { display: none; }
  .preview-link { display: none; }
  .config-button { padding: 0 10px; }
}
