@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* === RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
   background: linear-gradient(135deg, #6e8efb, #a777e3);
   min-height: 100vh;
   display: flex;
   justify-content: center;
   align-items: center;
}

/* === CONTAINER === */
.container {
   width: 90%;
   max-width: 400px;
   background: rgba(255, 255, 255, 0.1);
   backdrop-filter: blur(12px);
   border-radius: 16px;
   padding: 25px;
   color: #fff;
   box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

/* === TITLES === */
.container h1 {
   font-size: 1.8rem;
   margin-bottom: 20px;
   letter-spacing: 1px;
}

/* === Balance Section === */
.balance h2 {
   font-size: 1.4rem;
   margin-bottom: 10px;
}
.balance span {
   font-weight: 600;
}
.summary {
   display: flex;
   justify-content: space-around;
   margin: 20px;
}
.summary div {
   background: rgba(255, 255, 255, 0.15);
   border-radius: 12px;
   padding: 10px;
   width: 45%;
   box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.1);
}

.income h3 {
   color: #7cffcb;
}
.expense h3 {
   color: #ff7b7b;
}

/* === Add Transaction === */
.add-transaction {
   display: flex;
   flex-direction: column;
   gap: 10px;
   margin-bottom: 25px;
}

.add-transaction input,
.add-transaction select {
   padding: 10px;
   border: none;
   border-radius: 10px;
   background: rgba(255, 255, 255, 0.15);
   color: black;
   outline: none;
}

.add-transaction input::placeholder {
   color: rgba(255, 255, 255, 0.8);
}

#add-btn {
   padding: 10px;
   background: linear-gradient(135deg, #7cffcb, #7466ce);
   border: none;
   border-radius: 10px;
   font-weight: 600;
   cursor: pointer;
   transition: transform 0.2s ease, background 0.3s ease;
}

#add-btn:hover {
   transform: scale(1.05);
   background: linear-gradient(135deg, #7466ce, #7cffcb);
}

/* ==== Transaction List ==== */
.transactions h2 {
   margin-bottom: 10px;
   text-align: left;
}

#transaction-list {
   list-style: none;
   max-height: 200px;
   overflow-y: auto;
   padding-right: 5px;
}

#transaction-list li {
   display: flex;
   justify-content: space-between;
   align-items: center;
   background-color: rgba(255, 255, 255, 0.15);
   border-radius: 10px;
   padding: 10px;
   margin-bottom: 8px;
   transition: transform 0.2s ease;
}

#transaction-list li:hover {
   transform: translateY(-2px);
}

li .income {
   border-left: 4px solid #7cffcb;
}

li .expense {
   border-left: 4px solid #ff7b7b;
}

li button {
   background: transparent;
   border: none;
   color: #fff;
   font-size: 1.2rem;
   cursor: pointer;
   transition: 0.2s;
}

li button:hover {
   color: #ff7b7b;
}

/*==== CHART ====*/
.chart-container {
   margin-top: 25px;
   background: rgba(255, 255, 255, 0.1);
   border-radius: 15px;
   padding: 15px;
   box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.1);
   animation: fadeIn 1.5s ease-in;
}
.chart-container h2 {
   margin-bottom: 10px;
   text-align: center;
}

/*==== Fade Animations ====*/
@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(10px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

/*==== Responsive ====*/
@media (max-width: 500px) {
   .container {
      width: 95%;
      padding: 20px;
   }
}