/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #1a1a1a;
  color: white;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Container */
.page-container {
  min-height: 100vh;
  max-width: 448px;
  margin: 0 auto;
  background-color: #1a1a1a;
  display: flex;
  flex-direction: column;
}

.page-container.center-content {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: #1a1a1a;
  z-index: 10;
  padding: 12px;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  margin-left: -8px;
  color: white;
  transition: background-color 0.2s;
}

.back-btn:active {
  background-color: rgba(55, 65, 81, 1);
}

.icon {
  width: 20px;
  height: 20px;
}

.header-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 28px;
}

.header-spacer {
  width: 40px;
}

/* Content Area */
.content {
  flex: 1;
  padding: 8px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-10px);
}

/* Field Groups */
.field-group {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 8px;
  font-weight: 600;
  line-height: 20px;
}

.network-label {
  margin-top: 0;
  padding: 4px 6px;
  margin-bottom: 6px;
}

/* Address Input */
.address-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 2px solid #00ffac;
  background: transparent;
  border-radius: 8px;
}

.address-text {
  flex: 1;
  color: white;
  font-size: 14px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.paste-btn {
  color: #00f07d;
  font-size: 14px;
  font-weight: 500;
}

.input-icon {
  width: 20px;
  height: 20px;
}

/* Network Badge */
.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #2a2a2a;
  border-radius: 9999px;
  opacity: 0.65;
  padding: 4px 10px;
}

.network-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.network-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.network-text {
  line-height: 16px;
  color: #d1d5db;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.025em;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: #6b7280;
}

/* Amount Input */
.amount-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px double #374151;
  background: transparent;
  padding: 14px 16px;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.amount-input:focus-within {
  border-color: #00f07d;
}

.amount-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  min-width: 0;
}

.amount-text-input::placeholder {
  color: #6b7280;
}

/* Remove number input spinners */
.amount-text-input::-webkit-outer-spin-button,
.amount-text-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-text-input[type="number"] {
  -moz-appearance: textfield;
}

.usdt-label {
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.max-btn {
  color: #00f07d;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
}

.max-btn:active {
  opacity: 0.7;
}

.usd-value {
  font-size: 12px;
  margin-top: 8px;
  color: #e2e8f0;
  font-weight: 500;
  line-height: 20px;
}

/* Error Box */
.error-box {
  padding: 12px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: #f87171;
  font-size: 14px;
}

/* Footer */
.footer {
  padding: 16px;
  padding-bottom: 32px;
  background-color: #1a1a1a;
}

/* Primary Button */
.primary-btn {
  width: 100%;
  padding: 16px;
  background-color: #00f07d;
  color: #1a1a1a;
  border: none;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.primary-btn:active {
  background-color: #00c968;
  transform: scale(0.98);
}

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

/* Processing Step */
.processing-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(55, 65, 81, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.spinner {
  width: 40px;
  height: 40px;
  color: #00f07d;
  animation: spin 1s linear infinite;
}

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

.processing-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.processing-subtitle {
  color: #9ca3af;
  font-size: 14px;
  text-align: center;
}

/* Success Step */
.success-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background-color: #00f07d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: #1a1a1a;
}

.success-amount {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.success-subtitle {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 24px;
}

.tx-info {
  text-align: center;
}

.tx-label {
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 4px;
}

.tx-hash {
  color: #00f07d;
  font-size: 12px;
  font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Mono", monospace;
  word-break: break-all;
  padding: 0 16px;
}

.tx-link {
  color: #60a5fa;
  font-size: 12px;
  margin-top: 8px;
  display: inline-block;
  text-decoration: none;
}

.tx-link:hover {
  text-decoration: underline;
}
