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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 28, 35, 0.88);
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.28);
}

::-webkit-scrollbar-thumb {
  background: rgba(138, 145, 158, 0.42);
  border-radius: 5px;
  border: 2px solid rgba(26, 28, 35, 0.88);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 176, 190, 0.62);
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.22);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(188, 196, 210, 0.72);
}

::-webkit-scrollbar-corner {
  background: rgba(26, 28, 35, 0.88);
}

::-webkit-scrollbar-button {
  background: rgba(96, 102, 116, 0.28);
  border-radius: 3px;
}

::-webkit-scrollbar-button:hover {
  background: rgba(124, 131, 145, 0.38);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 145, 158, 0.42) rgba(26, 28, 35, 0.88);
}

html {
  font-size: 15px;
  scrollbar-color: rgba(138, 145, 158, 0.42) rgba(26, 28, 35, 0.88);
}

:root {
  --bg-primary: #181a20;
  --bg-secondary: rgba(44, 48, 60, 0.84);
  --bg-card: rgba(56, 62, 78, 0.7);
  --text-primary: #f4f7ff;
  --text-secondary: #c1c6d4;
  --accent: #4f94ee;
  --accent-hover: #4287df;
  --accent-light: rgba(79, 148, 238, 0.22);
  --border: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.1);
  --shadow: rgba(8, 10, 20, 0.28);
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #16181f 0%, #202530 28%, #273245 55%, #212736 78%, #1b202b 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(94, 163, 255, 0.14) 0%, transparent 52%),
    radial-gradient(circle at 80% 20%, rgba(111, 177, 255, 0.1) 0%, transparent 52%),
    radial-gradient(circle at 40% 40%, rgba(196, 223, 255, 0.05) 0%, transparent 42%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px;
  position: relative;
  z-index: 1;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #d9ebff 0%, #71b2ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 34px var(--shadow);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 163, 255, 0.42), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  border-color: rgba(94, 163, 255, 0.24);
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.card-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #9fd0ff);
  border-radius: 1px;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), 0 4px 20px rgba(94, 163, 255, 0.16);
  background: rgba(94, 163, 255, 0.06);
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), 0 4px 20px rgba(94, 163, 255, 0.16);
  background: rgba(94, 163, 255, 0.06);
}

input[type="text"]::-webkit-scrollbar {
  width: 8px;
}

input[type="text"]::-webkit-scrollbar-track {
  background: rgba(26, 28, 35, 0.72);
  border-radius: 4px;
}

input[type="text"]::-webkit-scrollbar-thumb {
  background: rgba(138, 145, 158, 0.4);
  border-radius: 4px;
}

input[type="text"]::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 176, 190, 0.56);
}

select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

select:hover {
  border-color: var(--accent);
  background-color: var(--bg-tertiary);
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 12px;
}

.input-hint-text {
  color: var(--text-secondary);
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
}

textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-track {
  background: rgba(26, 28, 35, 0.72);
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
  background: rgba(138, 145, 158, 0.4);
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 176, 190, 0.56);
}

textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.input-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.url-count {
  color: var(--accent);
  font-weight: 500;
}

.url-error {
  color: var(--error);
  flex: 1;
  text-align: right;
}

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

.btn {
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1;
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8fc7ff 100%);
  color: white;
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #aad4ff 100%);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--glass);
  border-color: var(--accent);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

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

.result-section {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.result-section.active {
  display: block;
}

.stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.stat-item:hover {
  border-color: var(--accent);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.result-box {
  margin-bottom: 20px;
}

.url-display {
  display: flex;
  gap: 8px;
}

.url-input {
  flex: 1;
  padding: 9px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.url-input:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.05);
}

.url-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.yaml-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.yaml-preview::-webkit-scrollbar {
  width: 8px;
}

.yaml-preview::-webkit-scrollbar-track {
  background: rgba(26, 28, 35, 0.72);
  border-radius: 4px;
}

.yaml-preview::-webkit-scrollbar-thumb {
  background: rgba(138, 145, 158, 0.4);
  border-radius: 4px;
}

.yaml-preview::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 176, 190, 0.56);
}

.yaml-key {
  color: #60a5fa;
  font-weight: 600;
}

.yaml-colon {
  color: var(--text-secondary);
}

.yaml-string {
  color: #34d399;
}

.yaml-number {
  color: #fb923c;
  font-weight: 500;
}

.yaml-boolean {
  color: #c084fc;
  font-weight: 600;
}

.yaml-null {
  color: #9ca3af;
  font-style: italic;
}

.yaml-comment {
  color: #6b7280;
  font-style: italic;
}

.yaml-list {
  color: var(--text-secondary);
  font-weight: 600;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  margin-left: auto;
}

.btn-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.btn-copy:active {
  opacity: 0.9;
}

.btn-copy.copied {
  color: var(--success);
  border-color: var(--success);
}

.label-with-copy {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.label-with-copy label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.result-label {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.shortcut-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.shortcut-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.7rem;
}

.sub-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sub-item:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.sub-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-break: break-all;
}

