* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  padding: 40px;
  backdrop-filter: blur(10px);
}

h1 {
  text-align: center;
  color: #4a5568;
  margin-bottom: 30px;
  font-size: 2.5em;
  font-weight: 700;
}

.input-area {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

#inputHabito {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1.1em;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#inputHabito:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
  padding: 15px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#dataHoje {
  text-align: center;
  font-size: 1.2em;
  color: #718096;
  margin-bottom: 30px;
  font-weight: 500;
}

#listaHabitos {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.habito-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 25px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.5s ease forwards;
}

.habito-card:hover {
  border-color: #667eea;
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.15);
  transform: translateY(-5px);
}

.habito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.habito-header h3 {
  font-size: 1.4em;
  color: #2d3748;
  margin: 0;
}

.streaks {
  display: flex;
  gap: 15px;
  font-weight: 700;
  font-size: 1em;
}

.streak-atual {
  background: linear-gradient(135deg, #48bb78, #38a169);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95em;
}

.melhor-streak {
  background: #edf2f7;
  color: #4a5568;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.95em;
}

.delete-btn {
  background: #f56565;
  padding: 10px 12px;
  font-size: 1.2em;
  min-width: 50px;
}

.delete-btn:hover {
  background: #e53e3e;
  transform: scale(1.1);
}

.dias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(35px, 1fr));
  gap: 8px;
  max-width: 400px;
}

.dia {
  aspect-ratio: 1;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: bold;
}

.dia:hover {
  background: #ebf8ff;
  border-color: #4299e1;
  transform: scale(1.1);
}

.dia.hoje {
  border-color: #ed8936;
  background: #fed7aa;
  font-weight: 800;
}

.sem-habitos {
  text-align: center;
  color: #a0aec0;
  font-size: 1.2em;
  padding: 40px;
  font-style: italic;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .container {
    padding: 20px;
    margin: 10px;
  }
  
  h1 {
    font-size: 2em;
  }
  
  .input-area {
    flex-direction: column;
  }
  
  .habito-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .streaks {
    flex-direction: column;
    gap: 5px;
  }
  
  .dias-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

