/* body {
  font-family: Arial, sans-serif;
   background: linear-gradient(135deg, #6acb 0%, #75fc 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
#description{
text-align: center;
  font-size: 20px;
  font-family: 'Georgia', serif;
  color: #444;
  margin-bottom: 15px;
  font-style: italic;
}

form {
  background-color: white;
  padding: 20px 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 100%;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
input:focus,
select:focus,
textarea:focus {
  border: 1px solid #2575fc;
  outline: none;
  box-shadow: 0 0 5px rgba(37, 117, 252, 0.3);
}

button {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  background: linear-gradient(90deg, #6acb, #75fc);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;


}

button:hover {
  transform: scale(1.05);
  background-color: #218838;
   
} */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink: #1a1a2e;
  --ink-light: #555570;
  --accent: #6acb;
  --accent-2: #818cf8;
  --bg: #f0f0f8;
  --white: #ffffff;
  --error: #dc2626;
  --error-bg: #fff1f1;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --border: #d1d5db;
  --radius: 10px;
  --shadow: 0 20px 60px rgba(79, 70, 229, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: 'DM Sans', Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 16px;
  position: relative;
  background: linear-gradient(135deg, #6acb 0%, #75fc 100%);

  /* radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(129,140,248,0.14) 0%, transparent 55%),
        linear-gradient(160deg, #eef0fb 0%, #f5f3ff 50%, #e8f0fe 100%);
      background-attachment: fixed;*/
}

.card-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}

form {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 40px 36px 32px;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 99px;
  margin-bottom: 14px;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 10px;
}

#description {
  font-size: 14px;
  color: var(--ink-light);
  line-height: 1.6;
  font-style: italic;
}

.field-group {
  margin-bottom: 20px;
}

.field-group>label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 7px;
}

.req {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.hint {
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-light);
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #fafafe;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #b0b3c6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.field-group.has-error input,
.field-group.has-error select,
.field-group.has-error textarea {
  border-color: var(--error) !important;
  background: var(--error-bg) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
  animation: shake 0.35s ease;
}

.field-group.is-valid input,
.field-group.is-valid select {
  border-color: var(--success);
  background: var(--success-bg);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.error-msg {
  display: none;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--error);
  background: var(--error-bg);
  border-left: 3px solid var(--error);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
  animation: fadeIn 0.2s ease;
}

.field-group.has-error .error-msg {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.radio-grid,
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.radio-chip,
.check-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  background: #fafafe;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
  user-select: none;
}

.radio-chip:hover,
.check-chip:hover {
  border-color: var(--accent-2);
  background: #f5f3ff;
  transform: translateY(-1px);
}

.radio-chip input,
.check-chip input {
  width: auto;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.radio-chip:has(input:checked),
.check-chip:has(input:checked) {
  border-color: var(--accent);
  background: #eef2ff;
  color: var(--accent);
  font-weight: 500;
}

.field-group.has-error .radio-grid {
  animation: shake 0.35s ease;
}

.char-counter {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-light);
  transition: color 0.2s;
}

.char-counter.warn {
  color: #d97706;
}

.char-counter.over {
  color: var(--error);
}

.char-bar {
  height: 3px;
  background: #e5e7eb;
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}

.char-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 99px;
  transition: width 0.15s ease, background 0.3s;
}

.char-fill.warn {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.char-fill.over {
  background: var(--error);
}

.success-msg {
  display: none;
  align-items: center;
  gap: 14px;
  background: var(--success-bg);
  border: 1.5px solid #86efac;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  animation: successPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-msg.visible {
  display: flex;
}

@keyframes successPop {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.success-msg strong {
  font-size: 14px;
  color: var(--success);
  display: block;
}

.success-msg p {
  font-size: 12.5px;
  color: #166534;
  margin-top: 2px;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

button {
  flex: 1;
  padding: 12px;
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn-submit {
  background: linear-gradient(135deg, var(--accent) 0%, #75fc 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-reset {
  background: #f3f4f6;
  color: var(--ink-light);
  border: 1.5px solid var(--border);
}

.btn-reset:hover {
  background: #e5e7eb;
  color: var(--ink);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  form {
    padding: 28px 20px 24px;
  }

  h1 {
    font-size: 22px;
  }

  .radio-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .btn-row {
    flex-direction: column-reverse;
  }
}