@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap");

:root {
  --main-color: #486ba6;             /* primary blue */
  --secondary-color: #2c2c54;        /* darker gray/blue for text */
  --ternary-color: #4b6cb7;          /* slightly lighter blue */
  --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  --background-color: #f0f2f5;
  --background-secondary-color: #ffffff;
  --border-color: #9e9ea7;
  --border-secondary-color: #d0d2db;
  --plus-color: #28a745;             /* green */
  --minus-color: #dc3545;            /* red */
  --hover-lighten: rgba(0,0,0,0.05);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--background-color);
  color: var(--secondary-color);
  font-family: "Noto Sans", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.header img {
  width: 4.5rem;
  width: 4.5rem;
  opacity: 0.5;
}

.balance-container {
  display: flex;
  flex-direction: column;
}

.container {
  margin: 30px auto;
  width: 350px;
}

h1 {
  font-size: 1.25rem;
}

h2 {
  font-size: 1.17rem;
}

.balance {
  letter-spacing: 1px;
  margin: 0;
  font-size: 2rem;
}

h3 {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin: 40px 0 10px;
}

h2,
h4 {
  margin: 0;
  text-transform: uppercase;
}

.inc-exp-container {
  background-color: var(--background-secondary-color);
  box-shadow: var(--box-shadow);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  border-radius: 5px;
}

.inc-exp-container > div {
  flex: 1;
  text-align: center;
}

.inc-exp-container > div:first-of-type {
  border-right: 1px solid var(--border-secondary-color);
}

.money {
  font-size: 20px;
  letter-spacing: 1px;
  margin: 5px 0;
}

.money.plus {
  color: var(--plus-color);
}

.money.minus {
  color: var(--minus-color);
}

label {
  display: inline-block;
  margin: 10px 0;
}

input[type="text"],
input[type="number"] {
  border: 1px solid var(--border-secondary-color);
  border-radius: 5px;
  display: block;
  font-size: 16px;
  padding: 10px;
  width: 100%;
}

.btn {
  cursor: pointer;
  background-color: var(--main-color);
  color: var(--background-secondary-color);
  font-weight: 600;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 6px;
  border: none;
  box-shadow: var(--box-shadow);
  transition: all 0.2s ease-in-out;
  text-align: center;
  width: 100%;
}

.btn:hover {
  background-color: #3b5d91;  /* slightly darker */
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.list {
  list-style-type: none;
  padding: 0;
  margin-bottom: 40px;
}

.list li {
  background-color: var(--background-secondary-color);
  box-shadow: var(--box-shadow);
  color: var(--ternary-color);
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 10px;
  margin: 10px 0;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.list li.plus {
  border-left: 5px solid var(--plus-color);
}

.list li.minus {
  border-left: 5px solid var(--minus-color);
}

.delete-btn {
  cursor: pointer;
  background-color: var(--minus-color);
  color: var(--background-secondary-color);
  box-shadow: var(--box-shadow);
  border: 0;
  font-size: 22px;
  line-height: 22px;
  padding: 10px;
  margin: 10px 0;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(100%, -73%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:focus,
.delete-btn:focus {
  outline: 0;
}

.list li:hover .delete-btn {
  opacity: 1;
}

.notification-container {
  background-color: var(--minus-color);
  color: var(--background-secondary-color);
  border-radius: 5px 5px 0 0;
  padding: 15px 20px;
  position: fixed;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notification-container.show {
  opacity: 1;
}

.notification-container p {
  margin: 0;
}

/* Income / Expense Buttons */
.btn-income {
  background-color: var(--plus-color);
}

.btn-expense {
  background-color: var(--minus-color);
}

/* Optional: hover effect */
.btn-income:hover {
  background-color: #218838;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.btn-expense:hover {
  background-color: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Optional: make buttons sit side by side nicely */
#income-btn, #expense-btn {
    flex: 1;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* Optional: indicate selection (JS will toggle this) */
#income-btn.selected {
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.8);
}

#expense-btn.selected {
    box-shadow: 0 0 5px rgba(192, 57, 43, 0.8);
}


.btn-breakdown {
  display: block;
  margin: 20px auto;
  background-color: #4b6cb7;  /* slightly softer blue */
  color: white;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  width: fit-content;
}

.btn-breakdown:hover {
  background-color: #395592;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
