/* Button Styles */
.button,
.button.outline {
  transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.button:hover,
.button.outline:hover {
  transform: scale(1.05);
  filter: brightness(1.08);
}


.container {
  padding: 20px;
  max-width: 500px;
  margin: auto;
}

#logo {
  width: 120px;
  margin-top: 25px;
}

.version {
  color: #999;
  font-size: 14px;
  margin-top: 8px;
}

.description {
  margin-top: 20px;
  font-size: 16px;
  padding: 0 10px;
}

#banner {
  width: 100%;
  max-width: 420px;
  margin: 25px auto 20px;
  border-radius: 14px;
}

.button {
  background-color: #00A8B5;
  color: #fff;
  padding: 14px;
  font-size: 16px;
  border: 2px solid #00A8B5;
  border-radius: 12px;
  width: 80%;
  max-width: 300px;
  margin: 12px auto;
  display: block;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px white;
}

.button.outline {
  background: #fff;
  color: #00A8B5;
  border: 2px solid #00A8B5;
}

.links a {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  text-decoration: underline;
  color: #111;
}

.qr-section {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.qr-box {
  text-align: center;
}

.qr-box img {
  width: 60px;
  height: 60px;
}

.menu-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  color: #ccc;
}

#walletAccessQR {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 50%;
  padding: 10px;
}

#walletAccessQR:hover {
  box-shadow: 0 0 10px rgba(0, 168, 181, 0.6);
  transform: scale(1.05);
  cursor: pointer;
}

#walletAccessQR:active {
  transform: scale(0.95);
  box-shadow: 0 0 6px rgba(0, 168, 181, 0.8);
}

/* Mnemonic Generator Styles */
.passphrase-box-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 12px auto 8px auto;
  position: relative;
}

.edit-passphrase {
  font-size: 1.4em;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin: 0 8px;
  padding: 0 2px;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.edit-passphrase:hover {
  color: #d32f2f;
  opacity: 1;
}

.clear-icon {
  font-size: 1.4em;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin: 0 8px;
  padding: 0 2px;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.clear-icon:hover {
  color: #ffae00;
  opacity: 1;
}

.letter-box-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.letter-box {
  width: 1.28em;
  height: 1.28em;
  font-size: 1.15em;
  background: #f8fbff;
  color: #1a237e;
  font-family: "Roboto Mono", "Consolas", monospace;
  border: 2px solid #007bff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 1px 5px rgba(0, 100, 255, 0.05);
  user-select: text;
  pointer-events: none;
  transition: background 0.15s, border-color 0.15s;
}

.letter-box:hover {
  background: #e3f2fd;
  border-color: #42a5f5;
}

#genPasspharase {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 6px auto;
  padding: 6px;
  font-size: 16px;
  font-family: Arial, sans-serif;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#genPasspharase:hover {
  background-color: #0056b3;
  transform: scale(1.03);
}



.generator-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 16px auto;
  padding: 0 10px;
}

.generator-toolbar select,
.generator-toolbar button {
  padding: 10px;
  font-size: 14px;
  border-radius: 8px;
  border: 2px solid #007BFF;
  font-weight: bold;
  min-width: 200px;
}

.generator-toolbar select {
  background-color: #f5f5f5;
  color: #003366;
}

.generator-toolbar button {
  background-color: #007BFF;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: none;
  box-shadow: inset 0 0 0 3px white;
}

.generator-toolbar button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

#editPopup {
  position: fixed;
  display: none;
  background-color: #e9fdfd;
  border: 1px solid #aaa;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  padding: 15px;
  width: 90%;
  max-width: 300px;
  border-radius: 8px;
  z-index: 1000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#editPopup input {
  width: 90%;
  padding: 8px;
  margin-bottom: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
  text-align: center;
  align-items: center;
}

#editPopup .button-container {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#submitEditButton,
#cancelEditButton {
  flex: 1;
  padding: 10px;
  font-size: 1.1em;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  color: #fff;
}

#submitEditButton {
  background-color: #28a745;
}

#cancelEditButton {
  background-color: #dc3545;
}

#submitEditButton:hover {
  background-color: #218838;
}

#cancelEditButton:hover {
  background-color: #c82333;
}

#mnemonicContainer {
  max-width: 100%;
  margin: 0 auto;
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 5px;
  justify-content: center;
  transition: grid-template-columns 0.3s ease-in-out;
}

