@import url(https://fonts.googleapis.com/css?family=Poppins:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic);
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  color: #333;
}

body {
  background: linear-gradient(135deg, #2e8b57, #a8d5ba);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 1200px;
  background-color: #fff;
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

h1 {
  text-align: center;
  color: #1a202c;
  margin-bottom: 35px;
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}

h2 {
  color: #2d3747;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.balance-container {
  text-align: center;
  margin-bottom: 35px;
  padding: 34px;
  background: linear-gradient(135deg, #a8d5ba, #6b8e23);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.balance-container h1 {
  font-size: 3rem;
  margin: 15px 0;
  margin-bottom: 20px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.income, .expenses {
  background-color: #fff;
  padding: 24px;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 200ms ease;
}

.income:hover, .expenses:hover {
  transform: translateY(-5px);
}

.income h3, .expenses h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.income h3 {
  color: #059669;
}

.expenses h3 {
  color: #dc2626;
}

.income p, .expenses p {
  margin-top: 8px;
  font-size: 1.75rem;
  font-weight: 600;
}

.income p {
  color: #059669;
}

.expenses p {
  color: #dc2626;
}

.main-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.transaction-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#transaction-list {
  list-style: none;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 8px;
}

#transaction-list::-webkit-scrollbar {
  width: 8px;
}

#transaction-list::-webkit-scrollbar-track{
  background-color: #f1f1f1;
  border-radius: 4px;
}

#transaction-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
}

#transaction-list::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

.transaction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  margin-bottom: 12px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border-right: 5px solid;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  form {
    opacity: 0;
    transform: translateX(-20px);
  } to {
    opacity: 1;
    transform: translateX(0);
  }
}

.transaction:hover {
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.transaction.income {
  border-right-color: #059669;
}

.transaction.expenses {
  border-right-color: #dc2626;
}

.transaction .delete-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 1.4rem;
  opacity: 0;
  transition: all 200ms ease;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 12px;
}

.transaction:hover .delete-btn {
  opacity: 1;
}

.transaction .delete-btn:hover {
  background-color: #fee2e2;
  transform: scale(1.1);
}

.form-container {
  background: linear-gradient(135deg, #f6f8fb, #f1f4f8);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.form-container form{
  height: 100%;
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #4a5568;
  font-weight: 500;
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
}

input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input:hover {
  background-color: #cbd5e0;
}

small {
  color: #718096;
  font-size: 0.875rem;
  margin-top: 4px;
  display: block;
}

button[type = "submit"] {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2e8b57 0%, #3cb371 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 200ms ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  margin-top: auto;
}

button[type = "submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(102, 126, 234, 0.3);
}

button[type = "submit"]:active {
  transform: translateY(0);
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  #transaction-list {
    max-height: 300px;
  }

  .summary {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
  }
}