.habits-page {
  min-height: 100vh;
  background: url('../background-internal.jpg') center/cover no-repeat fixed;
  position: relative;
  padding: 2rem;
}

.habits-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  z-index: 0;
}

.habits-header {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.habits-header h1 {
  font-size: 2rem;
  color: #059669;
  margin: 0;
}

.back-button {
  padding: 0.75rem 1.5rem;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: #4b5563;
  transform: translateY(-2px);
}

.add-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.habits-stats {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.habits-stats .stat {
  background: rgba(255, 255, 255, 0.92);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #059669;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: #64748b;
  margin-top: 0.5rem;
}

.habits-list {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.habit-card {
  background: rgba(255, 255, 255, 0.92);
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.habit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.habit-checkbox input[type="checkbox"] {
  width: 30px;
  height: 30px;
  cursor: pointer;
  accent-color: #10b981;
}

.habit-content {
  flex: 1;
}

.habit-content h3 {
  margin: 0 0 0.5rem 0;
  color: #1a202c;
  font-size: 1.25rem;
}

.habit-content p {
  margin: 0 0 0.5rem 0;
  color: #64748b;
  font-size: 0.9rem;
}

.habit-frequency {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.delete-button {
  padding: 0.5rem 1rem;
  background: #fee;
  border: 2px solid #ef4444;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.delete-button:hover {
  background: #ef4444;
  transform: scale(1.1);
}

.empty-state {
  background: rgba(255, 255, 255, 0.92);
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
  color: #64748b;
}

.empty-state p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.loading {
  text-align: center;
  font-size: 1.5rem;
  color: #059669;
  padding: 3rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  margin: 0 0 1.5rem 0;
  color: #059669;
}

.modal-content .form-group {
  margin-bottom: 1.5rem;
}

.modal-content label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  outline: none;
  border-color: #10b981;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cancel-button {
  padding: 0.75rem 1.5rem;
  background: #e5e7eb;
  color: #374151;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.create-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .habits-header {
    flex-direction: column;
    gap: 1rem;
  }

  .habits-stats {
    grid-template-columns: 1fr;
  }
}