.mnemonic-box {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  width: 100%;
  box-sizing: border-box;
  padding: 5px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  border: 1px solid #007bff;
  border-radius: 4px;
  text-align: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.mnemonic-box:hover {
  background-color: #fff;
  border-color: #aaa;
}

.mnemonic-box:focus {
  border-color: #007BFF;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 99;
  display: none;
}

.loading-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 0, 0, 0.8);
  color: white;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.loading-overlay.active {
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

#copyMnemonic {
  display: block;
  width: calc(100% - 20px);
  max-width: 300px;
  margin: 5px auto;
  padding: 8px;
  font-size: 12px;
  font-family: 'Poppins', sans-serif;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#copyMnemonic:hover {
  background-color: #45a049;
  transform: scale(1.03);
}

.guideline-gray {
  font-size: 12px;
  color: rgb(63, 63, 63);
}

@media (max-width: 480px) {
  .generator-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .generator-toolbar select,
  .generator-toolbar button {
    width: 100%;
  }
}

.side-by-side-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.side-by-side-buttons button {
  padding: 10px 20px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 150px;
}

#printBackup {
  background-color: #28a745;
  color: white;
}

#printBackup:hover {
  background-color: #218838;
  transform: scale(1.05);
}

#testQrCode {
  background-color: #17a2b8;
  color: white;
}

#testQrCode:hover {
  background-color: #138496;
  transform: scale(1.05);
}

.canvas-container {
  margin: 20px auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #dee2e6;
}

#canvasWindow {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Additional Styles from index.html */


.faq-item {
  background: #f6faff;
  border-radius: 9px;
  border: 1.5px solid #b6c7e5;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(120, 130, 210, 0.06);
  transition: box-shadow 0.18s, background 0.18s;
  cursor: pointer;
  padding: 0;
}

.faq-item:hover {
  background: #e3eaf7;
  box-shadow: 0 4px 18px #b3c6f7;
}

.faq-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  font-weight: bold;
  font-size: 1.08em;
  color: #1753b6;
  text-align: left;
}

.faq-number {
  min-width: 2em;
  text-align: left;
  font-size: 1.13em;
  color: #1766e6;
  margin-right: 10px;
  font-family: "Consolas", "Roboto Mono", monospace;
}

.faq-question-text {
  flex: 1;
  text-align: left;
  font-family: inherit;
}

.faq-answer {
  padding: 0 16px 13px 38px;
  color: #1753b6;
  font-size: 1em;
  text-align: left;
  background: none;
}

.decrypted-result-box {
  margin: 10px auto 0 auto;
  max-width: 600px;
  min-height: 38px;
  background: #f2f6fc;
  border-radius: 9px;
  border: 1px solid #e3eaf7;
  font-family: "Consolas", "Roboto Mono", monospace;
  color: #1753b6;
  padding: 12px 16px;
  text-align: left;
  word-break: break-all;
  overflow-wrap: break-word;
  white-space: pre-line;
  font-size: 1.16em;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .decrypted-result-box {
    max-width: 98vw;
    padding: 10px 2vw;
    font-size: 1em;
  }
}

.report-result-box,
.raw-result-box {
  margin: 13px auto 0 auto;
  max-width: 480px;
  min-height: 32px;
  background: #f6faff;
  border-radius: 11px;
  border: 1.5px solid #b6c7e5;
  font-family: "Consolas", "Roboto Mono", monospace;
  color: #1753b6;
  padding: 10px 13px;
  text-align: left;
  word-break: break-all;
  box-shadow: 0 6px 16px rgba(120, 130, 210, 0.08);
  font-size: 1.08em;
}

.raw-result-box {
  color: #4259af;
  background: #eef4ff;
}

.validation-report-box {
  margin: 22px auto 0 auto;
  max-width: 540px;
  min-height: 70px;
  background: #f9fafd;
  border-radius: 13px;
  border: 2.5px solid #b5e2c4;
  font-family: "Consolas", "Roboto Mono", monospace;
  color: #185b27;
  padding: 22px 26px 18px 26px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(120, 180, 120, 0.07);
  font-size: 1.20em;
  position: relative;
}

.validation-report-box .success-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
  color: #2ecc40;
}

.validation-report-box .fail-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
  color: #d32f2f;
}

.validation-report-box .timestamp-display {
  display: block;
  margin: 16px auto 0 auto;
  color: #0b549d;
  font-weight: bold;
  font-size: 1.18em;
  background: #e9f5ff;
  padding: 6px 18px;
  border-radius: 8px;
  width: fit-content;
}

