* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Montserrat", sans-serif;
  background: linear-gradient(135deg, #ffaf7b, #ffc3a0);
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.container {
  width: 100%;
  max-width: 1200px;
  background: #fff;
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}
h1 {
  text-align: center;
  margin-bottom: 30px;
}
.balance-container {
  text-align: center;
  margin-bottom: 35px;
  padding: 24px;
  background: linear-gradient(135deg, #ff9a76, #ffc3a0);
  border-radius: 1rem;
}
.balance-container h1 {
  font-size: 3rem;
  margin: 15px 0;
  transition: color 0.3s;
}
.summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.income h3 {
  color: #ff7f50;
}
.income p {
  color: #ff7f50;
  font-weight: 600;
  font-size: 1.75rem;
}
.expenses h3 {
  color: #ff69b4;
}
.expenses p {
  color: #ff69b4;
  font-weight: 600;
  font-size: 1.75rem;
}
.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.transaction-container {
  display: flex;
  flex-direction: column;
}
#transaction-list {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}
.transaction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #ffeaea;
  border-left: 5px solid;
  transition: all 0.2s ease;
}
.transaction.income {
  border-left-color: #ff7f50;
}
.transaction.expense {
  border-left-color: #ff69b4;
}
.transaction .delete-btn {
  background: none;
  border: none;
  color: #ff69b4;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0;
  margin-left: 8px;
  transition: all 0.2s ease;
}
.transaction:hover .delete-btn {
  opacity: 1;
}
.form-container {
  background: #fff0f5;
  padding: 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
}
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  margin-bottom: 8px;
  color: #4a5568;
  font-weight: 500;
}
input,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #fff;
}
input:focus,
select:focus {
  outline: none;
  border-color: #ff7f50;
  box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.2);
}
button[type="submit"],
#export-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff7f50, #ff69b4);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  margin-top: 10px;
}
button[type="submit"]:hover,
#export-btn:hover {
  transform: translateY(-2px);
}
#mode-toggle {
  width: 150px;
  padding: 8px 12px;
  margin: 0 auto 20px auto;
  display: block;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #ff7f50, #ff69b4);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#mode-toggle:hover {
  transform: translateY(-2px);
}
.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.filters input,
.filters select {
  width: 50%;
  padding: 10px;
  font-size: 0.95rem;
}
@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  .filters input,
  .filters select {
    width: 100%;
    margin-bottom: 10px;
  }
}
body.dark-mode {
  background: #2c2c2c;
  color: #000000;
}
body.dark-mode .container {
  background: #3a3a3a;
  color: #000;
}
body.dark-mode .balance-container {
  background: #444;
  color: #000;
}
body.dark-mode .form-container {
  background: #555;
  color: #000;
}
body.dark-mode input,
body.dark-mode select {
  background: #666;
  color: #000;
  border-color: #888;
}
body.dark-mode #transaction-list li span {
  color: #000;
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode small,
body.dark-mode label {
  color: #000;
}
