* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f4f5f7;
  color: #333;
}

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* Categories */
#categories {
  margin-bottom: 1.5rem;
  text-align: center;
}

.cat-btn {
  background: #0069d9;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  margin: 0.3rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.cat-btn:hover { background: #0056b3; }

/* Cards */
#things-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
}

.thing {
  background: white;
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thing:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.thing h4 {
  margin: 0 0 0.5rem;
  font-size: 18px;
}

.thing p {
  margin: 0 0 .5rem;
  font-size: 0.9rem;
  color: #555;
}

.thing small {
  color: #777;
}

/* Buttons */
.edit-btn,
.delete-btn {
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  margin-top: 0.5rem;
  cursor: pointer;
}

.edit-btn {
  background: #ffc107;
}
.delete-btn {
  background: #dc3545;
  color: white;
}

/* Side navigation */
.sidenav {
  width: 200px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #111;
}

.sidenav a {
  color: white;
  padding: 16px;
  display: block;
  text-decoration: none;
}

.sidenav a:hover {
  background-color: #ddd;
  color: black;
}

/* Mobile */
@media (max-width: 768px) {
  .sidenav {
    position: relative;
    width: 100%;
  }
}

@media (max-width: 600px) {
  body {
    padding: 0.8rem;
  }

  #things-list {
    grid-template-columns: 1fr;
  }
}