.validation-report-box .raw-data-box {
  margin: 14px auto 0 auto;
  color: #4259af;
  background: #eef4ff;
  border: 1px solid #b0bcdf;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 1.05em;
  word-break: break-all;
  white-space: pre-line;
  text-align: left;
  max-width: 470px;
}

.input-row {
  margin: 0 auto 16px auto;
  max-width: 370px;
  padding: 16px 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(120, 120, 150, 0.07);
  display: block;
}

#qrPopupContainer video,
#qrPopupContainer canvas {
  max-width: 300px !important;
  max-height: 300px !important;
  width: 300px !important;
  height: 300px !important;
  object-fit: cover !important;
  border-radius: 8px;
  aspect-ratio: 1/1 !important;
}

/* Mobile responsive square video */
@media (max-width: 480px) {
  #qrPopupContainer video,
  #qrPopupContainer canvas {
    max-width: 280px !important;
    max-height: 280px !important;
    width: 280px !important;
    height: 280px !important;
  }
}

/* QR Scanner Modal Video Styling - Square aspect ratio */
#dd_qrScannerModal video {
  width: 320px !important;
  height: 320px !important;
  object-fit: cover !important;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 1/1 !important;
}

/* Mobile responsive QR scanner video */
@media (max-width: 480px) {
  #dd_qrScannerModal video {
    width: 280px !important;
    height: 280px !important;
  }
}

@media (max-width: 360px) {
  #dd_qrScannerModal video {
    width: 250px !important;
    height: 250px !important;
  }
}

#dd_qrScannerModal canvas {
  display: none;
}

/* QR Scanner Modal Container */
#dd_qrScannerModal .popup-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* QR Scanner Video Container - Square */
#dd_qrScannerModal div[style*="width: 320px"],
#dd_qrScannerModal .qr-video-container {
  position: relative;
  width: 320px !important;
  height: 320px !important;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  margin: 0 auto;
  aspect-ratio: 1/1 !important;
}

/* Mobile responsive video container */
@media (max-width: 480px) {
  #dd_qrScannerModal div[style*="width: 320px"],
  #dd_qrScannerModal .qr-video-container {
    width: 280px !important;
    height: 280px !important;
  }
}

@media (max-width: 360px) {
  #dd_qrScannerModal div[style*="width: 320px"],
  #dd_qrScannerModal .qr-video-container {
    width: 250px !important;
    height: 250px !important;
  }
}

/* QR Scanner Overlay */
#dd_qrScannerOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* QR Scanner Frame with Corner Marks - Responsive square */
#dd_qrScannerOverlay > div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: none; /* Remove solid border */
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
  aspect-ratio: 1/1 !important;
}

/* Corner marks - Top Left */
#dd_qrScannerOverlay > div::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 3px;
  background: #00ff00;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

#dd_qrScannerOverlay > div::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 3px;
  height: 20px;
  background: #00ff00;
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

/* Corner marks - Top Right */
#dd_qrScannerOverlay > div {
  background-image:
    /* Top Right Corner */
    linear-gradient(to right, #00ff00 0%, #00ff00 100%),
    linear-gradient(to bottom, #00ff00 0%, #00ff00 100%),
    /* Bottom Right Corner */
    linear-gradient(to right, #00ff00 0%, #00ff00 100%),
    linear-gradient(to bottom, #00ff00 0%, #00ff00 100%),
    /* Bottom Left Corner */
    linear-gradient(to right, #00ff00 0%, #00ff00 100%),
    linear-gradient(to bottom, #00ff00 0%, #00ff00 100%);
  background-position:
    /* Top Right Corner */
    calc(100% - 4px) 4px,
    calc(100% - 4px) 4px,
    /* Bottom Right Corner */
    calc(100% - 4px) calc(100% - 4px),
    calc(100% - 4px) calc(100% - 23px),
    /* Bottom Left Corner */
    4px calc(100% - 4px),
    4px calc(100% - 23px);
  background-size:
    /* Top Right Corner */
    20px 3px,
    3px 20px,
    /* Bottom Right Corner */
    20px 3px,
    3px 20px,
    /* Bottom Left Corner */
    20px 3px,
    3px 20px;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.6));
}

/* Mobile responsive corner marks */
@media (max-width: 480px) {
  #dd_qrScannerOverlay > div {
    width: 180px;
    height: 180px;
  }
  
  #dd_qrScannerOverlay > div::before {
    width: 18px;
  }
  
  #dd_qrScannerOverlay > div::after {
    height: 18px;
  }
  
  #dd_qrScannerOverlay > div {
    background-size:
      18px 3px, 3px 18px,
      18px 3px, 3px 18px,
      18px 3px, 3px 18px;
    background-position:
      calc(100% - 4px) 4px,
      calc(100% - 4px) 4px,
      calc(100% - 4px) calc(100% - 4px),
      calc(100% - 4px) calc(100% - 21px),
      4px calc(100% - 4px),
      4px calc(100% - 21px);
  }
}

