:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", "HarmonyOS Sans SC", system-ui, sans-serif;
  background: #070b10;
  color: #f7fbff;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(101, 217, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(101, 217, 255, .04) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(47, 191, 133, .30), transparent 30%),
    radial-gradient(circle at 10% 78%, rgba(101, 217, 255, .14), transparent 26%),
    linear-gradient(155deg, #070b10 0%, #101c24 52%, #091017 100%);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

.phone-shell {
  width: min(430px, 100%);
}

.phone {
  min-height: 760px;
  padding: 22px;
  border: 1px solid rgba(101, 217, 255, .24);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(18, 31, 41, .96), rgba(7, 11, 16, .98));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .46),
    0 0 42px rgba(47, 191, 133, .14);
  overflow: hidden;
  position: relative;
}

.phone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(101, 217, 255, .10), transparent);
  transform: translateX(-70%);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.app-kicker,
.form-kicker,
.label,
.stats-grid span {
  color: #8edfff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: .02em;
  text-shadow: 0 0 22px rgba(101, 217, 255, .28);
}

h2 {
  letter-spacing: .03em;
}

.status-pill,
.latency {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 191, 133, .14);
  color: #65e0aa;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid rgba(101, 224, 170, .24);
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #572632;
  color: #ffe8ec;
  position: relative;
  z-index: 1;
}

.notice.ok {
  background: #174936;
  color: #dfffee;
}

.connect-view,
.login-stage {
  position: relative;
  z-index: 1;
}

.connect-view {
  display: grid;
  gap: 16px;
}

.connection-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 20px 26px;
  border-radius: 22px;
  background:
    radial-gradient(circle, rgba(47, 191, 133, .22), transparent 64%),
    rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .11);
}

.ring {
  width: 218px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 18deg, #2fbf85, #65d9ff, #2fbf85),
    rgba(255, 255, 255, .05);
  padding: 8px;
}

.power-button {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-decoration: none;
  color: #ecfff7;
  background: linear-gradient(180deg, #12242d, #0a1015);
  box-shadow: inset 0 0 32px rgba(101, 217, 255, .18);
}

.power-button strong {
  font-size: 28px;
}

.power-icon {
  width: 38px;
  height: 46px;
  border: 5px solid #65e0aa;
  border-top: 0;
  border-radius: 0 0 24px 24px;
  position: relative;
}

.power-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -19px;
  width: 5px;
  height: 30px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #65e0aa;
}

.state-text {
  color: #b9cad4;
  font-size: 17px;
  font-weight: 800;
}

.user-text {
  color: #778996;
  font-size: 14px;
}

.node-card,
.stats-grid > div,
.auth-panel,
.modal-card {
  border: 1px solid rgba(101, 217, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .065);
  backdrop-filter: blur(16px);
}

