*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #dddddd;
  background: #113344;
}

a {
  color: #0099ff;
  text-decoration: none;
}

a:hover {
  color: #77ccff;
}

.wallet-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}

.wallet-page__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #ffffff;
}

.wallet-page__brand img {
  width: 48px;
  height: auto;
}

.wallet-page__brand span {
  font-size: 18px;
  color: #5588ff;
}

.wallet-window {
  width: 100%;
  max-width: 720px;
  background: #2b2b2b;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.wallet-window__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(#555555, #222222);
  border-bottom: 1px solid #111111;
}

.wallet-window__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ffffff;
}

.wallet-window__title img {
  width: 18px;
  height: 18px;
}

.wallet-window__close {
  width: 28px;
  height: 24px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #cccccc;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.wallet-window__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.wallet-window__body {
  padding: 28px 32px 24px;
}

.wallet-view.hidden {
  display: none;
}

.wallet-panel {
  background: #3a3a3a;
  border: 1px solid #4a4a4a;
  border-radius: 10px;
  padding: 22px 24px 20px;
}

.wallet-panel__head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.wallet-panel__logo {
  flex: 0 0 72px;
  width: 72px;
}

.wallet-panel__logo img {
  width: 72px;
  height: auto;
  display: block;
}

.wallet-panel__intro {
  flex: 1;
  min-width: 0;
}

.wallet-panel__heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
}

.wallet-panel__text {
  margin: 0;
  color: #d0d0d0;
}

.wallet-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.wallet-actions--stack {
  flex-direction: column;
}

.wallet-action-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #555555;
  border-radius: 6px;
  background: #454545;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.wallet-action-btn:hover {
  background: #505050;
  border-color: #666666;
}

.wallet-action-btn--primary {
  background: #0099ff;
  border-color: #0099ff;
  color: #ffffff;
}

.wallet-action-btn--primary:hover {
  background: #33adff;
  border-color: #33adff;
}

.wallet-radio-group {
  margin-top: 4px;
  border: 1px solid #555555;
  border-radius: 8px;
  overflow: hidden;
  background: #333333;
}

.wallet-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #484848;
  cursor: pointer;
}

.wallet-radio:last-child {
  border-bottom: none;
}

.wallet-radio:hover {
  background: rgba(255, 255, 255, 0.04);
}

.wallet-radio input {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 2px solid #888888;
  border-radius: 50%;
  background: #2b2b2b;
  flex: 0 0 16px;
}

.wallet-radio input:checked {
  border-color: #0099ff;
  background: radial-gradient(circle at center, #0099ff 0 5px, #2b2b2b 6px);
}

.wallet-radio__label {
  color: #f0f0f0;
  font-size: 15px;
}

.wallet-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.wallet-footer-btn {
  min-width: 88px;
  min-height: 34px;
  padding: 6px 18px;
  border: 1px solid #555555;
  border-radius: 6px;
  background: #454545;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.wallet-footer-btn:hover:not(:disabled) {
  background: #505050;
}

.wallet-footer-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.wallet-footer-btn--next {
  border-color: #0099ff;
  background: #0099ff;
}

.wallet-footer-btn--next:hover:not(:disabled) {
  background: #33adff;
  border-color: #33adff;
}

.wallet-field {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid #555555;
  border-radius: 8px;
  background: #2b2b2b;
  color: #ffffff;
  font: inherit;
  resize: vertical;
}

.wallet-field:focus {
  outline: none;
  border-color: #0099ff;
  box-shadow: 0 0 0 2px rgba(0, 153, 255, 0.2);
}

.wallet-field::placeholder {
  color: #888888;
}

.wallet-field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #aaaaaa;
}

.wallet-field-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #ff7777;
}

.wallet-field-error.hidden {
  display: none;
}

.wallet-seed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.wallet-seed-grid--24 {
  grid-template-columns: 1fr 1fr 1fr;
}

.wallet-seed-word {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.wallet-seed-word__index {
  flex: 0 0 22px;
  font-size: 12px;
  color: #999999;
  text-align: right;
}

.wallet-seed-word__input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 10px;
  border: 1px solid #555555;
  border-radius: 6px;
  background: #2b2b2b;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
}

.wallet-seed-word__input:focus {
  outline: none;
  border-color: #0099ff;
}

.wallet-seed-word--error .wallet-seed-word__input {
  border-color: #ec5151;
}

.wallet-seed-word--error .wallet-seed-word__input:focus {
  border-color: #ec5151;
}

.wallet-seed-word.hidden {
  display: none;
}

.wallet-seed-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.wallet-link-btn {
  border: none;
  background: transparent;
  color: #0099ff;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.wallet-link-btn:hover {
  color: #77ccff;
}

.wallet-warning {
  margin: 16px 0 0;
  padding: 0;
  color: #cccccc;
  font-size: 13px;
}

.wallet-warning strong {
  color: #ffffff;
}

.wallet-warning ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

@media (max-width: 640px) {
  .wallet-window__body {
    padding: 20px 16px 18px;
  }

  .wallet-panel {
    padding: 16px;
  }

  .wallet-panel__head {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .wallet-seed-grid,
  .wallet-seed-grid--24 {
    grid-template-columns: 1fr;
  }
}