@media (max-width: 360px) {
  #dd_qrScannerOverlay > div {
    width: 160px;
    height: 160px;
  }
  
  #dd_qrScannerOverlay > div::before {
    width: 16px;
  }
  
  #dd_qrScannerOverlay > div::after {
    height: 16px;
  }
  
  #dd_qrScannerOverlay > div {
    background-size:
      16px 3px, 3px 16px,
      16px 3px, 3px 16px,
      16px 3px, 3px 16px;
    background-position:
      calc(100% - 4px) 4px,
      calc(100% - 4px) 4px,
      calc(100% - 4px) calc(100% - 4px),
      calc(100% - 4px) calc(100% - 19px),
      4px calc(100% - 4px),
      4px calc(100% - 19px);
  }
}

#qrPopupContent {
  max-width: 410px !important;
  width: 410px !important;
}

/* QR Code Preview Styles - shown inside camera frame */
#qrPreviewOverlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: 8px;
}

#qrPreviewImage {
  border: 4px solid #ff0000;
  border-radius: 8px;
  background: white;
  padding: 4px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
  animation: qrPreviewPulse 0.5s ease-in-out;
  max-width: 75%;
  max-height: 75%;
}

@keyframes qrPreviewPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Position camera container relative for overlay positioning */
#step-camera {
  position: relative;
}

/* Add this to your existing styles */
.wallet-address-label {
  font-size: 0.98em;
  color: #6b809c;
  margin-bottom: 3px;
  margin-top: 8px;
  min-width: 80px;
  /* Fixed width for labels */
  display: inline-block;
  text-align: right;
  margin-right: 12px;
}

.wallet-address-value {
  font-family: 'Roboto Mono', 'Consolas', monospace;
  font-size: 1.13em;
  color: #153e71;
  background: #f6f8fa;
  padding: 6px 14px;
  border-radius: 8px;
  user-select: auto;
  pointer-events: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  flex: 1 1 0%;
  letter-spacing: .04em;
  margin-left: 0;
  /* Remove any left margin */
}

.wallet-key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  width: 100%;
  padding-left: 20px;
  /* Indent keys slightly */
}

/* Test QR Popup Styles */
#testQrPopupContainer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: rgba(30, 40, 60, 0.18);
}

#testQrPopupContent {
  margin: 3vh auto 0 auto;
  max-width: 650px;
  min-height: 640px;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 8px 32px rgba(120, 130, 210, 0.13);
  padding: 0;
  position: relative;
}

#closeTestQrPopupBtn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 1.5em;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
}

/* --- Wallet Card Styles (from EntrophyPrototype2.html) --- */
.wallet-card-container {
  max-width: 480px;
  margin: 0 auto 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 32px rgba(44, 64, 120, 0.11), 0 1.5px 4px #e8eefb;
  padding: 32px;
}

