:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  color: #e0e0e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
}

.container {
  width: min(520px, 100%);
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid #C0C0C0;
  border-radius: 28px;
  padding: 32px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(192, 192, 192, 0.1);
  animation: fadeInUp 0.6s ease-out;
}

h2 {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 2vw, 2.25rem);
  letter-spacing: -0.02em;
  color: #e0e0e0;
  background: linear-gradient(135deg, #C0C0C0, #E5E5E5, #C0C0C0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

p.description {
  margin: 0 0 26px;
  line-height: 1.75;
  color: #b0b0b0;
}

.field {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #d4d4d4;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #C0C0C0;
  border-radius: 16px;
  background: rgba(26, 26, 46, 0.8);
  color: #e0e0e0;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-group {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(120px, 170px) 1fr;
  grid-template-areas: "code phone";
  align-items: center;
  width: 100%;
}

#country-code {
  grid-area: code;
  width: 100%;
  min-width: 0;
}

#contact {
  grid-area: phone;
  width: 100%;
  min-width: 0;
}

select,
input {
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select {
  padding: 14px 16px;
  border: 2px solid #C0C0C0;
  border-radius: 16px;
  background: rgba(26, 26, 46, 0.8);
  color: #e0e0e0;
  font-size: 0.96rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  min-width: 120px;
}

.note {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: #b8b8b8;
  line-height: 1.7;
}

.info-link {
  color: #e0e0e0;
  text-decoration: underline;
}

.popup-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  padding: 20px;
}

.popup-overlay.show {
  display: flex;
}

.popup-card {
  width: min(420px, 100%);
  background: rgba(18, 18, 38, 0.98);
  border: 1px solid rgba(192, 192, 192, 0.15);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.popup-card h3 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  color: #f8f8f8;
}

.popup-card p {
  margin: 0 0 22px;
  color: #d0d0d0;
  line-height: 1.7;
}

.popup-card button {
  width: auto;
  min-width: 140px;
  padding: 12px 20px;
}

select:focus {
  outline: none;
  border-color: #E5E5E5;
  background: rgba(26, 26, 46, 0.9);
  box-shadow: 0 0 0 4px rgba(192, 192, 192, 0.2);
}

button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #C0C0C0, #E5E5E5, #C0C0C0);
  color: #1a1a2e;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 12px 22px rgba(192, 192, 192, 0.3);
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
  box-shadow: 0 16px 30px rgba(192, 192, 192, 0.3);
}

button:active {
  transform: translateY(0);
}

@media (max-width: 520px) {
  .container {
    padding: 24px 18px;
  }

  .contact-group {
    grid-template-columns: 1fr;
    grid-template-areas:
      "code"
      "phone";
  }

  #country-code,
  #contact {
    max-width: 100%;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
