/* NYLA GO PWA Styles */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #000000 url('../GO-BACKGROUND.png') center/cover no-repeat fixed;
  color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}


.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 15px;
  padding-top: 10px;
  position: relative;
  z-index: 1;
}

.header-logo {
  width: 280px;
  height: auto;
  margin-bottom: 0px;
}

.header p {
  color: #888888;
  font-size: 14px;
  margin: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-bottom: 20px;
}

/* Form Styling */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: 500;
  font-size: 14px;
}

input, select {
  width: 100%;
  padding: 14px;
  border: 1px solid #333333;
  border-radius: 12px;
  font-size: 16px;
  box-sizing: border-box;
  background: rgba(26, 26, 26, 0.4);
  color: #ffffff;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

input::placeholder {
  color: #888888;
}

/* Amount Group */
.amount-group {
  display: flex;
  gap: 12px;
}

.amount-group input {
  flex: 0 0 120px;
}

.token-select-container {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-width: 140px;
}

.token-select-container select {
  flex: 1;
  border-radius: 12px 0 0 12px;
}

/* Blockchain Group */
.blockchain-group {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.blockchain-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 90px;
}

.blockchain-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #FF6B35;
  cursor: pointer;
}

.blockchain-option label {
  cursor: pointer;
  font-size: 14px;
  color: #ffffff;
  font-weight: 500;
  margin: 0;
}

/* Command Preview */
.command-preview {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid #333333;
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  font-family: 'SF Mono', Monaco, 'Consolas', monospace;
  font-size: 14px;
  color: #ffffff;
  word-break: break-all;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.command-preview.empty {
  color: #777777;
  font-style: italic;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Swap Arrow */
.swap-arrow {
  text-align: center;
  margin: 15px 0;
  position: relative;
}

.arrow-icon {
  font-size: 24px;
  color: #FF6B35;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid #333333;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Send Form */
.send-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Receive QR Container */
.receive-qr-container {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.4);
  border: 1px solid #333333;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.receive-qr-code {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  border-radius: 12px;
  background: #ffffff;
  padding: 15px;
}

.receive-qr-code img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

.receive-qr-container .qr-instructions {
  margin-top: 15px;
}

.receive-qr-container .qr-instructions p {
  margin: 8px 0;
  color: #ffffff;
  font-size: 14px;
}

.receive-qr-container .qr-hint {
  font-size: 12px !important;
  color: #888888 !important;
  font-style: italic;
}

/* Button Group */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 25px;
}

.refresh-button, .share-button {
  padding: 16px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
}

.refresh-button {
  background: #FF6B35;
  color: #000000;
}

.refresh-button:hover {
  background: #FF5722;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.share-button {
  background: #333333;
  color: #ffffff;
  border: 1px solid #555555;
}

.share-button:hover {
  background: #444444;
  border-color: #FF6B35;
}

.refresh-button:active, .share-button:active {
  transform: translateY(0);
}

/* Status Messages */
.status {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  max-width: 300px;
  text-align: center;
}

.status.success {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.status.error {
  background: rgba(239, 68, 68, 0.9);
  color: white;
}

/* Error Messages */
.error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 4px;
  display: none; /* Hide by default */
}

.error:not(:empty) {
  display: block; /* Only show when has content */
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid #333333;
  margin-top: auto;
}

.powered-by {
  color: #888888;
  font-size: 12px;
  margin-bottom: 8px;
}

.powered-by strong {
  color: #FF6B35;
}

.links {
  font-size: 11px;
}

.links a, .links .donate-link {
  color: #FF6B35;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
}

.links a:hover, .links .donate-link:hover {
  color: #FF5722;
  text-decoration: underline;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
  .app-container {
    padding: 15px;
  }
  
  .header h1 {
    font-size: 24px;
    letter-spacing: 2px;
  }
  
  .blockchain-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .blockchain-option {
    min-width: auto;
  }
  
  .amount-group {
    flex-direction: row;
    gap: 10px;
  }
  
  .amount-group input {
    flex: 0 0 100px;
    min-width: 100px;
  }
  
  .token-select-container {
    flex: 1;
    min-width: 120px;
  }
  
  .header-logo {
    margin-bottom: 0px;
  }
}

/* Dark mode for system preference */
@media (prefers-color-scheme: dark) {
  /* Already dark by default */
}

/* Safe area handling for notched devices */
@supports (padding: max(0px)) {
  .app-container {
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

/* Install prompt styling */
.install-prompt {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 107, 53, 0.95);
  color: #000000;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.install-prompt button {
  background: #000000;
  color: #FF6B35;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 10px;
  cursor: pointer;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #FF6B35;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-left: 8px;
}

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

/* Floating Action Button */
.floating-action-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #FF6B35, #FF5722);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
  border: none;
}

.floating-action-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.floating-action-button.active {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #FF5722, #E53E3E);
}

.fab-icon {
  font-size: 24px;
  color: #ffffff !important;
  font-weight: bold;
  text-shadow: none;
  -webkit-text-stroke: 0;
}

/* Floating Menu */
.floating-menu {
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  z-index: 999;
  animation: slideUp 0.3s ease-out;
  min-width: 180px;
}

.floating-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ffffff;
}

