@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

:root {
  --bg: #ffffff; --fg: #000000;
  --item-bg: #f9f9f9; --item-text: #000000;
  --primary: #0066CC;
  --btn-size: 1.2rem; --btn-padding: 0.8rem 1.4rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --fg: #ffffff;
    --item-bg: #1e1e1e; --item-text: #ffffff;
  }
}
* { box-sizing: border-box; transition: all 0.2s ease; }
body {
  margin: 0; padding: 0;
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--fg);
}
header {
  padding: 1rem;
  background: var(--primary);
  color: #fff;
}
header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}
.actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.actions > button {
  font-size: var(--btn-size);
  padding: var(--btn-padding);
  border: none; border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  background: #fff; color: var(--primary);
  cursor: pointer;
}
main { padding: 1rem; }
.hidden { display: none; }
ul { list-style: none; margin: 0; padding: 0; }
li {
  background: var(--item-bg);
  margin-bottom: 0.6rem;
  padding: 0.8rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: flex; align-items: center; justify-content: space-between;
}
li .name { flex: 1; color: var(--item-text); }
li .meta { font-size: 0.75rem; opacity: 0.7; margin-left: 1rem; }
li button {
  background: transparent; border: none;
  font-size: 1.4rem; margin-left: 0.6rem;
  cursor: pointer;
}
button.edit { color: #4CAF50; }
button.delete { color: #F44336; }
button.confirm { color: var(--primary); }
.add-item {
  display: flex; gap: 0.5rem; margin-bottom: 1rem;
}
.add-item input {
  flex: 1; padding: 0.6rem; font-size: 1rem;
  border: 1px solid #ccc; border-radius: 8px;
  background: var(--item-bg); color: var(--item-text);
}
.actions-detail { margin-bottom: 1rem; }
#search-item {
  margin-bottom: 1rem;
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}
label {
  display: block;
  margin: 0.5rem 0 0.2rem;
}
select {
  width: 100%;
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

header h1 {
  text-align: center;
  text-transform: uppercase;
}

button.back {
  font-size: 1.1rem;
  padding: 0.6rem 1.2rem;
}

.action-buttons {
  display: flex;
  gap: 0.3rem;
}

.circle-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  color: white;
  border: none;
  cursor: pointer;
}

.circle-edit { background-color: #4CAF50; }
.circle-confirm { background-color: #2196F3; }
.circle-delete { background-color: #F44336; }

.search-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
#search-item, #new-item-name {
  flex: 1;
  font-size: 1rem;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: var(--item-bg);
  color: var(--item-text);
}

#clear-search, #add-item {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background-color: #ccc;
  color: #000;
  cursor: pointer;
  height: 100%;
  white-space: nowrap;
}
