* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, -apple-system, sans-serif;
  color: #172127;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-image: url("images/Finance.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.main {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(50px); 
  -webkit-backdrop-filter: blur(50px);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
  width: 100%;
  max-width: 580px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.header-container {
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1e293b;
  margin-bottom: 4px;
}

h1 i {
  color: #2563eb;
}

h2 {
  font-size: 0.88rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 12px;
}

.hidden {
  display: none !important;
}

.budget-progress-container {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.budget-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.budget-progress-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.budget-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
  background: linear-gradient(90deg, #10b981, #059669);
}

.budget-progress-fill.normal {
  background: linear-gradient(90deg, #10b981, #059669);
}

.budget-progress-fill.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.budget-progress-fill.overspent {
  background: linear-gradient(90deg, #ef4444, #dc2626);
  animation: pulseWarning 1.5s infinite;
}

@keyframes pulseWarning {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.summary-section {
  background: rgba(255, 255, 255, 0.6);
  padding: 14px;
  padding-bottom: 0px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  color: #3b82f6;
}

.simulator-card {
  border-left: 4px solid #8b5cf6;
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.8), rgba(255, 255, 255, 0.7));
}

.simulator-card .card-header h3 i {
  color: #8b5cf6;
}

.simulation-headline {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #334155;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(221, 214, 254, 0.6);
}

.simulation-headline i {
  color: #8b5cf6;
  font-size: 1.1rem;
  margin-top: 2px;
}

.simulation-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.sim-stat-pill {
  flex: 1;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #e2e8f0;
}

.sim-stat-pill.highlight {
  border-color: #ddd6fe;
  background: #f5f3ff;
}

.sim-stat-pill .label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.sim-stat-pill .val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #6d28d9;
}

.milestone-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed #c084fc;
}

.milestone-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f3e8ff;
  color: #7e22ce;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.milestone-text {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.35;
}

.section-title h3 {
  font-size: 0.95rem;
  color: #334155;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#expense-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 16px;
  padding: 12px 6px 16px 6px;
  scroll-behavior: smooth;
  margin-bottom: 14px;
}

#expense-list::-webkit-scrollbar {
  height: 6px;
}

#expense-list::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
  border-radius: 4px;
}

#expense-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#expense-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.expense-row {
  flex: 0 0 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.expense-row:hover {
  border-color: #3b82f6;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.expense-field {
  width: 100%;
}

.row-actions-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

select.category {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding: 9px 34px 9px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background-color: #f8fafc;
  cursor: pointer;
  outline: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

select.category:hover {
  border-color: #3b82f6;
  background-color: #ffffff;
}

select.category:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="number"] {
  flex: 1;
  width: 100%;
  padding: 9px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background-color: #ffffff;
  outline: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

input[type="number"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

select:focus,
input[type="number"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 16px;
}

button {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

button:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

button:active {
  transform: translateY(0);
}

#add-btn {
  flex: 1;
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px dashed #93c5fd;
}

#add-btn:hover {
  background-color: #dbeafe;
}

#submit-btn {
  flex: 1.5;
  background-color: #2563eb;
  color: #ffffff;
}

#submit-btn:hover {
  background-color: #1d4ed8;
}

.remove-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background-color: #fef2f2;
  color: #ef4444;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background-color: #fee2e2;
  transform: scale(1.05);
}

.stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.6);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: all 0.3s ease;
  cursor: pointer;
}

.step-item.active {
  opacity: 1;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #cbd5e1;
  color: #334155;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.step-item.active .step-num {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 10px;
}

.step-view {
  animation: fadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.text-center {
  text-align: center;
  justify-content: center;
}

.step-desc {
  font-size: 0.88rem;
  color: #64748b;
  text-align: center;
  margin-bottom: 16px;
}

.mood-prompt-card {
  border-top: 4px solid #3b82f6;
  padding: 24px 18px;
}

.mood-badge-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.mood-badge {
  flex: 1;
  min-width: 80px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mood-badge .emoji {
  font-size: 1.8rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.mood-badge:hover .emoji {
  transform: scale(1.15);
}

.mood-badge .label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.mood-badge:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.mood-badge[data-value="Happy"]:hover, .mood-badge[data-value="Happy"].active {
  background: #f0fdf4;
  border-color: #22c55e;
}
.mood-badge[data-value="Happy"].active .label { color: #15803d; }

.mood-badge[data-value="Neutral"]:hover, .mood-badge[data-value="Neutral"].active {
  background: #f8fafc;
  border-color: #64748b;
}
.mood-badge[data-value="Neutral"].active .label { color: #334155; }

.mood-badge[data-value="Stressed"]:hover, .mood-badge[data-value="Stressed"].active {
  background: #fff7ed;
  border-color: #f97316;
}
.mood-badge[data-value="Stressed"].active .label { color: #c2410c; }

.mood-badge[data-value="Angry"]:hover, .mood-badge[data-value="Angry"].active {
  background: #fef2f2;
  border-color: #ef4444;
}
.mood-badge[data-value="Angry"].active .label { color: #b91c1c; }

.mood-badge[data-value="Bored"]:hover, .mood-badge[data-value="Bored"].active {
  background: #eeedfe;
  border-color: #6366f1;
}
.mood-badge[data-value="Bored"].active .label { color: #4338ca; }

.mood-badge.active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.step-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
}

.primary-btn {
  background-color: #2563eb;
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 700;
}

.primary-btn:hover {
  background-color: #1d4ed8;
}

.secondary-btn {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 10px 16px;
}

.secondary-btn:hover {
  background-color: #e2e8f0;
}

.mood-card {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.8), rgba(255, 255, 255, 0.7));
}

.mood-insight-alert {
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.92rem;
  line-height: 1.4;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mood-insight-alert i {
  color: #2563eb;
  font-size: 1.2rem;
}

#total-display {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

#highest-display {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  margin-top: 4px;
}

.chart-section {
  margin-top: 16px;
}

.chart-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

#bar-chart-btn, #pie-chart-btn {
  flex: 1;
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

#bar-chart-btn:hover, #pie-chart-btn:hover {
  background-color: #e2e8f0;
}

.chart-container {
  position: relative;
  height: 260px;
  width: 100%;
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.allowance-input-group label {
  display: block;
  margin-left: 5px;
  margin-bottom: 12px;
  margin-top: 14px; /* Change this value to adjust vertical spacing */
}

.saving-tip-card{
    margin-bottom:15px;
}

.saving-tip-content{
    display:flex;
    flex-direction:column;
    align-items:center;
}

#saving-tip{
    font-size:15px;
    font-weight: bold;
    line-height:1.3;
    color:#374151;
    text-align:center;
    margin:15px 0;
    max-width:90%;
}

#new-tip-btn{
    margin-top:0px;
}

.card-header h3 {
  display: flex !important;
  width: 100%;
  justify-content: flex-start;
  align-items: center;
}

#new-tip-btn-span {
  margin-left: auto !important;
}

#restart-btn{
  margin-left: auto;
  margin-right: auto;
}
