.accountModal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}

.accountModal.hidden {
  display: none;
}

.accountModal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.6);
  backdrop-filter: blur(10px);
}

.accountModal .modal-card {
  position: relative;
  width: min(420px, 92vw);
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(91, 226, 255, 0.25);
  background: rgba(10, 14, 22, 0.85);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 24px rgba(91, 226, 255, 0.2);
  display: grid;
  gap: 14px;
  color: #eaf6ff;
  animation: modalPop 0.25s ease;
}

.accountModal .modal-message {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(120, 170, 255, 0.12);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e9f6ff;
}

.accountModal .modal-message.hidden {
  display: none;
}

.accountModal.is-loading .modal-message {
  border-color: rgba(91, 226, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(91, 226, 255, 0.25) inset;
  animation: accountMessagePulse 1s ease-in-out infinite;
}

.accountModal .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.accountModal .modal-close:disabled,
.accountModal .tab.is-disabled,
.accountModal button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.accountModal.is-loading .modal-card {
  cursor: progress;
}

.accountModal .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.accountModal .tabs.hidden {
  display: none;
}

.accountModal .tab {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
  color: #fff;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
}

.accountModal .tab.active {
  border-color: rgba(91, 226, 255, 0.6);
  background: rgba(91, 226, 255, 0.15);
  box-shadow: 0 0 18px rgba(91, 226, 255, 0.2);
}

.accountModal .tab-panel {
  display: grid;
  gap: 10px;
}

.accountModal .tab-panel.hidden {
  display: none;
}

.accountModal input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.accountModal .error {
  min-height: 16px;
  font-size: 12px;
  color: #ff9b9b;
  letter-spacing: 0.06em;
}

.accountModal .logged-panel {
  display: grid;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.accountModal .logged-as {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.historyList {
  display: grid;
  gap: 8px;
}

.historyRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.historyRow__meta {
  display: grid;
  gap: 4px;
}

.historyRow__title {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.historyRow__sub {
  opacity: 0.7;
}

.historyRow__stat {
  text-align: right;
  font-weight: 700;
}

.modeHintLink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9fe7ff;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

@keyframes modalPop {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes accountMessagePulse {
  0% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.7;
  }
}
