*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #090b0f;
  --s1: #0f1218;
  --s2: #141821;
  --line: rgba(255, 255, 255, .065);
  --line2: rgba(255, 255, 255, .11);
  --text: #eef1f6;
  --soft: #aeb8c6;
  --muted: #727d8e;
  --dim: #4b5563;
  --ok: #37d6a0;
  --ok-2: #27b88a;
  --ok-soft: rgba(55, 214, 160, .13);
  --ok-ring: rgba(55, 214, 160, .32);
  --warn: #f6b73e;
  --crit: #f46161;
  --crit-soft: rgba(244, 97, 97, .13);
  --font: "Inter", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(760px 420px at 50% -12%, rgba(55, 214, 160, .12), transparent 64%),
    radial-gradient(680px 420px at 85% 100%, rgba(124, 140, 255, .07), transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.empwrap,
.container {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.emp {
  width: min(440px, 100%);
}

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

.logo-mark,
.logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 14px;
  position: relative;
  background: linear-gradient(150deg, var(--ok), #79ecc8);
  box-shadow: 0 10px 28px rgba(55, 214, 160, .25);
  filter: none;
}

.logo-mark::before,
.logo::before {
  content: "";
  position: absolute;
  inset: 14px 13px 17px;
  border: 2px solid var(--bg);
  border-radius: 4px;
}

.logo-mark::after,
.logo::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: 13px;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--bg);
}

.brand h1 {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 820;
  letter-spacing: 0;
  color: var(--text);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  width: 100%;
  padding: 24px;
  border: 1px solid var(--line2);
  border-radius: 16px;
  background: var(--s2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42);
  text-align: center;
}

.coderow,
.code-input-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.cell,
.code-char {
  width: 52px;
  height: 58px;
  text-align: center;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 780;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: 10px;
  outline: 0;
  text-transform: uppercase;
  caret-color: var(--ok);
  transition: .16s var(--ease);
}

.code-char:focus {
  border-color: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}

.code-char.filled {
  border-color: var(--ok);
  background: rgba(55, 214, 160, .08);
  color: var(--ok);
}

.code-sep {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 18px;
  user-select: none;
}

.btn-big,
.btn-primary {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #04130d;
  background: linear-gradient(180deg, var(--ok), var(--ok-2));
  box-shadow: 0 8px 22px rgba(55, 214, 160, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
  transition: .16s var(--ease);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(55, 214, 160, .28);
}

.btn-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.error-msg {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(244, 97, 97, .26);
  border-radius: 9px;
  background: var(--crit-soft);
  color: var(--crit);
  font-size: 12px;
  text-align: left;
}

.spinner {
  width: 48px;
  height: 48px;
  margin: 4px auto 18px;
  border: 3px solid var(--line2);
  border-top-color: var(--ok);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-text,
.panel p {
  color: var(--soft);
  font-size: 13px;
}

.success-icon,
.disconnect-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 820;
}

.success-icon {
  border: 2px solid rgba(55, 214, 160, .42);
  color: var(--ok);
  background: var(--ok-soft);
}

.disconnect-icon {
  border: 2px solid rgba(244, 97, 97, .36);
  color: var(--crit);
  background: var(--crit-soft);
}

.panel h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.share-info {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.share-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.meta-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .025);
  text-align: left;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.meta-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 760;
  color: var(--soft);
}

.status-online {
  color: var(--ok);
}

.notice-card {
  margin-top: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.notice-header {
  color: var(--soft);
  font-weight: 760;
  margin-bottom: 8px;
}

.notice-list {
  list-style: none;
  display: grid;
  gap: 4px;
}

.notice-list li {
  position: relative;
  padding-left: 14px;
}

.notice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
}

.notice-privacy {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.sharebar,
.sharing-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(55, 214, 160, .26);
  background: rgba(15, 18, 24, .9);
  backdrop-filter: blur(18px);
}

.sharing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ok);
  font-size: 12px;
  font-weight: 760;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.25); }
}

.btn-stop {
  height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(244, 97, 97, .36);
  border-radius: 8px;
  background: var(--crit-soft);
  color: var(--crit);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.disconnect-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(244, 97, 97, .34);
  background: rgba(60, 18, 18, .94);
  box-shadow: 0 12px 32px rgba(244, 97, 97, .18);
}

.alert-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 760;
}

.alert-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--crit);
  color: #fff;
  font-family: var(--mono);
}

@media (max-width: 480px) {
  .empwrap,
  .container {
    padding: 20px 12px;
  }

  .panel {
    padding: 20px 16px;
  }

  .cell,
  .code-char {
    width: 43px;
    height: 52px;
    font-size: 19px;
  }

  .share-meta {
    grid-template-columns: 1fr;
  }
}
