/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  line-height: 1.6;
  padding: 1rem;
}

/* Container */
.container {
  max-width: 500px;
  margin: auto;
}

/* Balance Display */
.balance {
  font-size: 2.5rem;
  text-align: center;
  margin: 1rem 0;
}

/* Action Buttons */
.actions {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.btn {
  flex: 1;
  margin: 0 0.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
}

.addTrns-btn {
  background-color: #4caf50;
  color: white;
}

.btn:hover {
  opacity: 0.8;
}

/* Transaction History */
.history-box {
  height: 65vh;
  overflow-y: auto;
  padding: 10px;
}

.history-list {
  list-style-type: none;
  padding-left: 0;
}

li {
  background-color: #1e1e1e;
  margin-bottom: 0.5rem;
  padding: 0.75rem;
  border-radius: 4px;
  font-size: 15px;
  font-family: sans-serif;
}

.in {
  border-left: 5px solid #17a314;
}

.out {
  border-left: 5px solid #c53f1a;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #2c2c2c;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
}

.modal-content input {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: none;
  border-radius: 5px;
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.cancel-btn {
  background-color: #555;
  color: white;
}

.save-btn {
  background-color: #2196f3;
  color: white;
}

.modal-content select#modal-type {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: none;
  border-radius: 5px;
  background-color: #1e1e1e;
  color: #e0e0e0;
  font-size: 1rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23e0e0e0' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 10px 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.modal-content select#modal-type:focus {
  outline: none;
  background-color: #333333;
  color: #ffffff;
}

/* Responsive */
@media (max-width: 400px) {
  .actions {
    flex-direction: column;
  }

  .btn {
    margin: 0.5rem 0;
  }

  .modal-content {
    padding: 1.5rem;
  }
}