.wallet-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.wallet-qr {
  flex: none;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 12px #e9eef9;
  cursor: pointer;
  transition: box-shadow 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-qr:hover {
  box-shadow: 0 2px 18px #b3c6f7;
}

.wallet-details {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.styled-select {
  appearance: none;
  background: linear-gradient(90deg, #e3eaf7 0%, #f6faff 100%);
  border: 2px solid #b3cdf2;
  border-radius: 8px;
  padding: 10px 38px 10px 16px;
  font-size: 1.13em;
  color: #1753b6;
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  outline: none;
  box-shadow: 0 2px 10px rgba(120, 130, 210, 0.07);
  cursor: pointer;
  margin-bottom: 10px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="gray" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  width: 100%;
  max-width: 260px;
  min-width: 120px;
  display: block;
}

.styled-select:focus {
  border: 2px solid #1766e6;
  box-shadow: 0 0 0 2px #b3cdf2;
}

.wallet-address-label {
  font-size: 0.98em;
  color: #6b809c;
  margin-bottom: 3px;
  margin-top: 8px;
}

.wallet-address-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.wallet-address-value {
  font-family: 'Roboto Mono', 'Consolas', monospace;
  font-size: 1.13em;
  color: #153e71;
  background: #f6f8fa;
  padding: 6px 14px;
  border-radius: 8px;
  user-select: auto;
  pointer-events: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  flex: 1 1 0%;
  letter-spacing: .04em;
}

.wallet-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 1.15em;
  color: #1d5dd8;
  position: relative;
}

.wallet-copy-btn:active {
  background: #e8f1fe;
}

.wallet-copy-btn[aria-label="Copied!"]::after {
  content: "Copied!";
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #1976d2;
  color: #fff;
  padding: 1.5px 7px;
  border-radius: 5px;
  font-size: 0.98em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
}

@media (max-width: 620px) {
  .wallet-card-container {
    padding: 16px 2vw;
  }

  .wallet-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .wallet-qr {
    margin: 0 auto 10px auto;
  }

  .wallet-address-value {
    max-width: 96vw;
  }

  .wallet-copy-btn {
    font-size: 1.22em;
  }
}

/* Mnemonic Word Input Styles */
.word-input-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.word-input {
  width: 100%;
  padding: 6px 28px 6px 6px;
  border: 2px solid #b3cdf2;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 0.85em;
  text-align: center;
  box-sizing: border-box;
  margin-bottom: 2px;
}

.word-input:focus {
  border-color: #1766e6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 102, 230, 0.2);
}

.word-input.hidden-text {
  -webkit-text-security: disc;
  font-family: 'Courier New', monospace;
}

.word-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8em;
  color: #1766e6;
  padding: 2px;
  border-radius: 3px;
}

.word-toggle-btn:hover {
  background: rgba(23, 102, 230, 0.1);
}

@media (max-width: 480px) {
  #mnemonic-word-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

/* Public Key Toggle */
.public-key-toggle {
  background: none;
  border: none;
  color: #1766e6;
  cursor: pointer;
  font-size: 0.9em;
  text-decoration: underline;
  padding: 0;
}

.public-key-toggle:hover {
  color: #1455c7;
}

/* Tron Features */
.tron-features {
  margin-top: 20px;
  border-top: 1px solid #e3eaf7;
  padding-top: 20px;
}


.tron-balance {
  background: #f8f9fd;
}

.tron-transaction {
  background: #fff3cd;
  border-color: #ffc107;
}

.tron-button {
  background: #1766e6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 8px;
}

.tron-button:hover {
  background: #1455c7;
}

.tron-status {
  display: none;
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
}

/* Add Network Button and Popup Styles */
.add-btn-row {
  text-align: center;
  margin-top: 16px;
  padding: 16px;
}

.add-network-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1em;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  transition: all 0.2s ease-in-out;
}

.add-network-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* CSS for Global Address List and Favorites */
#global-addresses-list {
  padding: 16px;
}

#global-addresses-list h3 {
  margin: 0 0 16px 0;
  color: #1753b6;
  font-size: 1.4em;
  text-align: center;
}

.asset-list-item {
  transition: background-color 0.2s ease;
}

.asset-list-item:hover {
  background-color: #f8f9fa !important;
  border-radius: 8px;
  margin: 0 -8px;
  padding: 12px 8px !important;
}

/* Star/Favorite styling */
.asset-list-item span[onclick*="toggleAssetFavorite"] {
  user-select: none;
  transform: scale(1);
  transition: transform 0.1s ease;
  font-size: 24px !important;
  width: 24px !important;
  height: 24px !important;
}

.asset-list-item span[onclick*="toggleAssetFavorite"]:hover {
  transform: scale(1.2);
}

.asset-list-item span[onclick*="toggleAssetFavorite"]:active {
  transform: scale(0.9);
}

/* Copy button styling */
.asset-list-item button {
  transition: all 0.2s ease;
  white-space: nowrap;
}

