* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #eef3fb 0%, #f8fafc 55%, #eef2ff 100%);
  color: #111827;
}

.page {
  width: 100%;
  min-height: 100vh;
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  width: 100%;
  max-width: 1000px;
  text-align: center;
  margin: 10px 0 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.12;
  color: #0f172a;
}

.hero p {
  margin: 0 auto;
  max-width: 720px;
  color: #64748b;
  font-size: 16px;
  line-height: 1.6;
}

.card {
  width: 100%;
  max-width: 1000px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label span {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  padding: 0 14px;
  font-size: 15px;
  color: #0f172a;
  background: #ffffff;
  transition: 0.16s ease;
}

input::placeholder {
  color: #94a3b8;
}

input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

input.error {
  border-color: #dc2626;
  background: #fff5f5;
}

button {
  width: 100%;
  height: 52px;
  margin-top: 24px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  transition: 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  white-space: pre-line;
  font-weight: 800;
  line-height: 1.5;
}

.result.ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.result.fail {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.hidden {
  display: none;
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.popup.hidden {
  display: none;
}

.popup-box {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 22px;
  padding: 28px 24px 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
  text-align: center;
}

.popup-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
}

.popup-icon.ok {
  background: #dcfce7;
  color: #16a34a;
}

.popup-icon.fail {
  background: #fee2e2;
  color: #dc2626;
}

.popup-box h2 {
  margin: 0 0 10px;
  color: #0f172a;
}

.popup-box p {
  margin: 0 0 18px;
  white-space: pre-line;
  color: #475569;
  line-height: 1.55;
}

.popup-box button {
  margin-top: 0;
  height: 46px;
}

@media (max-width: 760px) {
  .page {
    padding: 14px 10px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  input {
    height: 46px;
  }
}
