.save-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  box-sizing: border-box;
  position: fixed;
  top: 2svh;
  right: 2svw;
  background: rgba(0, 0, 255, 0.4);
  border: 2px solid #0000ff;
  cursor: crosshair;
  transition: all 0.3s ease;
  display: block;
  z-index: 2000;
}

.save-btn:hover {
  background: rgba(0, 0, 255, 0.6);
  border-color: #0000dd;
}

/* Mint Popup Styles */
#mintPopup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-content {
  background-color: #000;
  border: 2px solid #fff;
  padding: 30px;
  position: relative;
  min-width: 300px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  font-family: 'zx-spectrum', monospace;
}

@media (max-width: 480px) {
  .popup-content {
    padding: 20px;
    min-width: 260px;
    gap: 15px;
  }
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: crosshair;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'zx-spectrum', monospace;
}

.popup-close:hover {
  color: #ccc;
}

@media (max-width: 480px) {
  .popup-close {
    font-size: 16px;
    width: 18px;
    height: 18px;
  }
}

.popup-title {
  text-align: left;
  color: #cccccc;
  font-size: 18px;
  margin-top: 10px;
  width: 100%;
  align-self: flex-start;
}

@media (max-width: 480px) {
  .popup-title {
    font-size: 14px;
    margin-top: 5px;
  }
}

.popup-block-number {
  text-align: center;
  color: #ffffff;
  font-size: 24px;
  font-weight: bold;
}

@media (max-width: 480px) {
  .popup-block-number {
    font-size: 18px;
  }
}

.popup-minted-view {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-top: 8px;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.popup-content.popup--minted {
  max-height: 90vh;
  min-height: 85vh;
  max-width: 85vw;
  width: 85vw;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.popup-block-svg {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: auto;
}
@media (max-width: 480px), (max-height: 500px), (orientation: landscape) and (max-height: 600px) {
  .popup-block-svg {
    overflow: hidden;
  }
}
.popup-owner {
  flex-shrink: 0;
  margin-top: 0;
  padding: 6px 0 4px;
  background: #000;
}
@media (max-width: 480px) {
  .popup-content.popup--minted {
    max-height: 90vh;
  }
  .popup-owner {
    font-size: 11px;
    padding: 5px 0 2px;
  }
}
@media (max-height: 500px), (orientation: landscape) and (max-height: 600px) {
  .popup-owner {
    font-size: 10px;
    padding: 4px 0 2px;
  }
}
@media (max-height: 400px) {
  .popup-content.popup--minted {
    padding: 6px 8px;
    gap: 6px;
    max-height: 98vh;
  }
  .popup-minted-view {
    margin-top: 2px;
  }
  .popup-owner {
    font-size: 9px;
    padding: 3px 0 2px;
    line-height: 1.2;
  }
}
.popup-block-svg-iframe {
  flex: 0 0 auto;
  border: none;
  outline: none;
  display: block;
  background: #000;
}
.popup-owner {
  color: #cccccc;
  font-size: 14px;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: center;
}

.popup-price {
  color: #cccccc;
  font-size: 16px;
  width: 100%;
  text-align: left;
  align-self: flex-start;
}

@media (max-width: 480px) {
  .popup-price {
    font-size: 13px;
  }
}

.popup-button {
  background-color: #000;
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 20px;
  font-size: 16px;
  cursor: crosshair;
  font-family: 'zx-spectrum', monospace;
  width: 100%;
  max-width: 200px;
  transition: all 0.2s ease;
}

#mintBtn {
  width: max-content;
  min-width: 120px;
  max-width: min(320px, 100%);
  padding-left: 24px;
  padding-right: 24px;
}

@media (max-width: 480px) {
  .popup-button {
    padding: 8px 15px;
    font-size: 14px;
    max-width: 160px;
  }
  #mintBtn {
    min-width: 100px;
    max-width: min(280px, 100%);
    padding-left: 20px;
    padding-right: 20px;
  }
}

