/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Sora', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Header */
header {
  background: #f8f9fa;
  padding: 30px;
  text-align: center;
  border-bottom: 1px solid #e9ecef;
}

h1 {
  font-family: 'TASA Explorer', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Main content */
main {
  padding: 40px 30px;
}

/* Current status section */
.current-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 15px;
  border: 2px solid #e9ecef;
}

.status-display {
  font-size: 2rem;
  font-weight: 700;
  color: #495057;
}

.progress-indicator {
  flex: 1;
  max-width: 300px;
  margin-left: 20px;
}

.mini-bar {
  width: 100%;
  height: 20px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
}

.mini-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

.mini-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, transparent 50%);
  border-radius: 10px;
}

/* Goals section */
.goals-section {
  margin-bottom: 30px;
}

h2 {
  font-family: 'TASA Explorer', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #495057;
}

.goals-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.goal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #f8f9fa;
  border-radius: 25px;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
  min-width: 120px;
}

.goal-item.completed {
  background: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.goal-item.current {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
  transform: scale(1.05);
}

.goal-number {
  font-weight: 600;
  font-size: 1.1rem;
}

.goal-status {
  font-size: 1.2rem;
  margin-left: 10px;
}

/* Delta section */
.delta-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 15px;
  border: 2px solid #e9ecef;
}

.current-delta {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #495057;
}

.delta-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.delta-controls input {
  flex: 1;
  padding: 10px 15px;
  border: 2px solid #ced4da;
  border-radius: 25px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.delta-controls input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button */
.btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active {
  transform: translateY(0);
}

/* Footer */
footer {
  background: #f8f9fa;
  padding: 20px 30px;
  text-align: center;
  border-top: 1px solid #e9ecef;
  font-size: 0.9rem;
  color: #6c757d;
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    border-radius: 15px;
  }

  header {
    padding: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  main {
    padding: 20px;
  }

  .progress-bar {
    height: 50px;
  }

  .progress-text {
    font-size: 1.2rem;
  }

  .goals-list {
    flex-direction: column;
  }

  .goal-item {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .progress-text {
    font-size: 1rem;
  }

  .goal-item {
    padding: 10px 15px;
    min-width: 100px;
  }
}

/* Loading animation */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.progress-fill {
  animation: pulse 2s infinite;
}

/* Success animation for completed goals */
.goal-item.completed {
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% { transform: scale(0.3); opacity: 0; }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* Goal celebration effect for mini bar */
.mini-bar.celebrating {
  animation: celebrateFlash 0.3s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
}

@keyframes celebrateFlash {
  0% {
    background: #e9ecef;
  }
  50% {
    background: #ffffff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 1);
  }
  100% {
    background: #e9ecef;
  }
}

.mini-bar.celebrating .mini-fill {
  background: linear-gradient(90deg, #ffffff 0%, #f8f8f8 50%, #f0f0f0 100%);
  animation: celebrateFillFlash 0.3s ease-in-out infinite;
}

@keyframes celebrateFillFlash {
  0% {
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
  }
  50% {
    background: linear-gradient(90deg, #ffffff 0%, #f8f8f8 50%, #f0f0f0 100%);
  }
  100% {
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
  }
}