.asset-list-item button:hover {
  background: #218838 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.asset-list-item button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* View control buttons */
.icon-btn.active {
  background: #e3eaf7 !important;
  color: #1753b6 !important;
}

/* Responsive design for mobile */
@media (max-width: 600px) {
  .asset-list-item {
    padding: 8px 0 !important;
    flex-wrap: wrap;
  }

  .asset-list-item>div:nth-child(3) {
    flex: 1 1 100%;
    margin-top: 8px;
    padding-left: 44px;
  }

  .asset-list-item>div:nth-child(4) {
    margin-top: 8px;
  }

  .asset-list-item button {
    font-size: 0.75em;
    padding: 4px 8px;
  }
}

/* Network icon fallback */
.asset-list-item img[onerror] {
  background: #f0f0f0;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  color: #666;
}

/* Popup Styles */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.popup-action {
  background: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-right: 8px;
}

.popup-cancel {
  background: #6c757d;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.popup-action:hover {
  background: #218838;
}

.popup-cancel:hover {
  background: #5a6268;
}

/* Hidden class for dashboard1.html compatibility */
.hidden {
  display: none !important;
}

/* Filter controls alignment */
.filter-controls {
  text-align: left;
}

/* Turquoise theme styles - optimized body rules */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  text-align: center;
  background: #fff;
  color: #333;
  overflow-x: hidden !important;
  max-width: 100vw !important;
}



/* Cover page specific styles */
#cover {
  padding-top: 80px !important;
  padding-bottom: 160px !important;
}

/* Logo sizing */
#coverlogo, #dashboardLogo {
  width: 320px !important;
  height: auto !important;
  max-width: 100% !important;
}

/* Dashboard specific styling */
#dashboard {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
  min-height: auto !important;
  height: auto !important;
}

#dashboard.show {
  display: block !important;
}

#dashboard.hide {
  display: none !important;
}

/* Copy button and icon styles */
.address-value-wrapper {
  padding-right: 30px !important;
  box-sizing: border-box !important;
}

.copy-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
}

/* Text truncation styles */
.asset-subtitle {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 300px !important;
}

.coin-name {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 350px !important;
  text-align: left !important;
}

.coin-meta {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 300px !important;
  font-size: 0.85em !important;
  color: #666 !important;
  text-align: left !important;
}

/* Network names alignment */
.network-name {
  text-align: left !important;
}

/* Asset info alignment */
.asset-info {
  text-align: left !important;
}

.asset-info .coin-name {
  text-align: left !important;
}

/* Asset page header alignment */
.coin-symbol {
  text-align: left !important;
}

.network-name {
  text-align: left !important;
}

/* Wallet total values alignment */
.wallet-total,
.wallet-btc {
  text-align: left !important;
}

/* Icon button styles */
.icon-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
}

.icon-btn svg {
  width: 24px !important;
  height: 24px !important;
}

/* Mobile-specific navigation fixes */
@media (max-width: 768px) {
  #cover.hide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  #dashboard.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    z-index: 10 !important;
  }
}

@media (max-width: 500px) {

  
  #cover {
    padding-top: max(60px, calc(80px * (100vw / 500px))) !important;
    padding-bottom: max(120px, calc(160px * (100vw / 500px))) !important;
  }
  
  .address-value-wrapper {
    padding-right: max(20px, calc(30px * (100vw / 500px))) !important;
  }
  
  .copy-icon {
    width: max(12px, calc(16px * (100vw / 500px))) !important;
    height: max(12px, calc(16px * (100vw / 500px))) !important;
  }
  
  .asset-subtitle {
    max-width: max(150px, calc(300px * (100vw / 500px))) !important;
  }
  
  .coin-name {
    max-width: max(180px, calc(350px * (100vw / 500px))) !important;
  }
  
  .icon-btn {
    width: max(24px, calc(32px * (100vw / 500px))) !important;
    height: max(24px, calc(32px * (100vw / 500px))) !important;
    min-width: max(24px, calc(32px * (100vw / 500px))) !important;
    min-height: max(24px, calc(32px * (100vw / 500px))) !important;
  }
  
  .icon-btn svg {
    width: max(18px, calc(24px * (100vw / 500px))) !important;
    height: max(18px, calc(24px * (100vw / 500px))) !important;
  }
}

@media (max-width: 480px) {
  #cover.hide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    max-height: 0 !important;
    overflow: hidden !important;
    height: 0 !important;
  }
  
  #dashboard.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    z-index: 15 !important;
  }
}

@media (max-width: 360px) {
  .section {
    width: calc(100vw - 4px) !important;
    margin: 2px auto !important;
  }
}

/* Loading Spinner Styles */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-container {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 2px solid #20b2aa;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #20b2aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 14px;
  color: #666;
  opacity: 0.8;
}