.popup-button:hover {
  background-color: #fff;
  color: #000;
}

.popup-button:active {
  transform: scale(0.95);
}

#connectWalletBtn {
  min-width: 200px;
  max-width: min(90vw, 100%);
  width: max-content;
  margin: 0;
  padding: 10px 24px;
  font-size: 16px;
  font-family: 'zx-spectrum', monospace;
  text-align: center;
  box-sizing: border-box;
  letter-spacing: 0;
  word-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.popup-button.connect-wallet--address {
  min-width: 140px;
  max-width: min(90vw, 100%);
  width: max-content;
  margin: 0;
  padding: 10px 12px;
  font-size: 16px;
  font-family: 'zx-spectrum', monospace;
  text-align: center;
  box-sizing: border-box;
  letter-spacing: 0;
  word-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) {
  #connectWalletBtn {
    min-width: 160px;
    max-width: min(90vw, 100%);
    padding: 8px 20px;
    font-size: 14px;
  }
  .popup-button.connect-wallet--address {
    max-width: min(90vw, 100%);
    padding: 8px 10px;
    font-size: 14px;
  }
}

.wallet-choice-modal {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  z-index: 10;
}
.wallet-choice-card {
  position: relative;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  margin: -2px;
  background-color: #000;
  border: 2px solid #fff;
  padding: 30px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: 'zx-spectrum', monospace;
}
.wallet-choice-card .popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
}
.wallet-choice-title {
  margin: 0px 0 16px 0;
  color: #ccc;
  font-size: 16px;
}
.wallet-choice-option {
  background-color: #000;
  border: 2px solid #fff;
  color: #fff;
  padding: 10px 24px;
  font-size: 14px;
  cursor: crosshair;
  font-family: 'zx-spectrum', monospace;
  min-width: 240px;
  width: 100%;
  max-width: 260px;
  white-space: nowrap;
  text-align: center;
  transition: all 0.2s ease;
}
.wallet-choice-option:hover {
  background-color: #fff;
  color: #000;
}

.message-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}
.message-modal-overlay .message-modal-box {
  min-width: 300px;
  max-width: 364px;
  width: calc(100vw);
  min-height: 348px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
}
.message-modal-text {
  color: #ccc;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}
@media (max-width: 480px) {
  .message-modal-overlay .message-modal-box {
    min-width: 260px;
    max-width: 304px;
    width: calc(100vw-4px);
    min-height: 264px;
    padding: 5px;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .wallet-choice-card {
    min-width: 260px;
  }
  .wallet-choice-option {
    min-width: 240px;
    max-width: min(280px, 100%);
  }
}

.wc-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wc-qr-overlay-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wc-qr-content {
  position: relative;
  min-width: 300px;
  width: 90vw;
  max-width: 400px;
  min-height: 480px;
  height: 75vh;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px;
  box-sizing: border-box;
}
.wc-qr-title {
  margin: 0;
  text-align: center;
  color: #cccccc;
  font-size: 18px;
}
.wc-qr-caption {
  margin-top: 4px;
  font-size: 14px;
  color: #999;
}
.wc-qr-image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.wc-qr-content .popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
}
.wc-qr-content #wcCopyUri {
  min-width: 220px;
  max-width: 280px;
  width: 100%;
}
.wc-qr-content .popup-button.wc-copied {
  color: rgb(255, 255, 255);
  border-color: rgb(255, 255, 255);
}
.wc-qr-content .popup-button.wc-copied:hover{
  color: rgb(0, 0, 0);
  border-color: rgb(0, 0, 0);
}
@media (max-width: 480px) {
  .wc-qr-content {
    min-width: 0;
    width: 90vw;
    max-width: 90vw;
    padding: 20px;
    min-height: 400px;
    height: 70vh;
  }
  .wc-qr-title {
    font-size: 14px;
  }
  .wc-qr-image {
    max-width: min(260px, 75vw);
    max-height: min(260px, 45vh);
  }
}
