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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #1a1d29;
  min-height: 100vh;
  color: #ffffff;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background: #1a1d29;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1a1d29;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header h1 {
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
  flex: 1;
  text-align: center;
}

.back-btn,
.audio-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background 0.2s;
}

.back-btn:hover,
.audio-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Container */
.container {
  padding: 0 20px 20px;
}

/* Amount Section */
.amount-section {
  text-align: center;
  padding: 20px 0 30px;
}

.amount {
  font-size: 42px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 217, 139, 0.15);
  border-radius: 20px;
}

.status-badge.pending {
  background: rgba(255, 193, 7, 0.15);
}

.status-badge.failed {
  background: rgba(244, 67, 54, 0.15);
}

.status-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.status-badge span {
  color: #00D98B;
  font-size: 14px;
  font-weight: 500;
}

.status-badge.pending span {
  color: #FFC107;
}

.status-badge.failed span {
  color: #F44336;
}

/* Info Text */
.info-text {
  text-align: center;
  margin-bottom: 30px;
  padding: 0 20px;
}

.info-text p {
  color: #8b8d97;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.help-link {
  color: #f7931a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.help-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Details Section */
.details-section {
  background: #1a1d29;
  border-radius: 12px;
  padding: 5px 0;
  margin-bottom: 30px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.detail-label {
  color: #8b8d97;
  font-size: 14px;
  font-weight: 400;
  flex-shrink: 0;
  width: 120px;
}

.detail-value {
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  text-align: right;
  word-break: break-all;
  flex: 1;
}

.detail-value-with-copy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.detail-value.address,
.detail-value.txid {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.4;
  color: #ffffff;
  max-width: 250px;
  text-align: right;
}

.copy-btn {
  background: rgba(41, 98, 255, 0.15);
  border: 1px solid #2962FF;
  color: #2962FF;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.copy-btn:hover {
  background: rgba(41, 98, 255, 0.25);
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

/* Bottom Buttons */
.bottom-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 40px;
}

.btn {
  padding: 14px 20px;
  border: none;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-secondary {
  background: #2b2e3e;
  color: #ffffff;
}

.btn-secondary:hover {
  background: #363947;
  transform: translateY(-1px);
}

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

/* Controls Panel */
.controls-panel {
  background: #252836;
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 40px;
  margin-bottom: 20px;
}

.controls-panel h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #8b8d97;
  font-size: 13px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  background: #1a1d29;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2962FF;
  background: #1f2230;
}

.form-group input::placeholder {
  color: #5d5f6d;
}

/* Amount Group */
.amount-group {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;
}

.amount-group input,
.amount-group select {
  margin: 0;
}

/* Action Buttons */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary {
  background: linear-gradient(135deg, #2962FF 0%, #1e88e5 100%);
  color: #ffffff;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(41, 98, 255, 0.3);
}

.btn-outline {
  background: transparent;
  color: #2962FF;
  border: 1px solid #2962FF;
}

.btn-outline:hover {
  background: rgba(41, 98, 255, 0.1);
  transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 500px) {
  .app {
    max-width: 100%;
  }
  
  .amount {
    font-size: 36px;
  }
  
  .detail-value.address,
  .detail-value.txid {
    max-width: 200px;
    font-size: 12px;
  }
  
  .bottom-buttons {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
  }
}

/* Dark scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1d29;
}

::-webkit-scrollbar-thumb {
  background: #2b2e3e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #363947;
}

/* Selection color */
::selection {
  background: rgba(41, 98, 255, 0.3);
  color: #ffffff;
}

/* Loading and animation states */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

.container > * {
  animation: fadeIn 0.5s ease-out;
}

/* Status colors for pending */
.status-badge.pending .status-icon circle {
  fill: #FFC107;
}

/* Status colors for failed */
.status-badge.failed .status-icon circle {
  fill: #F44336;
}

/* Processing animation */
.status-badge.processing {
  background: rgba(41, 98, 255, 0.15);
}

.status-badge.processing span {
  color: #2962FF;
  animation: pulse 2s infinite;
}

.status-badge.processing .status-icon {
  animation: rotate 2s linear infinite;
}

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