@font-face {
  font-family: 'Inter';
  src: url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
}

.modal-container {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: #FFFFFF;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 434px;
  background-color: #222222;
  border-radius: 16px;
  width: 100%;
  max-width: min(418px, 95vw);
  margin: 0;
  font-family: 'Inter', sans-serif;
  opacity: 0;
  animation: modalFadeIn 0.3s ease-out forwards;
  animation-delay: 0.1s;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(199, 193, 193, 0.15);
  z-index: 999999;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  isolation: isolate;
  padding: 30px min(240px, 20%) 0 0;
  box-sizing: border-box;
  opacity: 0;
  animation: overlayFadeIn 0.2s ease-out forwards;
}

.header {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 0px;
  padding-bottom: 16px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  position: relative;
  height: 30px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  border-bottom-color: #323232;
}

.loading-container {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  gap: 10px;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.loading-dot {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  height: 12px;
  width: 12px;
  background-color: rgb(171, 159, 242);
  border-radius: 50%;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 1;
  overflow: hidden;
  animation: dotPulse 1s infinite;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.input-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  padding: 0;
  margin: 20px 0;
}

.input-outer {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  width: 100%;
  filter: blur(0px);
  transition: 0.1s linear;
}

.input-group {
  width: 100%;
  height: 41px;
  display: flex;
  align-items: center;
  background: rgb(24, 24, 24);
  border: 1px solid rgb(47, 47, 47);
  border-radius: 6px;
  padding: 0 8px;
  box-sizing: border-box;
}

.input-group:has(.phrase-input:focus) {
  border-color: rgb(171, 159, 242);
}

.input-number {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  color: rgb(153, 153, 153);
  text-align: center;
  font-style: normal;
  font-weight: normal;
  opacity: 1;
  font-size: 14px;
  line-height: 25px;
  text-decoration: none;
  background-color: transparent;
  padding-left: 10px;
  padding-right: 5px;
}

.phrase-input {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  padding: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

.phrase-input:focus {
  outline: none;
}

.recovery-outer {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  padding: 0px 5px;
  margin: 10px 0px 20px;
  width: 100%;
}

.recovery-middle {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  display: flex;
  flex-direction: row;
  width: 100%;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  margin-top: 10px;
}

.recovery-inner {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  color: rgb(119, 119, 119);
  size: 14px;
  line-height: 17px;
}

.recovery-inner:hover {
  color: rgb(171, 159, 242);
}

.submit-button {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  font-family: Inter, Roboto, Arial;
  user-select: none;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  display: flex;
  flex-direction: row;
  -webkit-box-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  align-items: center;
  padding: 14px 0px;
  width: 100%;
  height: 47px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
  color: white;
  pointer-events: auto;
  border: none;
  outline-color: transparent;
  outline-style: none;
  cursor: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgb(51, 51, 51);
  opacity: 0.6;
  margin-top: auto;
}

.title-container {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  display: flex;
  flex-direction: column;
  width: 100%;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: start;
  justify-content: flex-start;
  margin: 30px 0px 20px;
}

.title-text {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  font-family: Inter, Roboto, Arial;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  color: rgb(255, 255, 255);
  text-align: center;
  font-style: normal;
  font-weight: 500;
  opacity: 1;
  font-size: 28px;
  margin: 0px 0px 10px;
  line-height: 34px;
  text-decoration: none;
  background-color: transparent;
}

.subtitle-text {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  text-rendering: optimizespeed;
  font-family: Inter, Roboto, Arial;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  font-family: Inter, Roboto, Arial;
  color: rgb(153, 153, 153);
  text-align: center;
  font-style: normal;
  font-weight: normal;
  opacity: 1;
  font-size: 18px;
  line-height: 25px;
  text-decoration: none;
  background-color: transparent;
  max-width: 340px;
}

.error-message {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  box-sizing: border-box;
  user-select: none;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin: 0px;
  padding: 0px;
  border: 0px;
  font: inherit;
  vertical-align: baseline;
  color: rgb(235, 55, 66);
  text-align: left;
  font-style: normal;
  font-weight: normal;
  opacity: 1;
  font-size: 14px;
  line-height: 25px;
  text-decoration: none;
  background-color: transparent;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  margin-top: 10px;
  justify-content: flex-start;
}

.error-icon {
  --reach-menu-button: 1;
  --reach-checkbox: 1;
  --reach-tooltip: 1;
  --reach-listbox: 1;
  font: inherit;
  text-align: left;
  font-style: normal;
  font-weight: normal;
  font-size: 14px;
  line-height: 25px;
  width: 12px;
  height: 12px;
  fill: none;
  box-sizing: border-box;
  font-family: Inter, Roboto, Arial;
  user-select: none;
  color: currentcolor;
  text-rendering: optimizespeed;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none;
  margin-right: 6px;
  transform: translateY(-1px);
  display: inline-flex;
  align-items: center;
}

.phantom-logo {
  color: rgb(171, 159, 242);
}

.close-button {
  color: #777777;
  cursor: pointer;
}

.close-button:hover {
  color: #ffffff;
}


.modal-container *,
.modal-container *:before,
.modal-container *:after {
  box-sizing: inherit;
}

.processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.processing-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgb(171, 159, 242);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

.processing-text {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

.error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  margin-top: 40px;
  margin-bottom: 40px;
  text-align: center;
  padding: 0 20px;
}

.error-circle {
  width: 48px;
  height: 48px;
  background: #EB3742;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-x {
  color: white;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-2px);
}

.error-title {
  color: white;
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
}

.error-description {
  color: #999999;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  max-width: 280px;
}

.try-again-button {
  background: rgb(171, 159, 242);
  color: rgb(34, 34, 34);
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  min-width: 120px;
}

.try-again-button:hover {
  opacity: 0.9;
}

/* Media query for mobile devices */
@media screen and (max-width: 768px) {
  .modal-overlay {
    padding: 20px;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(20px);
  }

  .modal-container {
    max-width: 95vw;
    padding: 16px;
    margin: 0 auto;
    min-height: auto;
  }

  .input-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px 0;
  }

  .input-group {
    height: 38px;
  }

  .title-container {
    margin: 20px 0px 16px;
  }

  .title-text {
    font-size: 24px;
    line-height: 30px;
  }

  .subtitle-text {
    font-size: 16px;
    line-height: 22px;
  }
}

