:root {
  --background: #1f2937;
  --primary: #374151;
  --secondary: #4338ca;
  --accent: lightskyblue;
  --text: white;
  --sm-text: #d8dde4;
  --sm-sz: 14px;
  --radius: 10px;
  --gap: 20px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  height: 100vh;
  background-color: var(--background);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
}

.shop-body {
  min-width: 500px;
  padding: var(--gap);
  background-color: var(--primary);
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  gap: calc(var(--gap));
  border-radius: var(--radius);
}

.shop-form {
  display: flex;
  flex-flow: column wrap;
  gap: calc(var(--gap) / 4);
  width: 100%;
  padding-bottom: var(--gap);
  border-bottom: 1px solid var(--sm-text);
}

.shop-form label {
  font-weight: bold;
  font-size: 1.1rem;
}

.shop-form input {
  margin-bottom: calc(var(--gap) / 4);
  padding: calc(var(--gap) / 2);
  border-radius: calc(var(--radius) / 2);
  border: 2px solid gray;
  font-size: 1.2rem;
}
.shop-form input:focus {
  box-shadow: 0px 0px 10px rgba(256, 256, 256, 0.6);
}

.shop-form button {
  padding: calc(var(--gap) / 2);
  border: none;
  border-radius: calc(var(--radius) / 2);
  background-color: var(--secondary);
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
}
.shop-form button:hover {
  cursor: pointer;
  opacity: 0.9;
}
.shop-form button:active {
  opacity: 0.8;
  transform: translateY(2px);
}

.cart {
  width: 100%;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--sm-text);
}

.cart p {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: bold;
}

.items {
  max-height: 153px;
  list-style-type: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.item {
  width: calc(100% - 4px);
  padding: calc(var(--gap) / 2);
  background-color: var(--accent);
  margin-bottom: 10px;
  border-radius: calc(var(--radius) / 2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(256, 256, 256, 0.2);
  transition: transform 0.3s ease;
}
.item:hover {
  transform: translateX(2px);
}
.item span {
  font-size: 1.1rem;
  font-weight: bold;
  color: black;
}
.item span:last-child {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--gap);
}
.item span:last-child svg {
  fill: red;
  transition: transform 0.3s ease;
}
.item span:last-child svg:hover {
  cursor: pointer;
  transform: scale(1.15);
  opacity: 0.85;
}

.budget-control {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: 0 var(--gap);
}

.budget-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.b-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 5px;
}
.b-card .label {
  font-size: var(--sm-sz);
  color: var(--sm-text);
}
.b-card .quantity {
  font-size: 1.3rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}
.b-card .quantity:last-child {
  background-color: transparent;
}
.edit-budget {
  margin-left: 10px;
  border-radius: 10px;
  padding: 6px;
  border: none;
  fill: var(--sm-text);
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
}
.edit-budget:hover {
  background-color: var(--background);
  cursor: pointer;
}

.safe {
  color: #22c55e;
  background-color: #22c55e;
}
.carful {
  color: #f59e0b;
  background-color: #f59e0b;
}
.danger {
  color: #ef4444;
  background-color: #ef4444;
}

.budget-percentage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}
.budget-percentage .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: var(--sm-text);
  font-size: var(--sm-sz);
}
.budget-percentage .outer {
  width: 100%;
  height: 5px;
  border-radius: 50px;
  overflow: hidden;
  position: relative;
}
.budget-percentage .outer .inner2 {
  opacity: 0.3;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.budget-percentage .outer .inner1 {
  width: 0%;
  height: 100%;
}
.budget-percentage .info {
  background-color: transparent;
  font-size: calc(var(--sm-sz) - 1px);
}
