* {
  box-sizing: border-box;
  font-family: "Segoe UI", "PingFang SC", "Microsoft Yahei", sans-serif;
}

body {
  margin: 0;
  background: #0f1115;
  color: #e6e6e6;
}

.app {
  max-width: 1920px;
  margin: 24px auto;
  padding: 0 16px 48px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 24px;
}

.title {
  font-size: 22px;
  font-weight: 600;
}

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

.panel {
  background: #161a22;
  border: 1px solid #242a36;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  background: #1c2230;
  border: 1px solid #2a3242;
  color: #cbd5f5;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.tab.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.tab-content {
  margin-top: 6px;
}

.auth-panel {
  border-left: 6px solid transparent;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.login-panel {
  border-color: #1f2937;
  border-left-color: #2563eb;
  background: #0f172a;
}

.register-panel {
  border-color: #1f2937;
  border-left-color: #16a34a;
  background: #0d1b12;
}

.verify-panel {
  border-color: #1f2937;
  border-left-color: #f59e0b;
  background: #17120b;
}

.login-panel .btn {
  background: #2563eb;
}

.register-panel .btn {
  background: #16a34a;
}

.login-panel .btn.secondary,
.register-panel .btn.secondary {
  background: #2a3242;
}

.verify-panel .btn {
  background: #f59e0b;
  color: #1f2937;
}

.verify-panel .btn.secondary {
  background: #2a3242;
  color: #e6e6e6;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  flex: 1;
}

.field input,
.field select {
  background: #0f1115;
  border: 1px solid #2a3242;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e6e6e6;
}

.input-with-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
}

.toggle-btn {
  padding: 10px 12px;
  white-space: nowrap;
}

.btn {
  background: #3b82f6;
  border: none;
  padding: 10px 16px;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.btn.loading {
  cursor: progress;
  opacity: 0.75;
  position: relative;
  padding-right: 36px;
}

.btn.loading::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: currentColor;
  transform: translateY(-50%);
  animation: btn-spin 0.9s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.btn.secondary {
  background: #2a3242;
}

.btn.danger {
  background: #dc2626;
}

.hidden {
  display: none;
}

.table {
  border: 1px solid #2a3242;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}

.table-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.8fr 1.3fr 0.8fr 1.2fr 0.9fr 0.6fr 2fr;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #2a3242;
}

.table-row.address-row {
  grid-template-columns: 1.2fr 1fr 2fr 1.5fr 0.8fr 1.2fr 0.9fr;
}

.table-row.friends-row {
  grid-template-columns: 1.2fr 1.1fr 1fr 2fr 1.5fr 0.8fr 1.2fr 1.2fr 0.8fr 0.9fr;
}

.table-row.blacklist-row {
  grid-template-columns: 1.2fr 1fr 2fr 1.5fr 0.8fr 1.2fr 0.9fr;
}

.table-header {
  background: #1c2230;
  font-weight: 600;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row div {
  display: flex;
  align-items: center;
}

.token-box {
  background: #0f172a;
  border: 1px dashed #3b82f6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.token {
  margin-top: 8px;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  word-break: break-all;
  color: #93c5fd;
}

.verify-guide {
  margin-bottom: 12px;
  color: #cbd5f5;
}

.verify-step {
  margin-top: 6px;
}

.verify-status {
  margin-top: 4px;
  font-size: 13px;
  color: #cbd5f5;
}

.verify-status.success {
  color: #22c55e;
}

.verify-status.error {
  color: #f87171;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  border: 1px solid #1d4ed8;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  font-size: 14px;
}

.toast.error {
  background: #dc2626;
  border-color: #b91c1c;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.7);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
  background: #161a22;
  border: 1px solid #2a3242;
  border-radius: 12px;
  padding: 20px;
}

.tutorial-section {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #2a3242;
  border-radius: 10px;
  background: #131823;
}

.tutorial-step {
  margin-top: 12px;
}

.tutorial-step-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.code-block {
  background: #0f1115;
  border: 1px solid #2a3242;
  border-radius: 8px;
  padding: 10px 12px;
  color: #93c5fd;
  overflow-x: auto;
  margin: 8px 0;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  white-space: pre-wrap;
}

.tutorial-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 4px;
}

.tutorial-links a {
  color: #93c5fd;
  text-decoration: none;
  border: 1px solid #2a3242;
  padding: 6px 10px;
  border-radius: 999px;
  background: #0f1115;
}

.tutorial-links a:hover {
  border-color: #3b82f6;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #2a3242;
  border-radius: 999px;
  transition: 0.2s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: #22c55e;
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