.sub-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.sub-remark {
  color: var(--accent);
  font-weight: 600;
}

.sub-remark-empty {
  color: var(--text-secondary);
}

.sub-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(46, 51, 74, 0.96);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 90%;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

.toast.success {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(56, 60, 74, 0.96) 100%);
}

.toast.success .toast-icon {
  color: var(--success);
}

.toast.error {
  border-color: var(--error);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(56, 60, 74, 0.96) 100%);
}

.toast.error .toast-icon {
  color: var(--error);
}

.toast.info {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(94, 163, 255, 0.24) 0%, rgba(40, 45, 58, 0.96) 100%);
}

.toast.info .toast-icon {
  color: var(--accent);
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 18px;
  height: 18px;
}

#toastMsg {
  word-wrap: break-word;
  flex: 1;
}

.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: linear-gradient(180deg, rgba(60, 69, 88, 0.96) 0%, rgba(42, 48, 62, 0.98) 100%);
  border: 1px solid rgba(122, 170, 235, 0.16);
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1001;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(122, 170, 235, 0.14);
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.01em;
}

.modal-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(122, 170, 235, 0.12);
  color: #d5dfeb;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.modal-close:hover {
  background: rgba(94, 163, 255, 0.12);
  border-color: rgba(94, 163, 255, 0.24);
  color: var(--text-primary);
}

.modal-body {
  margin-bottom: 20px;
}

.modal-body input,
.modal-body textarea {
  width: 100%;
  padding: 10px;
  background: rgba(29, 34, 44, 0.76);
  border: 1px solid rgba(122, 170, 235, 0.12);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.modal-body input:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.modal-body input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-body textarea {
  min-height: 200px;
  resize: vertical;
  font-family: 'Courier New', monospace;
  line-height: 1.6;
}

.modal-body textarea::-webkit-scrollbar {
  width: 8px;
}

.modal-body textarea::-webkit-scrollbar-track {
  background: rgba(26, 28, 35, 0.72);
  border-radius: 4px;
}

.modal-body textarea::-webkit-scrollbar-thumb {
  background: rgba(138, 145, 158, 0.4);
  border-radius: 4px;
}

.modal-body textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 176, 190, 0.56);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(122, 170, 235, 0.14);
}

.modal-footer .btn {
  min-width: 100px;
}

@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  .card {
    padding: 16px;
    border-radius: 12px;
  }

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
  }

  .input-group {
    margin-bottom: 16px;
  }

  .input-group label {
    font-size: 0.85rem;
    margin-bottom: 6px;
  }

  textarea,
  input[type="text"] {
    padding: 10px;
    font-size: 0.85rem;
    min-height: auto;
  }

  textarea {
    min-height: 120px;
  }

  select {
    padding: 10px 36px 10px 10px;
    font-size: 0.85rem;
  }

  .actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .url-display {
    flex-direction: column;
    gap: 10px;
  }

  .url-input {
    width: 100%;
    font-size: 0.8rem;
    padding: 10px;
  }

  .btn-copy {
    padding: 8px;
    align-self: flex-end;
  }

  .stats {
    gap: 12px;
  }

  .stat-item {
    flex: 1;
    min-width: calc(50% - 6px);
    padding: 12px 8px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .yaml-preview {
    font-size: 0.75rem;
    padding: 10px;
    max-height: 250px;
  }

  .shortcut-hint {
    display: none;
  }

  .sub-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
  }

  .sub-info {
    width: 100%;
  }

  .sub-info h4 {
    font-size: 0.85rem;
    word-break: break-all;
  }

  .sub-info p {
    font-size: 0.75rem;
    margin-top: 4px;
  }

  .sub-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .sub-actions .btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .modal-content {
    width: 95%;
    margin: 10px auto;
    padding: 16px;
    border-radius: 12px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
  }

  .modal-large {
    max-width: 95%;
  }

  .modal-header h3 {
    font-size: 1rem;
  }

  .modal-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    min-height: 0;
  }

  .modal-footer {
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .node-stats {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }

  .node-stat-item {
    flex: 1;
    min-width: calc(50% - 5px);
    padding: 10px 6px;
  }

  .node-stat-value {
    font-size: 1.25rem;
  }

  .node-stat-label {
    font-size: 0.7rem;
  }

  .node-list {
    max-height: 400px;
  }

  .result-label {
    font-size: 0.8rem;
  }

  .label-with-copy {
    flex-direction: row;
    justify-content: space-between;
  }

  .label-with-copy label {
    font-size: 0.8rem;
  }

  .input-hint {
    font-size: 0.75rem;
  }

  .toast {
    top: 10px;
    left: 10px;
    right: 10px;
    transform: translateY(-100px);
    max-width: none;
    width: auto;
  }

  .toast.show {
    transform: translateY(0);
  }

  .node-card-header {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .node-card-title {
    flex: 1 1 100%;
    order: 1;
  }

  .node-card-header .btn {
    order: 2;
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .node-card-index {
    padding: 4px 10px;
    font-size: 0.7rem;
  }

  .node-card-name {
    font-size: 0.85rem;
  }

  .node-card-body {
    padding: 12px 14px;
  }

  .node-info-row {
    padding: 8px 0;
  }

  .node-info-label {
    font-size: 0.75rem;
    min-width: 50px;
  }

  .node-info-value {
    font-size: 0.8rem;
  }
}

/* 节点列表样式 */
.modal-large {
  max-width: 900px;
}

.node-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(94, 163, 255, 0.16) 0%, rgba(159, 208, 255, 0.08) 100%);
  border: 1px solid rgba(94, 163, 255, 0.22);
  border-radius: 12px;
}

