* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f6f8;
  color: #222;
  padding-bottom: 70px;
}
header {
  width: 100%;
  text-align: center;
  background: #2c3e50;
  color: white;
  padding: 25px 15px;
}
header h1 {
  font-size: 32px;
  margin-bottom: 5px;
}
header p {
  font-size: 15px;
  opacity: 0.9;
}
main {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}
.summary-sec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 30px 0;
}
.card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}
.card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}
.card p {
  font-size: 24px;
  font-weight: bold;
}
.balance-card p {
  color: #2c3e50;
}
.income-card p {
  color: green;
}
.expense-card p {
  color: crimson;
}
.input-sec {
  background: white;
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}
.input-sec h2 {
  margin-bottom: 20px;
}
.input-sec input {
  width: 100%;
  max-width: 450px;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}
.input-sec input:focus {
  border-color: #2c3e50;
}
.btns {
  margin-top: 15px;
}
.input-sec button {
  padding: 10px 22px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin: 5px;
  color: white;
  font-weight: bold;
  transition: 0.3s;
}
.inc-btn {
  background: green;
}
.exp-btn {
  background: crimson;
}
.input-sec button:hover {
  opacity: 0.8;
}
.warning {
  margin-top: 12px;
  color: crimson;
  font-weight: bold;
}
.output-sec {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 30px 0;
}
.details {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}
.details h2 {
  font-size: 20px;
  margin-bottom: 15px;
  text-align: center;
}
.list {
  list-style: none;
}
.list-items {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f4f6f8;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  gap: 10px;
}
.list-items span {
  font-weight: bold;
}
.delete-btn {
  background: #222;
  color: white;
  border: none;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.delete-btn:hover {
  background: red;
}
footer {
  width: 100%;
  text-align: center;
  padding: 12px 0;
  background: #2c3e50;
  color: white;
  position: fixed;
  bottom: 0;
  left: 0;
}

@media (max-width: 768px) {
  .summary-sec,
  .output-sec {
    grid-template-columns: 1fr;
  }
  header h1 {
    font-size: 26px;
  }
  .card p {
    font-size: 20px;
  }
}