/* Base Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #fdfdfd;
  color: #222;
}

.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* Headings */
h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.4rem;
}

/* Summary Cards */
.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  flex: 1 1 200px;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  background-color: #f9f9f9;
}

.earned { border-left: 6px solid #2ecc71; }
.spent { border-left: 6px solid #e74c3c; }
.available { border-left: 6px solid #f1c40f; }

/* Input Form */
.form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.form input {
  padding: 12px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 400px;
}

/* Button Group */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.btn {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: white;
  min-width: 120px;
}

.income {
  background-color: #27ae60;
}

.expense {
  background-color: #c0392b;
}

/* Lists */
.list-section {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.list-section ul {
  list-style-type: none;
  padding: 0;
  width: 100%;
  max-width: 400px;
}

.list-section li {
  background: #f2f2f2;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Delete Button */
.delete-btn {
  background: transparent;
  color: #e74c3c;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

/* 🔁 Media Queries */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .summary {
    flex-direction: column;
    gap: 15px;
  }

  .form input {
    width: 100%;
  }

  .buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .list-section {
    flex-direction: column;
    align-items: center;
  }

  .list-section ul {
    width: 100%;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .container {
    padding: 15px;
  }

  .card {
    padding: 15px;
  }

  .btn {
    padding: 12px;
    font-size: 1rem;
  }
}
