/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #0f0f13;
  --card-bg: rgba(30, 30, 40, 0.6);
  --primary-color: #6c5ce7;
  --primary-grad: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --success-color: #00cec9;
  --danger-color: #ff7675;
  --text-color: #dfe6e9;
  --text-muted: #b2bec3;
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --blur: blur(12px);
  --animation-speed: 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(108, 92, 231, 0.2) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(0, 206, 201, 0.15) 0%, transparent 20%);
}

.container {
  width: 100%;
  max-width: 480px;
  /* Mobile first constrained width */
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

/* Glassmorphism Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.5s ease-out;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
}

h1,
h2,
h3 {
  font-weight: 600;
  margin-bottom: 10px;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.9em;
}

/* Buttons */
.btn {
  display: inline-block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  text-align: center;
  color: white;
  margin-bottom: 10px;
}

.btn-primary {
  background: var(--primary-grad);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-danger {
  background: var(--danger-color);
  color: #2d3436;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  color: var(--text-color);
  padding: 10px 15px;
  /* Better padding */
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline ion-icon {
  font-size: 1.2em;
  /* Slightly larger icon */
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
}

input,
select {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.2);
  border: var(--glass-border);
  border-radius: 10px;
  color: white;
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: var(--primary-color);
}

/* Dashboard Specifics */
.balance-card {
  text-align: center;
  padding: 40px 20px;
}

.balance-amount {
  font-size: 2.5em;
  font-weight: 700;
  color: white;
  margin: 10px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 15px;
  text-align: center;
}

.income {
  color: var(--success-color);
}

.expense {
  color: var(--danger-color);
}

.progress-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  height: 10px;
  width: 100%;
  margin: 10px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary-grad);
  width: 0%;
  transition: width 0.5s ease;
}

/* Transactions List */
.transaction-list {
  list-style: none;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: slideIn 0.4s ease-out forwards;
  transition: background 0.2s;
  border-radius: 8px;
}

.transaction-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Stagger animation for list items */
.transaction-item:nth-child(1) {
  animation-delay: 0.1s;
}

.transaction-item:nth-child(2) {
  animation-delay: 0.15s;
}

.transaction-item:nth-child(3) {
  animation-delay: 0.2s;
}

.transaction-item:nth-child(4) {
  animation-delay: 0.25s;
}

.transaction-item:nth-child(5) {
  animation-delay: 0.3s;
}

.t-details h4 {
  font-size: 1em;
  margin: 0;
}

.t-details small {
  color: var(--text-muted);
}

.t-amount {
  font-weight: 600;
}

.t-amount.income {
  color: var(--success-color);
}

.t-amount.expense {
  color: var(--danger-color);
}

/* Bottom Nav (If needed) or Floating Action Button */
.fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--success-color);
  color: #2d3436;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(0, 206, 201, 0.4);
  cursor: pointer;
  z-index: 100;
}

/* Alerts */
.alert {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  display: none;
}


/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 20px;
  border-radius: 8px;
  color: var(--text-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease-out forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 250px;
}

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--danger-color);
}

.toast.info {
  border-left: 4px solid var(--primary-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.footer {
  text-align: center;
  margin-top: 30px;
  padding: 20px 0;
  color: var(--text-muted);
  font-size: 0.85em;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}