:root {
  --accent: #fff0fa;
  --accent-dark: #ebcee6;
  --border: #e7e7e7;
  --gray-bg: #f5f6fa;
  --radius: 13px;
  --transition: 0.18s cubic-bezier(0.54, 0.12, 0.47, 0.82);
  font-family: Inter, system-ui, 'Segoe UI', Arial, sans-serif;
}
body {
  background: #fafbfc;
  color: #1a1919;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}
.center-wrap {
  max-width: 650px;
  margin: 48px auto;
  padding: 0 20px 40px 20px;
}

/* Header */
header {
  margin-bottom: 30px;
  text-align: center;
}
header h1 {
  font-weight: 800;
  font-size: 2.1rem;
  margin-bottom: 12px;
}
.accent-btn,
.accent-btn-light {
  display: inline-block;
  border-radius: var(--radius);
  border: none;
  font: inherit;
  padding: 10px 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
    box-shadow var(--transition);
}
.accent-btn {
  background: var(--accent);
  color: #862d70;
  border: 1.5px solid var(--accent);
}
.accent-btn:hover,
.accent-btn:focus {
  background: var(--accent-dark);
}
.accent-btn-light {
  background: transparent;
  color: #9a4e8b;
  border: 1.5px solid var(--accent);
}
.accent-btn-light:hover,
.accent-btn-light:focus {
  background: var(--accent);
  color: #862d70;
}

/* Accordion */
.accordion {
  margin-bottom: 32px;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: 0 3px 20px #f3d4ec3d;
  overflow: hidden;
}
.accordion-toggle {
  width: 100%;
  padding: 17px 21px;
  font-size: 1.12rem;
  text-align: left;
  border: none;
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chevron {
  margin-left: auto;
  font-size: 1.3em;
  transition: transform 0.22s;
}
.accordion.open .chevron {
  transform: rotate(180deg);
}
.templates {
  display: none;
  padding: 0 21px 21px 21px;
}
.accordion.open .templates {
  display: block;
}
.templates > div {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.templates > div:last-child {
  border-bottom: none;
}
.template-name {
  flex: 1;
  color: #643367;
  font-weight: 500;
}
.template-actions button {
  margin-left: 8px;
}

#lists-board {
  margin-top: 30px;
}
.list-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: 0 2.5px 20px #e7e8f26e;
}
.list-card h2 {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: #935686;
  font-weight: 600;
}
.list-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.list-card li {
  margin-bottom: 10px;
}
.checkbox-label {
  display: flex;
  align-items: center;
}
.checkbox-label input[type='checkbox'] {
  margin-right: 10px;
  height: 21px;
  width: 21px;
  accent-color: var(--accent);
  border-radius: 6px;
}
.checkbox-label input[type='checkbox']:checked + span {
  text-decoration: line-through;
  color: #b49dbf;
  opacity: 0.75;
}
.delete-btn,
.template-actions .delete-template {
  background: none;
  border: 1.5px solid #e264ab;
  color: #c21773;
  border-radius: 13px;
  padding: 6px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.97em;
  transition: background 0.11s, color 0.13s;
}
.delete-btn:hover,
.template-actions .delete-template:hover {
  background: #e264ab;
  color: #fff;
}

/* Modal styl */
#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(210, 160, 200, 0.16);
  z-index: 99;
  display: none;
}
#modal-overlay.active {
  display: block;
}
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px 28px;
  box-shadow: 0 8px 32px rgba(232, 146, 172, 0.14);
  border: 1.5px solid var(--accent);
}
.modal.active {
  display: block;
}
.modal h2 {
  margin-bottom: 16px;
  color: #815882;
}
.modal label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #505;
}
.modal input[type='text'],
.modal textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  margin-bottom: 14px;
  background: #faf8fa;
}
.modal input:focus,
.modal textarea:focus {
  border: 1.5px solid #b9a3bc;
  outline: none;
}
.modal-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-label {
  font-size: 1em;
  color: #88406f;
  font-weight: 500;
}
@media (max-width: 650px) {
  .center-wrap,
  header,
  #lists-board {
    padding: 0 3vw;
  }
  .modal {
    padding: 16px 10px 8px 10px;
  }
}

.recipe-search {
  max-width: 400px;
  margin: 20px auto;
  font-family: Inter, system-ui, 'Segoe UI', Arial, sans-serif;
}

#recipe-search-input {
  width: 100%;
  font-size: 1rem;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

#recipe-search-input:focus {
  border-color: #935686;
  outline: none;
  box-shadow: 0 0 5px rgba(147, 86, 134, 0.5);
}

#recipe-search-results {
  margin-top: 8px;
  background: white;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  border-radius: var(--radius);
  max-height: 250px;
  overflow-y: auto;
  font-size: 0.95rem;
  color: #4b3b56;
}

#recipe-search-results .search-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: default;
  user-select: none;
}

#recipe-search-results .search-row:last-child {
  border-bottom: none;
}

#recipe-search-results .search-row span {
  flex-grow: 1;
  overflow-wrap: anywhere;
}

#recipe-search-results .search-row button.select-recipe {
  background-color: #935686;
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 5px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-left: 12px;
}

#recipe-search-results .search-row button.select-recipe:hover {
  background-color: #6f3f67;
}

#recipe-search-results div {
  padding: 10px 12px;
  font-style: italic;
  color: #888;
  user-select: none;
}

#recipe-search-results .search-row:hover {
  background-color: #f8e9f5;
}

@media (max-width: 480px) {
  .recipe-search {
    max-width: 100%;
    padding: 0 10px;
  }
}

/* Sekce archivu zarovnaná na střed stejně jako ostatní obsah */
#archived-section {
  max-width: 650px; /* stejné jako .center-wrap */
  margin: 40px auto 0 auto; /* nahoře mezera, vodorovně na střed */
  padding: 0 20px 40px 20px; /* stejné vnitřní odsazení jako .center-wrap */
  opacity: 0.95; /* trochu výraznější než předtím */
}

/* Nadpis sekce archivu */
#archived-section h2 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #888;
  text-align: center; /* zarovnání textu na střed */
  font-weight: 600;
}

/* Samotné archivované seznamy vypadají jako .list-card */
#archived-lists .list-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: 0 2.5px 20px #e7e8f26e;
}

#archived-lists .list-card h3 {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  color: #935686;
  font-weight: 600;
}

#archived-lists .list-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#archived-lists .list-card li {
  margin-bottom: 8px;
  color: #555;
}
