* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  background: #f3f5fb;
  color: #20243a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.card {
  width: min(100%, 440px);
  padding: 40px;
  border: 1px solid #e6e8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 55px rgb(35 43 75 / 9%);
}

.key-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border-radius: 14px;
  background: #eef0ff;
  color: #5965ce;
  font-size: 32px;
  font-weight: 700;
  transform: rotate(-35deg);
}

.eyebrow {
  margin: 0 0 8px;
  color: #6670cc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.description {
  margin: 10px 0 28px;
  color: #71778d;
  font-size: 14px;
  line-height: 1.6;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 650;
}

input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid #dfe2ed;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: #252a40;
  font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  transition: border-color 160ms, box-shadow 160ms;
}

input::placeholder {
  color: #a5a9b8;
  opacity: 1;
}

input:focus {
  border-color: #6671d4;
  box-shadow: 0 0 0 3px rgb(102 113 212 / 14%);
}

.hint {
  margin: 9px 0 20px;
  color: #858a9d;
  font-size: 12px;
}

button {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 9px;
  background: #5965ce;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  transition: background 160ms, transform 160ms;
}

button:hover {
  background: #4854bd;
}

button:active {
  transform: translateY(1px);
}

.result {
  min-height: 20px;
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.result.success {
  color: #20815b;
}

.result.error {
  color: #c34251;
}

.window-overlay[hidden] {
  display: none;
}

.window-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(20 27 44 / 42%);
  backdrop-filter: blur(3px);
  animation: overlay-appear 180ms ease-out both;
}

@keyframes overlay-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes window-appear {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .window-overlay,
  .credentials-window {
    animation: none;
  }
}

.credentials-window {
  width: min(100%, 420px);
  animation: window-appear 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  overflow: hidden;
  border: 1px solid #d7dce7;
  border-radius: 10px;
  background: #f8f9fc;
  box-shadow: 0 24px 70px rgb(20 27 44 / 28%);
  color: #22283a;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.window-titlebar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 16px;
  background: #fff;
  font-size: 12px;
}

.window-close {
  width: 46px;
  min-height: 42px;
  border-radius: 0;
  background: transparent;
  color: #454b5a;
  font-size: 22px;
  font-weight: 400;
}

.window-close:hover {
  background: #e81123;
  color: #fff;
}

.window-content {
  padding: 28px 30px 20px;
}

.window-status-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #e3f4e9;
  color: #23834d;
  font-size: 22px;
  font-weight: 700;
}

.window-content h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.window-content p {
  margin: 0 0 20px;
  color: #666d7d;
  font-size: 13px;
  line-height: 1.5;
}

.window-content label {
  margin: 14px 0 7px;
  font-size: 12px;
}

.window-content input {
  height: 42px;
  background: #fff;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.credential-field {
  display: flex;
  gap: 8px;
}

.credential-field input {
  min-width: 0;
  flex: 1;
}

.credential-field .copy-button {
  width: 68px;
  min-height: 42px;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #e8edfa;
  color: #242b3d;
  font-size: 12px;
}

.credential-field .copy-button:hover {
  background: #dce5fa;
}

.window-footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid #e4e7ee;
  background: #f1f3f8;
}

.window-footer button {
  width: 92px;
  min-height: 36px;
  border: 1px solid #8798c5;
  border-radius: 5px;
  background: #e8edfa;
  color: #242b3d;
  font-size: 13px;
  font-weight: 500;
}

.window-footer button:hover {
  background: #dce5fa;
}

@media (max-width: 480px) {
  .card {
    padding: 30px 24px;
  }
}
