* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #313338;
  color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px;
}

/* Title */
h1 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  text-align: center;
}

/* Passphrase section at top */
#passphrase-section {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

#passphrase-section input {
  flex: 1;
  background-color: #1e1f22;
  color: #ffffff;
  border: 1px solid #3f4147;
  border-radius: 6px;
  padding: 10px;
  font-size: 1rem;
}

#passphrase-section button {
  background-color: #5865f2;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 1rem;
  cursor: pointer;
}

#passphrase-section button:active {
  opacity: 0.85;
}

/* Grocery list area */
#list-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Scrollable grocery list */
#grocery-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

/* Header rows */
.header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  padding: 6px 8px;
  background-color: #3a3b41;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.header-row.selected {
  border: 2px solid #5865f2;
}

/* Item rows */
.item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 20px;
  margin-bottom: 4px;
}

/* Input fields for headers and items */
#grocery-list input[type="text"],
#new-item {
  flex: 1;
  background-color: #1e1f22;
  color: #ffffff;
  border: 1px solid #3f4147;
  border-radius: 6px;
  padding: 8px;
  font-size: 1rem;
}

/* Buttons (remove, add) */
#grocery-list button {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
}

#add-item-form button {
  background-color: #5865f2;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 1rem;
  cursor: pointer;
}

/* Add item form at bottom */
#add-item-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

#add-item-form input {
  flex: 1;
}

/* Collapse icon */
.collapse-icon {
  cursor: pointer;
  user-select: none;
}

/* Status text */
.status {
  font-size: 0.85rem;
  text-align: center;
  color: #b5bac1;
  margin-top: 4px;
}