/* Media query for very small screens */
@media screen and (max-width: 480px) {
  .modal-overlay {
    padding: 16px;
  }

  .modal-container {
    padding: 12px;
  }

  .input-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin: 12px 0;
  }

  .input-group {
    height: 36px;
  }

  .input-number {
    font-size: 12px;
    min-width: 20px;
  }

  .phrase-input {
    font-size: 14px;
  }
}

/* Add keyframe animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Add fade out animations */
.modal-overlay.closing {
  animation: overlayFadeIn 0.2s ease-out reverse forwards;
}

.modal-overlay.closing .modal-container {
  animation: modalFadeIn 0.2s ease-out reverse forwards;
}

/* Password input styles */
.password-input {
  width: 100%;
  background: rgb(47, 47, 47);
  border: 1px solid rgb(47, 47, 47);
  border-radius: 8px;
  padding: 12px;
  color: white;
  font-size: 16px;
  margin: 20px 0;
}

.password-input:focus {
  border-color: rgb(171, 159, 242);
  outline: none;
}

/* Scanning styles */
.scanning-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  text-align: center;
}

.scanning-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgb(171, 159, 242);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.scanning-text {
  color: #FFFFFF;
  font-size: 16px;
  line-height: 1.4;
}

/* Alert styles */
.alert-container {
  text-align: center;
  padding: 30px 0;
}

.alert-icon {
  font-size: 48px;
  margin-bottom: 20px;
}