:root {
  --bg: #f4f7ff;
  --card: rgba(255, 255, 255, 0.9);
  --card-border: rgba(143, 160, 198, 0.2);
  --text: #1b2440;
  --muted: #5e6b8a;
  --primary: #4f46e5;
  --primary-soft: rgba(79, 70, 229, 0.12);
  --success: #1d9f5d;
  --success-soft: rgba(29, 159, 93, 0.1);
  --error: #b42318;
  --error-soft: rgba(180, 35, 24, 0.1);
  --shadow: 0 24px 60px rgba(28, 39, 88, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top, #eef4ff 0%, #f7f7fb 45%, #eef3ff 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.card {
  width: min(900px, 100%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 2vw, 2.2rem);
  backdrop-filter: blur(14px);
}

.header-block {
  margin-bottom: 1.5rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 2.5vw, 3rem);
  line-height: 1.1;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

.alert {
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.alert.success {
  background: var(--success-soft);
  border: 1px solid rgba(29, 159, 93, 0.18);
  color: var(--success);
}

.alert.error {
  background: var(--error-soft);
  border: 1px solid rgba(180, 35, 24, 0.2);
  color: var(--error);
}

form {
  display: grid;
  gap: 1.25rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
  flex: 1;
}

label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}

input {
  width: 100%;
  border: 1px solid rgba(110, 127, 170, 0.35);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.participants-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.participant-list {
  display: grid;
  gap: 1rem;
}

.participant-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 0.9rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid rgba(141, 155, 196, 0.25);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.75);
}

.ghost-button,
.primary-button,
.remove-button {
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.ghost-button {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-weight: 700;
}

.primary-button {
  justify-self: start;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5 0%, #6d5ef7 100%);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.2);
}

.remove-button {
  justify-self: end;
  background: rgba(213, 57, 57, 0.08);
  color: #a63838;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-weight: 600;
}

.ghost-button:hover,
.primary-button:hover,
.remove-button:hover {
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .card {
    padding: 1.1rem;
  }

  .participant-row {
    grid-template-columns: 1fr;
  }

  .remove-button {
    justify-self: stretch;
  }

  .primary-button {
    width: 100%;
  }
}
