/* Basic body styles */
body {
  font-family: Arial, sans-serif;
  background: url('') no-repeat center center fixed;
  background-size: cover;
  color: #222;
  min-height: 100vh;
  margin: 0;
  /* Optional: add overlay effect for better text contrast */
  position: relative;
  z-index: 0;
}

/* Container to center and pad content */
.container {
  max-width: 900px;
  margin: 30px auto;
  padding: 15px;
  background: #beeef6;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* Header styles */
.header {
  text-align: center;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
  color: #333;
}

.header p {
  color: #666;
}

/* Stats boxes container */
.stats-section {
  display: flex;
  gap: 12px;
  justify-content: space-around;
  margin-bottom: 24px;
}

/* Each stat card */
.stat-card {
  background: #eee;
  padding: 16px;
  border-radius: 8px;
  width: 120px;
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  color: #234;
  margin-bottom: 4px;
}

.stat-label {
  color: #555;
  font-size: 1rem;
}

/* Main content layout */
.main-content {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* Form and goals container */
.goal-form-section,
.goals-display-section {
  flex: 1 1 45%;
  background: #fefefe;
  border-radius: 8px;
  padding: 18px;
  border: 1px solid #e0e0e0;
}

/* criteria section */
.smart-criteria {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.smart-item {
  background: #eee;
  padding: 8px;
  border-radius: 4px;
  width: 100%;
}

.smart-item h4 {
  font-size: 1.5rem;
  color: #336;
  margin-bottom: 2px;
}

.smart-item p {
  font-size: 1rem;
  color: #555;
}

/* Form group styles */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: bold;
  color: #333;
  font-size: 1.1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  margin-top: 2px;
}
#congratsOverlay {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(255,255,255,0.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.8s;
}
.congrats-container {
  position: relative;
  text-align: center;
  padding: 40px 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 6px 36px 0 rgba(0,0,0,0.18);
}
.congrats-message {
  font-size: 2rem;
  color: #FF9800;
  font-weight: bold;
  margin-top: 24px;
  letter-spacing: 2px;
  text-shadow: 0px 2px 10px #FFD54F;
}
.sparkle {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #2fd4d7 40%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(circle at center, #9f19e7 50%, rgba(255, 255, 170, 0) 80%);
  box-shadow:
    0 0 6px 3px #ef23de,
    0 0 12px 6px #0b29b0,
    0 0 18px 9px #e9d312;
  opacity: 0.8;
  animation: sparkleTwinkle 2.5s ease-in-out infinite, sparkleFlicker 1.5s infinite alternate;
}

.sparkle1 {
  top: 10px;
  left: 15px;
  animation-delay: 0s, 0s;
  width: 30px;
  height: 30px;
}
.sparkle2 {
  top: 100px;
  left: 90px;
  animation-delay: 0.5s, 0.3s;
  width: 20px;
  height: 20px;
}
.sparkle3 {
  top: 50px;
  left: 190px;
  animation-delay: 1s, 0.8s;
  width: 25px;
  height: 25px;
}
.sparkle4 {
  top: 10px;
  left: 240px;
  animation-delay: 0.8s, 0.6s;
  width: 28px;
  height: 28px;
}
.sparkle5 {
  top: 80px;
  left: 60px;
  animation-delay: 0.3s, 0.1s;
  width: 22px;
  height: 22px;
}

@keyframes sparkleTwinkle {
  0%, 100% {
    transform: scale(0.7) rotate(0deg);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3) rotate(180deg);
    opacity: 1;
  }
}

@keyframes sparkleFlicker {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.6);
  }
}



/* Submit button style */
.btn {
  background: #336699;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 1.05rem;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}

.btn:hover {
  background: #224466;
}

/* Goals list container */
.goals-list {
  max-height: 400px;
  overflow-y: auto;
  min-height: 100px;
}

/* Each goal card */
.goal-card {
  background: #eee;
  border-radius: 6px;
  padding: 12px;
  margin-bottom:40px;
  border-left: 3px solid #336699;
  user-select: none;
  cursor: grab;
}

.goal-card.dragging {
  opacity: 0.5;
}

/* Goal header with title and category */
.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.goal-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #222;
}

.goal-category {
  background: #e84857;
  color: #fff;
  padding: 2px 8px;    /* reduce from 2px 13px or higher */
  border-radius: 8px;  /* keep small, e.g., 6-8px */
  font-size: 1rem;  /* you can increase/reduce this if needed */
  font-weight: 600;
  display: inline-block;
  min-width: unset;
  line-height: 1.2;
}

/* Goal description */
.goal-description {
  color: #333;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

/* Goal details container */
.goal-details {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.goal-detail {
  background: #fff;
  padding: 4px;
  border-radius: 3px;
  text-align: center;
  font-size: 1.1rem;
  flex: 1 1 32%;
}

.goal-detail-label {
  color: #666;
}

.goal-detail-value {
  color: #222;
  font-weight: bold;
}

/* Progress bar styles */
.progress-section {
  margin-bottom: 8px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #ddd;
  border-radius: 4px;
}

.progress-fill {
  height: 100%;
  background: #38d25c;
  border-radius: 4px;
  transition: width 0.2s;
}

.progress-text {
  text-align: center;
  color: #336;
  font-size: 1rem;
}

/* Buttons in goal actions */
.goal-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.btn-small {
  padding: 4px 10px;
  font-size: 0.95rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  background: #336699;
  color: #fff;
  transition: background 0.2s;
}

.btn-small:hover {
  background: #d7dde3;
}

.btn-progress {
  background: #0c61b6;
}

.btn-progress:hover {
  background: #0a4c8e;
}

.btn-delete {
  background: #dc3545;
}

.btn-delete:hover {
  background: #c82333;
}

/* Empty goals state styling */
.empty-state {
  text-align: center;
  padding: 40px 10px;
  color: #888;
}

/* Undo delete notification */
.undo-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 5px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 1010;
}

.undo-btn {
  background: #28a745;
  border: none;
  padding: 6px 14px;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.undo-btn:hover {
  background: #218838;
}