.node-stat-item {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.node-stat-item:hover {
  background: rgba(94, 163, 255, 0.08);
}

.node-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.node-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.node-list {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

.node-list-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px;
}

.node-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}

.node-card:hover {
  border-color: var(--accent);
}

.node-card:last-child {
  margin-bottom: 0;
}

.node-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(94, 163, 255, 0.12) 0%, rgba(159, 208, 255, 0.08) 100%);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.node-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.node-card-index {
  background: linear-gradient(135deg, var(--accent) 0%, #8fc7ff 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(94, 163, 255, 0.22);
}

.node-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.node-card-body {
  padding: 16px 20px;
}

.node-info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.node-info-row:hover {
  background: rgba(94, 163, 255, 0.07);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: 4px;
}

.node-info-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 60px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 2px;
}

.node-info-value {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
  flex: 1;
  min-width: 0;
  line-height: 1.6;
  word-break: break-word;
}

.node-info-break {
  word-break: break-all;
  font-size: 0.85rem;
  line-height: 1.6;
}

.node-security {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.node-security.tls {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.node-security.tls::before {
  content: '🔒 ';
  margin-right: 2px;
}

.node-security.reality {
  background: linear-gradient(135deg, rgba(94, 163, 255, 0.22) 0%, rgba(159, 208, 255, 0.16) 100%);
  color: var(--accent);
  border: 1px solid rgba(94, 163, 255, 0.24);
}

.node-security.reality::before {
  content: '🛡️ ';
  margin-right: 2px;
}

.node-security.none {
  background: rgba(148, 163, 184, 0.14);
  color: #c3cfdd;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.node-list::-webkit-scrollbar {
  width: 8px;
}

.node-list::-webkit-scrollbar-track {
  background: rgba(26, 28, 35, 0.72);
  border-radius: 4px;
}

.node-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(141, 166, 195, 0.5) 0%, rgba(177, 196, 218, 0.5) 100%);
  border-radius: 4px;
}

.node-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(141, 166, 195, 0.68) 0%, rgba(177, 196, 218, 0.68) 100%);
}

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

.card-actions {
  display: flex;
  gap: 8px;
}

.yaml-preview-plain {
  color: var(--text-primary);
}

.yaml-preview-plain .yaml-key,
.yaml-preview-plain .yaml-string,
.yaml-preview-plain .yaml-number,
.yaml-preview-plain .yaml-boolean,
.yaml-preview-plain .yaml-null,
.yaml-preview-plain .yaml-comment,
.yaml-preview-plain .yaml-list,
.yaml-preview-plain .yaml-colon {
  color: inherit;
  font-weight: inherit;
  font-style: inherit;
}

.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-primary);
  z-index: 3000;
}

.login-card {
  width: 90%;
  max-width: 300px;
  background: linear-gradient(180deg, rgba(60, 69, 88, 0.96) 0%, rgba(42, 48, 62, 0.98) 100%);
  border: 1px solid rgba(122, 170, 235, 0.16);
  border-radius: 16px;
  padding: 28px 20px;
  box-shadow: 0 16px 34px rgba(8, 10, 20, 0.28);
}

.login-hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 20px 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input[type="password"] {
  width: 100%;
  padding: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: center;
}

.login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.login-form .btn {
  width: 100%;
  padding: 10px;
}

.settings-btn {
  position: fixed;
  bottom: 18px;
  left: 18px;
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, rgba(63, 73, 92, 0.96) 0%, rgba(45, 51, 65, 0.98) 100%);
  border: 1px solid rgba(122, 170, 235, 0.14);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.settings-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
}

.settings-btn:active {
  opacity: 0.9;
}

.modal-small {
  max-width: 320px;
}

.settings-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  text-align: left;
}

.settings-item:hover {
  border-color: var(--accent);
  background: rgba(141, 166, 195, 0.12);
}

.settings-item svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.settings-item:hover svg {
  color: var(--accent);
}

.settings-item-danger:hover {
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.settings-item-danger:hover svg {
  color: var(--error);
}

@media (max-width: 600px) {
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-header .btn {
    width: 100%;
  }

  .settings-btn {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
  }

  .modal-small {
    max-width: 90%;
  }
}
