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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 10px;
  font-size: 2.5em;
}

.year-info {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1em;
}

#days-remaining {
  font-weight: bold;
  color: #e74c3c;
}

.add-person-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  border: 2px dashed #ddd;
}

.add-person-section h2 {
  margin-bottom: 20px;
  color: #333;
}

#add-person-form {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

#add-person-form input {
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  min-width: 200px;
  transition: border-color 0.3s;
}

#add-person-form input:focus {
  outline: none;
  border-color: #667eea;
}

#add-person-form button {
  padding: 12px 25px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

#add-person-form button:hover {
  background: #5a6fd8;
}

.progress-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

.person-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
}

.person-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.person-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.person-name {
  font-size: 1.4em;
  font-weight: bold;
  color: #333;
}

.remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.remove-btn:hover {
  background: #c0392b;
}

.goal-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.progress-bar {
  background: #e0e0e0;
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(45deg, #27ae60, #2ecc71);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

.progress-fill.over-goal {
  background: linear-gradient(45deg, #f39c12, #e67e22);
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.stat-item {
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-number {
  display: block;
  font-size: 1.5em;
  font-weight: bold;
  color: #667eea;
}

.stat-label {
  font-size: 0.9em;
  color: #666;
}

.loading {
  text-align: center;
  color: #666;
  font-style: italic;
}

.error {
  color: #e74c3c;
  background: #ffeaea;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
}

.api-info {
  text-align: center;
  margin-top: 30px;
  padding: 15px;
  background: #e8f4f8;
  border-radius: 10px;
}

.refresh-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 10px;
}

.refresh-btn:hover {
  background: #2980b9;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  #add-person-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  #add-person-form input,
  #add-person-form button {
    min-width: auto;
  }
  
  .progress-container {
    grid-template-columns: 1fr;
  }
}