.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
}

.card-footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  transition: all var(--transition);
  outline: none;
}

.form-input:hover,
.form-select:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: rgba(136, 146, 168, 0.5);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238892a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-input.error,
.form-select.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--error);
}

.form-hint {
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-online {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.badge-online::before {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.badge-maintenance {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.badge-maintenance::before {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.badge-offline {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

.badge-offline::before {
  background: var(--error);
  box-shadow: 0 0 8px var(--error);
}

.badge-verified {
  background: rgba(16, 185, 129, 0.18);
  color: #22c55e;
}

.badge-verified::before {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.badge-redirected {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
}

.badge-redirected::before {
  background: #06b6d4;
  box-shadow: 0 0 8px #06b6d4;
}

.badge-unstable {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
}

.badge-unstable::before {
  background: #eab308;
  box-shadow: 0 0 8px #eab308;
}

.badge-available {
  background: rgba(16, 185, 129, 0.18);
  color: #22c55e;
}

.badge-available::before {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.badge-not-available {
  background: rgba(107, 114, 128, 0.12);
  color: #9ca3af;
}

.badge-not-available::before {
  background: #9ca3af;
  box-shadow: 0 0 8px #9ca3af;
}

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 300px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastIn 0.3s ease forwards;
}

.toast.toast-exit {
  animation: toastOut 0.3s ease forwards;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid var(--error);
}

.toast-info {
  border-left: 3px solid var(--accent);
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

.toast-message {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.toast-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
  animation: modalOverlayIn 0.2s ease forwards;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease forwards;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.qr-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.qr-code img,
.qr-code canvas {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
}

.qr-code-label {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
  word-break: break-all;
}

.code-block {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.code-block-lang {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-block-copy {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  transition: all var(--transition);
  cursor: pointer;
}

.code-block-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #c9d1d9;
}

.code-block code {
  font-family: inherit;
}

.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  cursor: pointer;
}

.provider-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.provider-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.provider-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.provider-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.provider-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.provider-card-stat {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.provider-card-stat strong {
  color: var(--text-primary);
  font-weight: 600;
}

.coin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
  cursor: pointer;
}

.coin-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.coin-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.coin-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
}

.coin-card-symbol {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coin-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.coin-card-balance {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.coin-card-change {
  font-size: 0.8125rem;
  font-weight: 500;
}

.coin-card-change.positive {
  color: var(--success);
}

.coin-card-change.negative {
  color: var(--error);
}

.hierarchy-layer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: all var(--transition);
}

.hierarchy-layer::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 50%;
  width: 2px;
  height: 24px;
  background: var(--accent-gradient);
}

.hierarchy-layer:first-child::before {
  display: none;
}

.hierarchy-layer:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 24px rgba(59, 130, 246, 0.1);
}

.hierarchy-layer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.hierarchy-layer-level {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

.hierarchy-layer-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.hierarchy-layer-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.hierarchy-children {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  padding-left: 20px;
  border-left: 2px solid var(--border);
}

.loading-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner::after {
  content: "";
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner.sm::after {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.loading-spinner.lg::after {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: #ffffff;
}

.feature-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
  fill: none;
}

.feature-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  position: relative;
  transition: all var(--transition);
}

.step-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.3);
}

.step-card-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 auto 16px;
}

.step-card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-card-connector {
  display: none;
}

@media (min-width: 769px) {
  .step-card-connector {
    display: block;
    position: absolute;
    top: 50%;
    right: -28px;
    width: 32px;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0.4;
    z-index: 1;
  }

  .step-card:last-child .step-card-connector {
    display: none;
  }
}

@media (max-width: 768px) {
  .toast-container {
    right: 12px;
    left: 12px;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }

  .modal {
    max-width: none;
    margin: 12px;
  }

  .modal-body {
    padding: 16px;
  }

  .card {
    padding: 16px;
  }

  .feature-card,
  .step-card {
    padding: 20px;
  }

  .provider-card,
  .coin-card {
    padding: 16px;
  }
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: guide-step;
}

.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.guide-steps li:last-child {
  border-bottom: none;
}

.guide-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}

.guide-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guide-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
