* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  text-align: center;
}

.header h1 {
  font-size: 2em;
  margin-bottom: 10px;
}

.header p {
  opacity: 0.9;
  font-size: 0.95em;
}

.filters-section {
  padding: 30px 30px 0 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-size: 0.85em;
  color: #6c757d;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.search-input,
.category-select {
  padding: 12px 15px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  font-size: 1em;
  transition: all 0.3s ease;
}

.search-input:focus,
.category-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input {
  background: white
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236c757d" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>')
    no-repeat right 15px center;
  padding-right: 45px;
}

.list-container {
  padding: 30px;
}

@media (max-width: 768px) {
  .filters-section {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.category-header {
  font-size: 1.3em;
  font-weight: bold;
  color: #667eea;
  margin: 30px 0 15px 0;
  padding-bottom: 10px;
  border-bottom: 3px solid #667eea;
}

.category-header:first-child {
  margin-top: 0;
}

.item {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px;
  gap: 15px;
  align-items: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item:hover {
  background: #e9ecef;
  transform: translateX(5px);
}

.item-field {
  display: flex;
  flex-direction: column;
}

.item-field label {
  font-size: 0.75em;
  color: #6c757d;
  margin-bottom: 5px;
  font-weight: 600;
  text-transform: uppercase;
}

.item-field input {
  padding: 10px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1em;
  transition: all 0.3s ease;
}

.item-field input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.item-total {
  font-weight: bold;
  color: #28a745;
  font-size: 1.1em;
  text-align: center;
}

.remove-btn {
  background: #dc3545;
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2em;
  transition: all 0.3s ease;
  display: none;
}

.add-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px auto;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.total-section {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 30px;
  text-align: center;
  border-radius: 15px;
  margin-top: 30px;
}

.total-section h2 {
  font-size: 1.3em;
  margin-bottom: 10px;
  opacity: 0.9;
}

.total-amount {
  font-size: 3em;
  font-weight: bold;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6c757d;
}

.empty-state svg {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .item-total {
    text-align: left;
  }

  .remove-btn {
    justify-self: start;
  }

  .total-amount {
    font-size: 2em;
  }
}