.node-card {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.node-card h2 {
  margin-top: 7px;
  font-size: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stats-grid > div {
  min-height: 78px;
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.stats-grid strong {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.actions {
  display: grid;
  gap: 12px;
}

.download-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.login-stage {
  min-height: 610px;
  display: grid;
  align-content: center;
  gap: 18px;
}

.signal-orbit {
  height: 196px;
  position: relative;
  display: grid;
  place-items: center;
  margin-top: -4px;
}

.signal-orbit::before {
  content: "VPN";
  width: 94px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #04110c;
  background: linear-gradient(135deg, #65e0aa, #65d9ff);
  font-weight: 1000;
  font-size: 24px;
  box-shadow: 0 0 42px rgba(101, 217, 255, .36);
}

.signal-orbit span {
  position: absolute;
  border: 1px solid rgba(101, 217, 255, .22);
  border-radius: 50%;
}

.signal-orbit span:nth-child(1) {
  width: 140px;
  aspect-ratio: 1;
}

.signal-orbit span:nth-child(2) {
  width: 180px;
  aspect-ratio: 1;
}

.signal-orbit span:nth-child(3) {
  width: 220px;
  aspect-ratio: 1;
  border-color: rgba(47, 191, 133, .20);
}

.auth-panel {
  padding: 20px;
  box-shadow: 0 0 36px rgba(101, 217, 255, .08);
}

.auth-panel h2,
.modal-card h2 {
  margin-top: 6px;
  font-size: 28px;
}

.form-copy {
  margin: 8px 0 18px;
  color: #91a6b4;
  font-size: 14px;
  line-height: 1.6;
}

label {
  display: grid;
  gap: 8px;
  margin: 13px 0;
  color: #d7e2e9;
  font-size: 14px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(101, 217, 255, .22);
  border-radius: 12px;
  background: rgba(4, 9, 13, .76);
  color: #fff;
  padding: 0 14px;
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 0 18px rgba(101, 217, 255, .04);
}

textarea {
  width: 100%;
  border: 1px solid rgba(101, 217, 255, .22);
  border-radius: 12px;
  background: rgba(4, 9, 13, .76);
  color: #fff;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

textarea:focus {
  border-color: #65d9ff;
  box-shadow: 0 0 0 3px rgba(101, 217, 255, .12);
}

input:focus {
  border-color: #65d9ff;
  box-shadow: 0 0 0 3px rgba(101, 217, 255, .12);
}

a,
button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
  font-size: 16px;
}

.primary {
  width: 100%;
  background: linear-gradient(135deg, #2fbf85, #65d9ff);
  color: #04110c;
  box-shadow: 0 12px 34px rgba(47, 191, 133, .26);
}

.secondary {
  width: 100%;
  background: #65d9ff;
  color: #061219;
}

.ghost,
.register-before {
  width: 100%;
  color: #e8f3f8;
  border: 1px solid rgba(101, 217, 255, .24);
  background: rgba(255, 255, 255, .04);
}

.register-before {
  margin: 8px 0 10px;
  color: #9eefff;
}

.enter-button {
  min-height: 54px;
}

.register-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 22px;
}

.register-modal:target {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(101, 217, 255, .20), transparent 32%),
    rgba(3, 7, 11, .88);
  backdrop-filter: blur(12px);
}

.modal-card {
  width: min(430px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  position: relative;
  z-index: 1;
  padding: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .50);
}

.modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.close-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  color: #f7fbff;
  background: rgba(255, 255, 255, .08);
  font-size: 28px;
  line-height: 1;
}

.admin-shell {
  width: min(1080px, 100%);
}

.admin-panel {
  min-height: 720px;
  padding: 24px;
  border: 1px solid rgba(101, 217, 255, .24);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18, 31, 41, .96), rgba(7, 11, 16, .98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .46);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}

.small-link {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.node-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.node-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(101, 217, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}

.node-item strong,
.node-item span {
  display: block;
}

.node-item span {
  margin-top: 6px;
  color: #91a6b4;
  font-size: 13px;
}

.node-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact {
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.user-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(101, 217, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}

.user-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.line-switch {
  padding: 14px;
  border: 1px solid rgba(101, 217, 255, .18);
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
}

.empty-line,
.disabled-action {
  width: 100%;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(145, 166, 180, .20);
  border-radius: 12px;
  background: rgba(145, 166, 180, .08);
  color: #91a6b4;
  font-weight: 900;
}

select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(101, 217, 255, .22);
  border-radius: 12px;
  background: #09131b;
  color: #fff;
  padding: 0 12px;
  font-size: 15px;
}

@media (max-width: 460px) {
  body {
    padding: 0;
    place-items: stretch;
  }

  .phone-shell,
  .phone {
    width: 100%;
    min-height: 100vh;
  }

  .admin-panel {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .node-item {
    display: grid;
  }

  .inline-form,
  .user-item,
  .user-form {
    grid-template-columns: 1fr;
  }

  .download-row {
    grid-template-columns: 1fr;
  }

  .phone {
    border-radius: 0;
    border: 0;
  }

  .ring {
    width: min(218px, 70vw);
  }
}
