/* GameTool — 共用样式
   深色主题，主色取自 Steam 浅蓝 #66c0f4
   纯手写，无框架、无外部字体，断网也能正常显示
*/

:root {
  --bg:        #0b1016;
  --bg-2:      #121b25;
  --panel:     #16202b;
  --panel-2:   #1b2733;
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);
  --text:      #d6e2ec;
  --text-dim:  #8ba1b4;
  --text-mute: #5f7386;
  --accent:    #66c0f4;
  --accent-2:  #3a8bbd;
  --radius:    14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1100px 620px at 50% -12%, #1b2f42 0%, rgba(27, 47, 66, 0) 62%),
    linear-gradient(180deg, var(--bg) 0%, #0a0f15 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ---------- 首页 ---------- */

.shell {
  flex: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

.brand {
  text-align: center;
  margin-bottom: 42px;
}

.brand__mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #06121c;
  background: linear-gradient(145deg, #8fd4ff 0%, var(--accent) 45%, var(--accent-2) 100%);
  box-shadow: 0 10px 28px -10px rgba(102, 192, 244, 0.65);
}

.brand h1 {
  margin: 0 0 6px;
  font-size: 27px;
  font-weight: 640;
  letter-spacing: -0.2px;
}

.brand p {
  margin: 0;
  color: var(--text-mute);
  font-size: 13.5px;
  letter-spacing: 0.2px;
}

/* 卡片列表 */
.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 100%);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: rgba(102, 192, 244, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -18px rgba(102, 192, 244, 0.55);
}

.card:active { transform: translateY(0); }

.card__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(102, 192, 244, 0.1);
  border: 1px solid rgba(102, 192, 244, 0.2);
}

.card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.card__desc {
  font-size: 12.5px;
  color: var(--text-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__arrow {
  flex: 0 0 auto;
  color: var(--text-mute);
  font-size: 17px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.card:hover .card__arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.card--off {
  opacity: 0.45;
  cursor: not-allowed;
}

.card--off:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.foot {
  padding: 34px 0 30px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(95, 115, 134, 0.65);
  letter-spacing: 0.4px;
}

/* ---------- 顶栏（内页） ---------- */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 22, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.back {
  font-size: 13px;
  color: var(--text-dim);
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.back:hover {
  color: var(--accent);
  border-color: rgba(102, 192, 244, 0.4);
}

.topbar__title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.topbar__tag {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-mute);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  letter-spacing: 0.3px;
}

/* ---------- 内页主体 ---------- */

.page {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 24px 60px;
}

/* 空白页占位 */
.placeholder {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 48px 24px;
  background: linear-gradient(170deg, rgba(22, 32, 43, 0.55) 0%, rgba(18, 27, 37, 0.2) 100%);
}

.placeholder__icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(102, 192, 244, 0.08);
  border: 1px solid rgba(102, 192, 244, 0.18);
  margin-bottom: 4px;
}

.placeholder h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.placeholder p {
  margin: 0;
  font-size: 13px;
  color: var(--text-mute);
  max-width: 420px;
}

/* ---------- 404 ---------- */

.err {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.err__code {
  font-size: 62px;
  font-weight: 700;
  line-height: 1;
  color: rgba(102, 192, 244, 0.22);
  letter-spacing: 2px;
}

.err h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.err p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-mute);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.err a {
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid rgba(102, 192, 244, 0.35);
  padding-bottom: 1px;
}

/* ---------- 登录 / 初始化 ---------- */

.login {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 22px 60px;
  text-align: center;
}

.login__mark {
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #06121c;
  background: linear-gradient(145deg, #8fd4ff 0%, var(--accent) 45%, var(--accent-2) 100%);
  box-shadow: 0 10px 28px -10px rgba(102, 192, 244, 0.65);
}

.login h1 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.1px;
}

.login__hint {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--text-mute);
}

.login__hint2 {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--text-mute);
  max-width: 380px;
  line-height: 1.65;
}

.login__form {
  display: flex;
  gap: 9px;
  width: 100%;
  max-width: 336px;
}

.login__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: rgba(22, 32, 43, 0.9);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login__input::placeholder { color: var(--text-mute); }

.login__input:focus {
  border-color: rgba(102, 192, 244, 0.6);
  box-shadow: 0 0 0 3px rgba(102, 192, 244, 0.12);
}

.login__btn {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: #06121c;
  background: linear-gradient(160deg, #8fd4ff 0%, var(--accent) 50%, var(--accent-2) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.login__btn:hover { filter: brightness(1.08); }
.login__btn:active { transform: translateY(1px); }

.login__err {
  width: 100%;
  max-width: 336px;
  margin: 0 0 14px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #ff9b9b;
  background: rgba(214, 74, 74, 0.1);
  border: 1px solid rgba(214, 74, 74, 0.28);
  border-radius: 9px;
  line-height: 1.5;
}

.login__code {
  margin: 0;
  padding: 14px 16px;
  max-width: 100%;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--accent);
  background: rgba(22, 32, 43, 0.9);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
}

.login__foot {
  margin-top: 34px;
  font-size: 11px;
  color: rgba(95, 115, 134, 0.6);
  letter-spacing: 0.4px;
}

@media (max-width: 520px) {
  .shell { padding: 0 18px; }
  .brand h1 { font-size: 23px; }
  .brand { margin-bottom: 32px; }
  .foot { padding: 26px 0 22px; }
  .page { padding: 18px 16px 44px; }
  .topbar { padding: 0 14px; }
}
