:root {
  --switch-bg-start: #f8f3ea;
  --switch-bg-end: #edf4ff;
  --switch-card: rgba(255, 255, 255, 0.92);
  --switch-border: rgba(255, 255, 255, 0.78);
  --switch-line: rgba(91, 110, 142, 0.14);
  --switch-text: #1f2937;
  --switch-muted: #607089;
  --switch-accent: #ef7a36;
  --switch-accent-soft: rgba(239, 122, 54, 0.14);
  --switch-code-bg: #121a2c;
  --switch-code-text: #f4f7ff;
  --switch-shadow: 0 28px 68px rgba(92, 115, 151, 0.16);
}

* {
  box-sizing: border-box;
}

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

body.tuzi-switch-page {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--switch-text);
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 223, 190, 0.46), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(182, 216, 255, 0.34), transparent 24%),
    linear-gradient(135deg, var(--switch-bg-start) 0%, #f7f9fc 44%, var(--switch-bg-end) 100%);
}

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

button {
  font: inherit;
}

.switch-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.switch-card {
  position: relative;
  width: min(860px, 100%);
  padding: 52px 48px;
  border-radius: 34px;
  background: var(--switch-card);
  border: 1px solid var(--switch-border);
  box-shadow: var(--switch-shadow);
  backdrop-filter: blur(20px);
  text-align: center;
  overflow: hidden;
}

.switch-card::before,
.switch-card::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}

.switch-card::before {
  top: -78px;
  right: -56px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, rgba(255, 220, 189, 0.62) 0%, rgba(255, 220, 189, 0) 72%);
}

.switch-card::after {
  bottom: -98px;
  left: -72px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(182, 216, 255, 0.4) 0%, rgba(182, 216, 255, 0) 70%);
}

.switch-kicker {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(239, 122, 54, 0.88);
}

.switch-title {
  position: relative;
  z-index: 1;
  margin: 16px 0 0;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.switch-subtitle {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 18px auto 0;
  color: var(--switch-muted);
  font-size: 15px;
  line-height: 1.7;
  white-space: normal;
}

@media (min-width: 980px) {
  .switch-subtitle {
    white-space: nowrap;
  }
}

.command-panel {
  position: relative;
  z-index: 1;
  margin-top: 28px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(240, 243, 248, 0.86);
}

.command-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  text-align: left;
}

.command-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--switch-muted);
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(95, 142, 247, 0.12);
  color: #4774db;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.sync-pill.is-stale {
  background: var(--switch-accent-soft);
  color: var(--switch-accent);
}

.command-code {
  margin: 0;
  padding: 24px 22px;
  border-radius: 20px;
  background: var(--switch-code-bg);
  color: var(--switch-code-text);
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.9;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.action-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn-primary {
  background: linear-gradient(135deg, #ef7a36, #f39a4f);
  color: #fff;
  box-shadow: 0 16px 28px rgba(239, 122, 54, 0.24);
}

.action-btn-secondary {
  background: rgba(255, 255, 255, 0.86);
  color: var(--switch-text);
  border: 1px solid rgba(95, 111, 134, 0.14);
}

.meta-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  color: var(--switch-muted);
  font-size: 14px;
  line-height: 1.7;
  flex-wrap: wrap;
}

.meta-text {
  text-align: center;
}

.meta-link {
  font-weight: 700;
  color: var(--switch-accent);
}

.error-text {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: #d35d4c;
  font-size: 14px;
  line-height: 1.7;
}

.switch-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  min-width: 120px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 26, 44, 0.92);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.switch-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .switch-layout {
    padding: 24px 16px;
  }

  .switch-card {
    padding: 36px 20px;
    border-radius: 28px;
  }

  .command-panel {
    padding: 18px;
  }

  .command-panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .command-code {
    padding: 18px 16px;
    font-size: 13px;
    line-height: 1.75;
  }

  .action-row {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    min-width: 0;
  }
}
