:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --accent: #3d348b;
  --muted: #5c6f68;
  --danger: #db162f;
  --success: #3ec300;
  font-family: "Montserrat", sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body {
  margin: 0;
  padding: 16px;
  background: linear-gradient(
      rgba(255, 255, 255, 0.55),
      rgba(255, 255, 255, 0.55)
    ),
    url("../assets/bg-pixel.png") no-repeat center center fixed;
  background-size: cover;
}

.app {
  max-width: 700px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.card {
  background: var(--card);
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

input {
  padding: 10px;
  border: 1px solid #dce0e7;
  border-radius: 8px;
  font-size: 15px;
  flex: 1;
}

input:focus,
button:focus {
  outline: 3px solid #94b3ff;
  outline-offset: 2px;
}

button {
  padding: 12px 18px;
  background: var(--accent);
  border: none;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

ul.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list .item {
  padding: 14px;
  border: 1px solid #e4e6ec;
  border-radius: 10px;
  margin-bottom: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: 0.2s;
}

.item.comprado {
  background: #e7ffe7;
  opacity: 0.75;
}

.item.comprado .name {
  text-decoration: line-through;
  color: #2d7a2d;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inline-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.remove {
  background: var(--danger);
  padding: 8px 12px;
  border-radius: 6px;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.done {
  background: var(--success);
  padding: 8px 12px;
  border-radius: 6px;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.total {
  text-align: right;
  font-weight: 700;
  font-size: 18px;
  margin-top: 16px;
}

@media (max-width: 500px) {
  .inline-inputs {
    flex-direction: column;
    align-items: flex-start;
  }
}

#clear-all {
  margin-top: 15px;
  width: 100%;
  background: var(--danger);
}