.floating-menu-item:hover {
  background: rgba(255, 107, 53, 0.1);
  transform: translateX(-2px);
}

.menu-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.menu-text {
  font-size: 14px;
  font-weight: 500;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Custom Token Management Styles */
.manage-tokens-btn {
  background: transparent;
  border: 1px solid #333333;
  border-left: none;
  border-radius: 0 12px 12px 0;
  padding: 0 8px;
  cursor: pointer;
  font-size: 12px;
  color: #FF6B35;
  transition: all 0.2s ease;
  min-width: 28px;
  height: auto;
}

.manage-tokens-btn:hover {
  background: rgba(255, 107, 53, 0.1);
  color: #FF5722;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  width: 420px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  margin: 0;
  color: #FF6B35;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  font-size: 20px;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: #FF6B35;
  color: #FF6B35;
  transform: rotate(90deg);
}

.modal-body {
  padding: 24px;
  max-height: calc(80vh - 100px);
  overflow-y: auto;
}

.add-token-section, .custom-tokens-section {
  margin-bottom: 30px;
}

.add-token-section {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.add-token-section h3, .custom-tokens-section h3 {
  margin: 0 0 16px 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.add-token-form {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.modal .add-token-form input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 15px;
  text-transform: uppercase;
  background: rgba(26, 26, 26, 0.8);
  color: #ffffff;
  transition: all 0.3s ease;
}

.modal .add-token-form input:focus {
  outline: none;
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
  background: rgba(26, 26, 26, 0.9);
}

.modal .add-token-form input::placeholder {
  color: #999999;
}

.add-btn {
  background: linear-gradient(135deg, #FF6B35, #FF5722);
  color: #000000;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.add-btn:hover {
  background: linear-gradient(135deg, #FF5722, #E53E3E);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.add-btn:not(:hover) {
  box-shadow: none;
}

.custom-tokens-list {
  min-height: 80px;
}

.no-custom-tokens {
  color: #999999;
  font-style: italic;
  text-align: center;
  padding: 24px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(26, 26, 26, 0.6);
}

.custom-token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(26, 26, 26, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.custom-token-item:hover {
  border-color: rgba(255, 107, 53, 0.3);
  background: rgba(26, 26, 26, 0.9);
  transform: translateY(-1px);
}

.custom-token-item:last-child {
  margin-bottom: 0;
}

.token-symbol {
  font-weight: 700;
  color: #ffffff;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.remove-token-btn {
  background: linear-gradient(135deg, #e0245e, #c91b47);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.remove-token-btn:hover {
  background: linear-gradient(135deg, #c91b47, #a91939);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(224, 36, 94, 0.4);
}

/* Modal-specific error styling */
.modal .error {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
  padding: 8px 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 8px;
  display: none; /* Hide by default */
}

.modal .error:not(:empty) {
  display: block; /* Only show when has content */
}