* {
  box-sizing: border-box;
}

:root {
  --bg-1: #0d1f37;
  --bg-2: #16345c;
  --surface: rgba(255, 255, 255, 0.18);
  --surface-line: rgba(255, 255, 255, 0.35);
  --text: #f0f6ff;
  --muted: #c0d3ef;
  --primary-1: #ff8b08;
  --primary-2: #00b0ff;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #2a5e98 0%, var(--bg-2) 40%, var(--bg-1) 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.35;
  z-index: 0;
}

.orb-1 {
  width: 260px;
  height: 260px;
  top: -80px;
  left: -70px;
  background: #f72585;
}

.orb-2 {
  width: 220px;
  height: 220px;
  right: -50px;
  bottom: -80px;
  background: #4cc9f0;
}

.header {
  text-align: center;
  padding: 28px 16px 14px;
  position: relative;
  z-index: 1;
}

.header h1 {
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.header p {
  margin-top: 8px;
  color: var(--muted);
}

.layout {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto 24px;
  padding: 0 16px;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
}

h2,
h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.hint {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: #13243f;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

button {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(120deg, var(--primary-1), var(--primary-2));
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, filter 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button.secondary {
  background: rgba(255, 255, 255, 0.24);
  color: #eff5ff;
}

.result {
  margin-bottom: 0;
  font-weight: 700;
}

.history {
  margin: 0 0 10px;
  padding-left: 20px;
}

.history li {
  margin-bottom: 6px;
  color: #e2efff;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 220px;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(6, 12, 22, 0.56);
  padding: 16px;
}

.modal-card {
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.92);
  color: #13243f;
  border: 1px solid #cad9f3;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.modal-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

@media (max-width: 640px) {
  .split {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
