/* This file is AI-generated */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --border: #e8e2d9;
  --text: #1a1714;
  --text-muted: #6b6560;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --accent-soft: #fdf0ee;
  --secondary: #f0ece6;
  --secondary-hover: #e8e2d9;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
  --transition: 0.15s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
  line-height: 1.5;
}

/* ── Layout ── */

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
}

header h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0.5rem auto 0;
  opacity: 0.35;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Products section ── */

section > p {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

section:first-of-type {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Participants section ── */

.participants {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.participants > p {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.participant {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--secondary);
  border-radius: calc(var(--radius) - 2px);
  flex-wrap: wrap;
  flex-direction: row;
}

.participant label {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Inputs ── */

input[type="text"],
input:not([type]) {
  flex: 1;
  min-width: 120px;
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input[type="text"]:focus,
input:not([type]):focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

/* ── Buttons ── */

button {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

button:active {
  transform: scale(0.97);
}

/* Generate / primary */
.btn-generate {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px rgba(192,57,43,0.3);
}

.btn-generate:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 6px rgba(192,57,43,0.35);
}

/* Remove / danger */
.btn-remove {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.btn-remove:hover {
  background: #fdf0ee;
  border-color: var(--accent);
  color: var(--accent);
}

/* Add participant */
.btn-add-participant {
  display: block;
  max-width: 640px;
  margin: 0.5rem auto 0;
  width: 100%;
  background: var(--secondary);
  color: var(--text-muted);
  border: 1.5px dashed var(--border);
  padding: 0.6rem;
  border-radius: var(--radius);
}

.btn-add-participant:hover {
  background: var(--secondary-hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* Download */
.btn-download {
  display: block;
  max-width: 640px;
  margin: 1.5rem auto 0;
  width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(192,57,43,0.25);
}

.btn-download:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

/* ── Locked participant name ── */

.participant-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* ── Generated content (product order + guess fieldsets) ── */

.participant > p[data-order] {
  flex-basis: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  color: transparent;
  background: var(--accent-soft);
  border: 1px solid rgba(192,57,43,0.15);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  letter-spacing: 0.02em;
  cursor: default;
  user-select: none;
  transition: color var(--transition);
  position: relative;
  overflow: hidden;
}

.participant > p[data-order]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  border-radius: 0 0 6px 6px;
  transition: none;
}

.participant > p[data-order]:hover::after {
  width: 100%;
  transition: width 0.6s linear;
}

.participant > p[data-order]:hover {
  color: var(--text);
  transition-delay: 0.6s;
}

fieldset {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: var(--surface);
  width: 100%;
}

legend {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 0.35rem;
}

fieldset label {
  font-size: 0.9rem;
  margin-right: 0.25rem;
  margin-left: 0.75rem;
  cursor: pointer;
}

fieldset label:first-of-type {
  margin-left: 0;
}

input[type="radio"] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  vertical-align: middle;
}
